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

Explain control word, What is control word? A control word is a word wh...

What is control word? A control word is a word whose individual bits show the various control signals.

Indirect addressing mode - assembly language, Indirect addressing mode - as...

Indirect addressing mode - assembly language: The Indirect addressing mode and the address field of the instruction refers to the address of a word in memory, which in turn co

Draw the circuit diagram of a Master-Slave J-K flip-flop, Draw the circuit ...

Draw the circuit diagram of a Master-slave J-K flip-flop using NAND gates. What is race around condition? How is it eliminated in a Master-slave J-K flip-flop? Ans. Using NA

Explain simple telephone communication system, Explain simple telephone com...

Explain simple telephone communication system with circuit and equation of current flow in microphone? Simple Telephone Communication: In the simplest type of a telephone cir

An example of two stages network have switching elements, For two stages ne...

For two stages network the switching elements for M inlets with r blocks and N outlets with s blocks is given by (A) Ms + Nr                                (B)  Mr + Ns (

Add references dialog box, What is the difference among "using System.Data;...

What is the difference among "using System.Data;" and directly adding the reference from "Add References Dialog Box"?  When you compile a program using command line, you add th

How do you perform functional testing under load, Functionality under load ...

Functionality under load can be tested by running various Vusers concurrently. By enhancing the amount of Vusers, we can verify how much load the server can sustain.

Determine the indicator variables in a random forest, Given a dataset with ...

Given a dataset with 1000 rows and 25 predictors labeled x1, x2, ...,x25 to classify into two classes {a, b}. Consider the small random forest with 3 trees and one split in each tr

What do you mean by electronic funds transfer, What do you mean by Electron...

What do you mean by Electronic Funds Transfer? Electronic Funds Transfer: It’s an electronic payment method which transfers the money value through one bank account to o

What is common language runtime, What is "Common Language Runtime" (CLR)?  ...

What is "Common Language Runtime" (CLR)?  CLR is .NET equivalent of Java Virtual Machine (JVM). It is the runtime that changes a MSIL code into the host machine language code,

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