Test-Macros
[Implementation-Core]

Collaboration diagram for Test-Macros:

Detailed Description

Predefined Macros for testing the validity of parameters.


Defines

#define IMOC_TEST_COMM_SEND(comm)
 Tests if invalid communicator in a send-operation.
#define IMOC_TEST_COMM_RECV(comm)
 Tests if invalid communicator in a recv-operation.
#define IMOC_TEST_TAG_SEND(tag)
 Tests if invalid tag in a send-operation.
#define IMOC_TEST_TAG_RECV(tag)
 Tests if invalid tag in a recv-operation.
#define IMOC_TEST_RANK(rank)
 Tests if invalid rank.
#define IMOC_TEST_RANK_RECV(rank)
 Tests if invalid rank in a recv-operation.
#define IMOC_TEST_BYTECOUNT(count)
 Tests if invalid byte-count in a recv-operation.
#define IMOC_TEST_BUFFER(buf)
 Tests if invalid buffer-pointer.
#define IMOC_TEST_PROC_NULL(rank)
 Tests if rank is MOC_PROC_NULL and returns with MOC_SUCCESS itself.
#define IMOC_TEST_PROC_SELF(proc)
 Tests if rank is own rank and returns with MOC_SUCCESS itself.
#define IMOC_TEST_ALIGNMENT(address)
 Tests if address is 16-byte aligned.


Define Documentation

#define IMOC_TEST_ALIGNMENT ( address   ) 

Value:

if ( ((unsigned long)(address)) % 16 != 0 ) \
                                                                                        { return MOC_ERR_BAD_ALIGNMENT; }
Tests if address is 16-byte aligned.

Calls return with appropriate error-code itself.

Definition at line 135 of file imoc_macros.h.

Referenced by MOC_Bsend(), MOC_ISsend(), MOC_Recv(), and MOC_Ssend().

#define IMOC_TEST_BUFFER ( buf   ) 

Value:

if ( (buf) == 0 ) \
                                                                                        { return MOC_ERR_BUFFER; }
Tests if invalid buffer-pointer.

Calls return with appropriate error-code itself.

Definition at line 116 of file imoc_macros.h.

Referenced by MOC_Bsend(), MOC_ISsend(), MOC_Recv(), and MOC_Ssend().

#define IMOC_TEST_BYTECOUNT ( count   ) 

Value:

if ( (count) < 0 || (count) > MAX_MOC_MESSAGE_SIZE ) \
                                                                                        { return MOC_ERR_COUNT; }
Tests if invalid byte-count in a recv-operation.

Calls return with appropriate error-code itself.

Definition at line 109 of file imoc_macros.h.

Referenced by MOC_Bsend(), MOC_Get_data(), MOC_IGet_data(), MOC_IPut_data(), MOC_ISsend(), MOC_Put_data(), MOC_Recv(), and MOC_Ssend().

#define IMOC_TEST_COMM_RECV ( comm   ) 

Value:

if ( (comm) != MOC_COMM_WORLD && (comm) != MOC_COMM_SELF ) \
                                                                                        { return MOC_ERR_COMM; }
Tests if invalid communicator in a recv-operation.

Calls return with appropriate error-code itself.

Definition at line 74 of file imoc_macros.h.

Referenced by MOC_Recv().

#define IMOC_TEST_COMM_SEND ( comm   ) 

Value:

if ( (comm) != MOC_COMM_WORLD && (comm) != MOC_COMM_SELF ) \
                                                                                        { return MOC_ERR_COMM; }
Tests if invalid communicator in a send-operation.

Calls return with appropriate error-code itself.

Definition at line 67 of file imoc_macros.h.

Referenced by MOC_Bsend(), MOC_ISsend(), and MOC_Ssend().

#define IMOC_TEST_PROC_NULL ( rank   ) 

Value:

if ((rank) == MOC_PROC_NULL ) \
                                                                                        { return MOC_SUCCESS; }
Tests if rank is MOC_PROC_NULL and returns with MOC_SUCCESS itself.

Definition at line 122 of file imoc_macros.h.

Referenced by MOC_Bsend(), MOC_ISsend(), MOC_Recv(), and MOC_Ssend().

#define IMOC_TEST_PROC_SELF ( proc   ) 

Value:

if ( (proc) == node_handle.rank ) \
                                                                                        { return MOC_SUCCESS; }
Tests if rank is own rank and returns with MOC_SUCCESS itself.

Definition at line 128 of file imoc_macros.h.

Referenced by MOC_Bsend(), MOC_ISsend(), MOC_Recv(), and MOC_Ssend().

#define IMOC_TEST_RANK ( rank   ) 

Value:

if ( (rank) < 0 || (rank) >= node_handle.comm_size ) \
                                                                                        { return MOC_ERR_RANK; }
Tests if invalid rank.

Calls return with appropriate error-code itself.

Definition at line 95 of file imoc_macros.h.

Referenced by MOC_Bsend(), MOC_Get_data(), MOC_IGet_data(), MOC_IPut_data(), MOC_ISsend(), MOC_Put_data(), and MOC_Ssend().

#define IMOC_TEST_RANK_RECV ( rank   ) 

Value:

if ( rank != MOC_ANY_SOURCE && ((rank) < 0 || (rank) >= node_handle.comm_size) ) \
                                                                                        { return MOC_ERR_RANK; }
Tests if invalid rank in a recv-operation.

Calls return with appropriate error-code itself.

Definition at line 102 of file imoc_macros.h.

Referenced by MOC_Recv().

#define IMOC_TEST_TAG_RECV ( tag   ) 

Value:

if ( (tag)!=MOC_ANY_TAG && ((tag) > 255 || (tag) < 0) ) \
                                                                                        { return MOC_ERR_TAG; }
Tests if invalid tag in a recv-operation.

Calls return with appropriate error-code itself.

Definition at line 88 of file imoc_macros.h.

Referenced by MOC_Recv().

#define IMOC_TEST_TAG_SEND ( tag   ) 

Value:

if ( (tag) > 255 || (tag) < 0 ) \
                                                                                        { return MOC_ERR_TAG; }
Tests if invalid tag in a send-operation.

Calls return with appropriate error-code itself.

Definition at line 81 of file imoc_macros.h.

Referenced by MOC_Bsend(), MOC_ISsend(), and MOC_Ssend().


Generated on Thu Feb 12 13:51:04 2009 for MPI On Cell (Documentation) by  doxygen 1.5.6