bbsmpipack.h

Go to the documentation of this file.
00001 #ifndef bbsmpipack_h
00002 #define bbsmpipack_h
00003 #include <nrnmpiuse.h>
00004 #if NRNMPI
00005 #if defined(__cplusplus)
00006 extern "C" {
00007 #endif
00008 
00009 typedef struct bbsmpibuf {
00010    char* buf;
00011    int size;
00012    int pkposition;
00013    int upkpos;
00014    int keypos;
00015    int refcount;
00016 } bbsmpibuf;
00017 
00018 extern bbsmpibuf* nrnmpi_newbuf(int size);
00019 extern void nrnmpi_copy(bbsmpibuf* dest, bbsmpibuf* src);
00020 extern void nrnmpi_ref(bbsmpibuf* buf);
00021 extern void nrnmpi_unref(bbsmpibuf* buf);
00022 
00023 extern void nrnmpi_upkbegin(bbsmpibuf* buf);
00024 extern char* nrnmpi_getkey(bbsmpibuf* buf);
00025 extern int nrnmpi_getid(bbsmpibuf* buf);
00026 extern int nrnmpi_upkint(bbsmpibuf* buf);
00027 extern double nrnmpi_upkdouble(bbsmpibuf* buf);
00028 extern void nrnmpi_upkvec(int n, double* x, bbsmpibuf* buf);
00029 extern char* nrnmpi_upkstr(bbsmpibuf* buf);
00030 extern char* nrnmpi_upkpickle(size_t* size, bbsmpibuf* buf);
00031 
00032 extern void nrnmpi_pkbegin(bbsmpibuf* buf);
00033 extern void nrnmpi_enddata(bbsmpibuf* buf);
00034 extern void nrnmpi_pkint(int i, bbsmpibuf* buf);
00035 extern void nrnmpi_pkdouble(double x, bbsmpibuf* buf);
00036 extern void nrnmpi_pkvec(int n, double* x, bbsmpibuf* buf);
00037 extern void nrnmpi_pkstr(const char* s, bbsmpibuf* buf);
00038 extern void nrnmpi_pkpickle(const char* s, size_t size, bbsmpibuf* buf);
00039 
00040 extern int nrnmpi_iprobe(int* size, int* tag, int* source);
00041 extern void nrnmpi_bbssend(int dest, int tag, bbsmpibuf* r);
00042 extern int nrnmpi_bbsrecv(int source, bbsmpibuf* r);
00043 extern int nrnmpi_bbssendrecv(int dest, int tag, bbsmpibuf* s, bbsmpibuf* r);
00044 
00045 #if defined(__cplusplus)
00046 }
00047 #endif
00048 #endif
00049 #endif
Generated on Mon Jun 13 08:10:26 2011 for NEURON by  doxygen 1.6.3