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

JAVA, HOW WAS JAVA INVENTED?

HOW WAS JAVA INVENTED?

What are the counters, What are the Counters? 1. The Counter is a seque...

What are the Counters? 1. The Counter is a sequential circuit which consists of a set of flip flops connected in a appropriate manner to count the sequence of input pulses.

What is collective message passing, Q. What is Collective Message Passing? ...

Q. What is Collective Message Passing? In collective message passing all the processes of a group take part in communication. MPI offers a number of functions to apply the coll

What are the properties exposed by activex controls, An ActiveX control has...

An ActiveX control has four types of properties: 1. Stock:-> These are standard properties supplied to each control, such as font / color. The developer must activate stock pro

Device drivers in assembly, Device drivers are special programs installed b...

Device drivers are special programs installed by config.sys file to control installable devices.  So personal computers can be expanded at some future time by installation of new d

Explain transmission gate-based d-latch, The Transmission-Gate input is lin...

The Transmission-Gate input is linked to the D_LATCH data input (D), the control input to the Transmission-Gate is linked to the D_LATCH enable input (EN) and the Transmission-Gate

What is a pointer, What is a pointer? The register or memory location t...

What is a pointer? The register or memory location that having the address of an operand is known as a pointer.

Random search - artificial intelligence, Random Search - artificial intelli...

Random Search - artificial intelligence: Some problems to be solved by a search agent are more creative in nature, for example, like in writing poetry. In this case, it is oft

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