mpiControlMemory
Declaration
int32_t mpiControlMemory(MPIControl control, void **memory, void **external)
Required Header: stdmpi.h
Description
mpiControlMemory sets (writes) an address (used to access a Control object's memory) to the contents of memory.
If external is not NULL, the contents of external are set to an implementation-specific address that typically points to a different section or type of Control memory other than memory (e.g., to external or off-chip memory). These addresses (or addresses calculated from them) are passed as the src argument to mpiControlMemoryGet(...) and the dst argument to mpiControlMemorySet(...).
Return Values | |
---|---|
MPIMessageOK |
Sample Code
/* Simple code to increment userbuffer[0] */ MPIXmpData *firmware; MPIXmpBufferData *buffer; int32_t returnValue, tempBuffer; /* Get memory pointers */ returnValue = mpiControlMemory(control, &firmware, &buffer); msgCHECK(returnValue); returnValue = mpiControlMemoryGet(control, &tempBuffer, &buffer->UserBuffer.Data[0], sizeof(buffer->UserBuffer.Data[0])); msgCHECK(returnValue); tempBuffer++; returnValue = mpiControlMemorySet(control, &buffer->UserBuffer.Data[0], &tempBuffer, sizeof(buffer->UserBuffer.Data[0])); msgCHECK(returnValue);
See Also
mpiControlMemoryGet | mpiControlMemorySet | mpiControlMemoryAlloc | mpiControlMemoryCount | mpiControlMemoryFree