Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

cps::SCUDirArg Class Reference
[Communications objects and functions]

A class describing the data to be communicated,. More...

#include <scu_dir_arg.h>

List of all members.

Public Member Functions

 SCUDirArg ()
 Default constructor.
 SCUDirArg (void *addr, SCUDir dir, SCUXR sendxr, int blklen, int numblk=1, int stride=1)
 Parameterized constructor.
 ~SCUDirArg ()
 Destructor:.
void Init (void *addr, SCUDir dir, SCUXR sendxr, int blklen, int numblk=1, int stride=1)
 Initialise (or re-initialise) the datatype.
void * Addr ()
 Get the base-address.
void * Addr (void *addr)
 Set the base-address.
int Blklen ()
 Get the block-length.
int Blklen (int blklen)
 Set the block-length.
int Numblk ()
 Get the number of blocks.
int Numblk (int numblk)
 Set the number of blocks.
int Stride ()
 Get the stride.
int Stride (int stride)
 Set the stride.
void Reload (void *addr, int blklen, int numblk, int stride)
 Reset the data structure parameters parameters.
MPI_Datatype Datatype (void)
 Get the MPI Datatype created by this SCUDirArg.
SCUDir CommDir (void)
 Get the direction.
SCUXR CommType (void)
 Get the send/receive flag of this SCUDirArg.
void SetDataSize (int mpi_datasize)
 Change the size of the fundamental data element.


Detailed Description

A class describing the data to be communicated,.

The SCUDirArg class is part of the MPI communications layer. It describes the data to be communicated. It is assumed to be of a regularly strided form, so it is described in terms of its base address, the number of blocks its block length and the stride between each block. The latter two are in units of the actual numbers (not bytes).

Also described here is whether this data should be sent or received and the direction in which the data is to communicated.

At present this code is hardwired to assume that the data is always of type IFloat.

Definition at line 76 of file scu_dir_arg.h.


Constructor & Destructor Documentation

cps::SCUDirArg::SCUDirArg  ) 
 

Default constructor.

The default constructor initialises an instance of this class as follows

  • base address of data to be sent = NULL
  • direction to send data = SCU_NoDir (the null direction)
  • send or receive flag = SCU_NoXR (neither)
  • length of each block = -1
  • number of blocks = -1
  • stride = -1
  • MPI datatype = MPI_DATATYPE_NULL
  • size of each basic data element = COMMS_DATASIZE
Postcondition:
A data structure with these characteristics is created.

Definition at line 57 of file scu_dir_arg.C.

cps::SCUDirArg::SCUDirArg void *  addr,
SCUDir  dir,
SCUXR  sendxr,
int  blklen,
int  numblk = 1,
int  stride = 1
 

Parameterized constructor.

Parameters:
addr The base address of the data to be sent/received.
dir The direction in which to communicate.
sendxr The flag indicating whether to send or receive this data.
blklen The length in floating point or integer numbers of each block of data.
numblk The number of blocks (default = 1).
stride The stride (the interval from the start of one block to the next) in floating point or integer numbers (default = 1).
Postcondition:
A data structure with the desired characteristics is created.

Definition at line 73 of file scu_dir_arg.C.

References cps::dir, and Init().

cps::SCUDirArg::~SCUDirArg  ) 
 

Destructor:.

Definition at line 81 of file scu_dir_arg.C.


Member Function Documentation

void * cps::SCUDirArg::Addr void *  addr  ) 
 

Set the base-address.

Parameters:
addr The new base address of the data to be communicated.
Returns:
The previous base address

Definition at line 145 of file scu_dir_arg.C.

void * cps::SCUDirArg::Addr  ) 
 

Get the base-address.

Returns:
The base address of the data to be communicated.

Definition at line 136 of file scu_dir_arg.C.

Referenced by cps::stag_dirac(), and cps::stag_dirac_init_g().

int cps::SCUDirArg::Blklen int  blklen  ) 
 

Set the block-length.

Parameters:
The new block length in floating point or integer numbers .
Returns:
The previous block-length.

Definition at line 167 of file scu_dir_arg.C.

int cps::SCUDirArg::Blklen  ) 
 

Get the block-length.

Returns:
The block-length in floating point or integer numbers .

Definition at line 159 of file scu_dir_arg.C.

SCUDir cps::SCUDirArg::CommDir void   ) 
 

Get the direction.

Returns:
The direction flag.

Definition at line 254 of file scu_dir_arg.C.

References cps::SCUDir.

SCUXR cps::SCUDirArg::CommType void   ) 
 

Get the send/receive flag of this SCUDirArg.

Returns:
The flag indicating whether this data is sent or received.

Definition at line 263 of file scu_dir_arg.C.

References cps::SCUXR.

MPI_Datatype cps::SCUDirArg::Datatype void   ) 
 

Get the MPI Datatype created by this SCUDirArg.

Returns:
The datatype.

Definition at line 245 of file scu_dir_arg.C.

void cps::SCUDirArg::Init void *  addr,
SCUDir  dir,
SCUXR  sendxr,
int  blklen,
int  numblk = 1,
int  stride = 1
 

Initialise (or re-initialise) the datatype.

Parameters:
addr The base address of the data to be sent/received.
dir The direction in which to communicate.
sendxr The flag indicating whether to send or receive this data.
blklen The length of each block of data in floating point or integer numbers .
numblk The number of blocks.
stride The stride (the interval from the start of one block to the next) in floating point or integer numbers
Postcondition:
A data structure with the desired characteristics is created.

Definition at line 115 of file scu_dir_arg.C.

Referenced by cps::qloadsave_pump_data(), and SCUDirArg().

int cps::SCUDirArg::Numblk int  numblk  ) 
 

Set the number of blocks.

Parameters:
The new number of blocks.
Returns:
The previous number of blocks.

Definition at line 189 of file scu_dir_arg.C.

int cps::SCUDirArg::Numblk  ) 
 

Get the number of blocks.

Returns:
The number of blocks.

Definition at line 181 of file scu_dir_arg.C.

void cps::SCUDirArg::Reload void *  addr,
int  blklen,
int  numblk = 1,
int  stride = 1
 

Reset the data structure parameters parameters.

Parameters:
addr The base address of the data to be sent/received.
dir The direction in which to communicate.
sendxr The flag indicating whether to send or receive this data.
blklen The length of each block of data in floating point or integer numbers.
numblk The number of blocks (default = 1).
stride The stride (the interval from the start of one block to the next) (default = 1) in floating point or integer numbers.

Definition at line 230 of file scu_dir_arg.C.

void cps::SCUDirArg::SetDataSize int  mpi_datasize  ) 
 

Change the size of the fundamental data element.

If there is an mpi datatype defined for this class, it is redefined to use the new data size.

Parameters:
mpi_datasize The new data size in bytes.

Change the size (in bytes) of the fundamental data element:

If there is an mpi datatype defined for this class, redefine it to use the new data size:

Definition at line 274 of file scu_dir_arg.C.

int cps::SCUDirArg::Stride int  stride  ) 
 

Set the stride.

Parameters:
The new stride in floating point or integer numbers.
Returns:
The previous stride.

Definition at line 211 of file scu_dir_arg.C.

int cps::SCUDirArg::Stride  ) 
 

Get the stride.

Returns:
The stride in floating point or integer numbers.

Definition at line 203 of file scu_dir_arg.C.


The documentation for this class was generated from the following files:
Generated on Sat Oct 10 14:12:05 2009 for Columbia Physics System by  doxygen 1.3.9.1