NDMeshStreamer: added support for 3D chare arrays
[charm.git] / src / libs / ck-libs / NDMeshStreamer / NDMeshStreamer.ci
1 module NDMeshStreamer {
2   extern module completion;
3
4   include "DataItemTypes.h";
5
6   template<class dtype> 
7   message MeshStreamerMessage {
8     int destinationPes[];
9     dtype data[]; 
10   };
11
12   template<class dtype> group MeshStreamerGroupClient {
13     entry void receiveCombinedData(MeshStreamerMessage<dtype> *msg);
14   };
15
16   template<class dtype> array [1D] MeshStreamerArrayClient {
17     // entry void receiveCombinedData(MeshStreamerMessage<dtype> *msg);
18     entry void receiveRedeliveredItem(dtype data);
19   };
20
21   template<class dtype> array [3D] MeshStreamerArray3DClient {
22     entry void receiveRedeliveredItem(dtype data);
23   };
24
25   template<class dtype> 
26   group MeshStreamer {
27     entry void receiveAlongRoute(MeshStreamerMessage<dtype> *msg);
28     entry void flushDirect();
29     entry void finish();
30     entry void associateCallback(int numContributors, 
31                                  CkCallback startCb, CkCallback endCb, 
32                                  CProxy_CompletionDetector detector);
33   };
34
35   template<class dtype>
36   group GroupMeshStreamer : MeshStreamer<dtype> {
37     entry GroupMeshStreamer(
38           int totalBufferCapacity, int numDimensions, 
39           int dimensionSizes[numDimensions], 
40           const CProxy_MeshStreamerGroupClient<dtype> &clientProxy,
41           bool yieldFlag = 0, double progressPeriodInMs = -1.0);
42   };
43
44   template<class dtype, class ctype, class itype>
45     group ArrayMeshStreamer : MeshStreamer<ArrayDataItem<dtype, itype> > {
46     entry ArrayMeshStreamer(
47           int totalBufferCapacity, int numDimensions, 
48           int dimensionSizes[numDimensions],
49           const ctype &clientProxy,
50           bool yieldFlag = 0, double progressPeriodInMs = -1.0);
51
52     entry void receiveArrayData(
53                MeshStreamerMessage<ArrayDataItem<dtype, itype> > *msg); 
54   };
55
56 };
57