Show packing and unpacking data, Computer Engineering

Assignment Help:

Q. Show Packing and Unpacking Data?

Packing and Unpacking Data 

  • pvm_packs - Pack active message buffer with arrays of prescribed data type:
  • int info = pvm_packf( const char *fmt, ... )
  • int info = pvm_pkbyte( char *xp, int nitem, int stride )
  • int info = pvm_pkcplx( float *cp, int nitem, int stride )
  • int info = pvm_pkdcplx( double *zp, int nitem, int stride )
  • int info = pvm_pkdouble( double *dp, int nitem, int stride )
  • int info = pvm_pkfloat( float *fp, int nitem, int stride )
  • int info = pvm_pkint( int *ip, int nitem, int stride )
  • int info = pvm_pkuint( unsigned int *ip, int nitem, int stride )
  • int info = pvm_pkushort( unsigned short *ip, int nitem, int stride )
  • int info = pvm_pkulong( unsigned long *ip, int nitem, int stride )
  • int info = pvm_pklong( long *ip, int nitem, int stride )
  • int info = pvm_pkshort( short *jp, int nitem, int stride )
  • int info = pvm_pkstr( char *sp )

fmt Printf-like format expression denoting what to pack. nitem is total number of items to be packed (not number of bytes). stride is stride to be used when packing the items. 

  • pvm_unpack - Unpacks the active message buffer into arrays of prescribed data type. It has been implemented for different data types:
  • int info = pvm_unpackf( const char *fmt, ... )
  • int info = pvm_upkbyte( char *xp, int nitem, int stride)
  • int info = pvm_upkcplx( float *cp, int nitem, int stride)
  • int info = pvm_upkdcplx( double *zp, int nitem, int stride)
  • int info = pvm_upkdouble( double *dp, int nitem, int stride)
  • int info = pvm_upkfloat( float *fp, int nitem, int stride)
  • int info = pvm_upkint( int *ip, int nitem, int stride)
  • int info = pvm_upkuint( unsigned int *ip, int nitem, int stride )
  • int info = pvm_upkushort( unsigned short *ip, int nitem, int stride )
  • int info = pvm_upkulong( unsigned long *ip, int nitem, int stride )
  • int info = pvm_upklong( long *ip, int nitem, int stride)
  • int info = pvm_upkshort( short *jp, int nitem, int stride)
  • int info = pvm_upkstr( char *sp )

Every of the pvm_upk* routines unpacks an array of given data type from active receive buffer. The arguments for every of routines are a pointer to the array to be unpacked into, nitem that is the total number of items to unpack and stride that is the stride to use when unpacking. An exception is pvm_upkstr() that by definition unpacks a NULL terminated character string and So doesn't require nitem or stride arguments.


Related Discussions:- Show packing and unpacking data

What is text editor, What is text editor? It is used for entering and e...

What is text editor? It is used for entering and editing application programs. The user of this program interactively implements command that permit statements of a source prog

Instruction level-parallelism based on granularity size, Instruction level ...

Instruction level This is the initial level and the degree of parallelism is uppermost at this level. The fine grain size is used at statement or instruction level as only few

What is a screen group, What is a screen group? How it is useful? Scre...

What is a screen group? How it is useful? Screen group is a field in the Screen Attributes of a screen.  Here we can explain a string of up to four characters which is availa

What is system software, What is system software? Give an example. It i...

What is system software? Give an example. It is a collection of program that are implemented as needed to perform functions such as I.  Receiving and interpreting user comma

What do you mean by single construct in fortan, Q. What do you mean by Sing...

Q. What do you mean by Single Construct in FORTAN? Single construct specifies the associated structured block is executed by just one thread in team (not essentially the master

What is tri-state logic, What is Tri-state logic ? Ans. Tri-state Logi...

What is Tri-state logic ? Ans. Tri-state Logic: In common logic circuits, there are two states of the output, as LOW and HIGH. If the output is not in the LOW state, this

Network for digital methods in the arts and humanities, Network for Digital...

Network for Digital Methods in the Arts and Humanities: Europe has seen a signifi cant investment in the digitisation of its cultural heritage as part of the worldwide establi

Cloud computing assignment, In the module on WSDL you were presented with t...

In the module on WSDL you were presented with the details of the WSDL service that receives a request for a stock market quote and returns the quote. The basic structure of a WSDL

Explain the meaning of accept socket primitive, Explain the meaning of A...

Explain the meaning of ACCEPT socket primitive. The Accept Primitive: A server which uses connection-oriented transport should call procedure accepts to accept

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd