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

Advntages of parallel processing oversequential computation, Advntages of p...

Advntages of parallel processing oversequential computation Parallel computing has the following benefits over sequential computing: i)    Accumulate time ii)   Solves b

Thematic analysis - flash design, Thematic Analysis & Interpretation: ...

Thematic Analysis & Interpretation: The next steps in analysis are to move beyond what is literally there in the image (formal visual elements) and examine the meaning they re

Explain cache memory, What is cache memory? It is a small, fast memory ...

What is cache memory? It is a small, fast memory that is inserted among large, slower main memory and the processor. It decreases the memory access time

Explain the term- wireless technologyand broadband, Explain the term- Wirel...

Explain the term- Wireless Technologyand Broadband Wireless Technology (WiFi) and Broadband Most areas in the world now provide broadband instead of dial up for connectin

Deductive inferences - artificial intelligence, Deductive Inferences - Arti...

Deductive Inferences - Artificial intelligence: We have described how knowledge can be represented in first-order logic, and how in logic rule-based expert systems expressed ca

What is inode, What is 'inode'? All UNIX files have its description kep...

What is 'inode'? All UNIX files have its description kept in a structure called 'inode'. The inode have info about the file-size, its location, time of last access, time of las

What is roll area, What is roll area? A roll area having the program's...

What is roll area? A roll area having the program's runtime context.  In addition to the runtime stack and other structures, all local variables and any data known to the prog

Explain logical shifts with example, Q. Explain Logical shifts with example...

Q. Explain Logical shifts with example? Logical shifts LOGICAL SHIFT LEFT and LOGICAL SHIFT RIGHT insert zeros to end bit position and other bits of a word are shifted left or

Explain disk cartridges, Q. Explain Disk Cartridges ? Disk Cartridges:...

Q. Explain Disk Cartridges ? Disk Cartridges: Removable disk cartridges are an option to hard disk units as a form of secondary storage. Cartridge generally comprises one or

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