00001 #ifndef _CONV_CPATH_H
00002 #define _CONV_CPATH_H
00003
00004 #ifdef __cplusplus
00005 extern "C" {
00006 #endif
00007
00008
00009 #include "converse.h"
00010
00011 typedef struct
00012 {
00013 int seqno;
00014 short creator;
00015 short startfn;
00016 short mapfn;
00017 short nsizes;
00018 int sizes[13];
00019 }
00020 CPath;
00021
00022 #define CPathArrayDimensions(a) ((a)->nsizes)
00023 #define CPathArrayDimension(a,n) ((a)->sizes[n])
00024
00025 #define CPATH_WILD (-1)
00026
00027 typedef unsigned int (*CPathMapFn)(CPath *path, int *indices);
00028 typedef void (*CPathReduceFn)(int nelts,void *updateme,void *inputme);
00029
00030 #define CPathRegisterMapper(x) CmiRegisterHandler((CmiHandler)(x))
00031 #define CPathRegisterThreadFn(x) CmiRegisterHandler((CmiHandler)(x))
00032 #define CPathRegisterReducer(x) CmiRegisterHandler((CmiHandler)(x))
00033
00034 void CPathMakeArray(CPath *path, int startfn, int mapfn, ...);
00035 void CPathMakeThread(CPath *path, int startfn, int pe);
00036
00037 void CPathSend(int key, ...);
00038 void *CPathRecv(int key, ...);
00039 void CPathReduce(int key, ...);
00040
00041 void CPathMsgDecodeBytes(void *msg, int *len, void *bytes);
00042 void CPathMsgDecodeReduction(void *msg,int *vecsize,int *eltsize,void *bytes);
00043 void CPathMsgFree(void *msg);
00044
00045 #define CPATH_ALL (-1)
00046 #define CPATH_END 0
00047 #define CPATH_DEST 1
00048 #define CPATH_DESTELT 2
00049 #define CPATH_TAG 3
00050 #define CPATH_TAGS 4
00051 #define CPATH_TAGVEC 5
00052 #define CPATH_BYTES 6
00053 #define CPATH_OVER 7
00054 #define CPATH_REDUCER 8
00055 #define CPATH_REDBYTES 9
00056
00057 #ifdef __cplusplus
00058 }
00059 #endif
00060
00061 #endif