Protecting manytomany definitions with a #define.
[charm.git] / src / conv-core / cmidirectmanytomany.h
1
2 #ifndef   __CMID_MANY_TO_MANY_H__
3 #define   __CMID_MANY_TO_MANY_H__
4
5 #ifndef CMI_DIRECT_MANY_TO_MANY_DEFINED
6 #define CmiDirect_manytomany_allocate_handle ()
7
8 #define CmiDirect_manytomany_initialize_recvbase (a, b, c, d, e, f, g, h)
9
10 #define CmiDirect_manytomany_initialize_recv     (a, b, c, d, e, f)
11
12 #define CmiDirect_manytomany_initialize_sendbase  (a, b, c, d, e, f, g) 
13
14 #define CmiDirect_manytomany_initialize_send (a, b, c, d, e, f)
15
16 #define CmiDirect_manytomany_start (a, b) 
17 #else
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23   typedef  void (* CmiDirectM2mHandler) (void *context);
24   void * CmiDirect_manytomany_allocate_handle ();
25   
26   void   CmiDirect_manytomany_initialize_recvbase ( void                 * handle,
27                                                     unsigned               tag,
28                                                     CmiDirectM2mHandler    donecb,
29                                                     void                 * context,
30                                                     char                 * rcvbuf,
31                                                     unsigned               nranks,
32                                                     unsigned               myIdx );
33   
34   void   CmiDirect_manytomany_initialize_recv ( void          * handle,
35                                                 unsigned        tag,
36                                                 unsigned        index,
37                                                 unsigned        displ,
38                                                 unsigned        bytes,
39                                                 unsigned        rank );
40   
41   void   CmiDirect_manytomany_initialize_sendbase  ( void                 * handle,
42                                                      unsigned               tag,
43                                                      CmiDirectM2mHandler    donecb,
44                                                      void                 * context,
45                                                      char                 * sndbuf,
46                                                      unsigned               nranks,
47                                                      unsigned               myIdx );
48   
49   void   CmiDirect_manytomany_initialize_send ( void        * handle,
50                                                 unsigned      tag, 
51                                                 unsigned      idx,
52                                                 unsigned      displ,
53                                                 unsigned      bytes,
54                                                 unsigned      rank );
55   
56   void   CmiDirect_manytomany_start ( void       * handle,
57                                       unsigned     tag );
58   
59 #ifdef __cplusplus
60 }
61 #endif
62
63 #endif    //end CMI_DIRECT_MANY_TO_MANY_DEFINED
64
65 #endif    //end __CMID_MANY_TO_MANY_H__