NDMeshStreamer: checking in a working version of the array interface
[charm.git] / src / libs / ck-libs / NDMeshStreamer / NDMeshStreamer.ci
index 4043b7ae88a48774120ffd529b659d8b81063602..629d992c75c2d59189b02933ead7bdab52a1d391 100644 (file)
@@ -1,15 +1,22 @@
 module NDMeshStreamer {
 
+  include "DataItemTypes.h";
+
   template<class dtype> 
   message MeshStreamerMessage {
     int destinationPes[];
     dtype data[]; 
   };
 
-  template<class dtype> group MeshStreamerClient {
+  template<class dtype> group MeshStreamerGroupClient {
     entry void receiveCombinedData(MeshStreamerMessage<dtype> *msg);
   };
 
+  template<class dtype> array [1D] MeshStreamerArrayClient {
+    // entry void receiveCombinedData(MeshStreamerMessage<dtype> *msg);
+    entry void process(dtype &data);
+  };
+
   template<class dtype> 
   group MeshStreamer {
     entry void receiveAlongRoute(MeshStreamerMessage<dtype> *msg);
@@ -19,11 +26,25 @@ module NDMeshStreamer {
 
   template<class dtype>
   group GroupMeshStreamer : MeshStreamer<dtype> {
-    entry GroupMeshStreamer(int totalBufferCapacity, int numDimensions, 
-                           int dimensionSizes[numDimensions]
-                           const CProxy_MeshStreamerClient<dtype> &clientProxy,
-                           int yieldFlag = 0, 
-                           double progressPeriodInMs = -1.0);
+    entry GroupMeshStreamer(
+         int totalBufferCapacity, int numDimensions
+         int dimensionSizes[numDimensions], 
+         const CProxy_MeshStreamerGroupClient<dtype> &clientProxy,
+         int yieldFlag = 0, double progressPeriodInMs = -1.0);
   };
+
+
+  template<class dtype>
+    group ArrayMeshStreamer : MeshStreamer<ArrayDataItem<dtype> > {
+    entry ArrayMeshStreamer(
+         int totalBufferCapacity, int numDimensions, 
+         int dimensionSizes[numDimensions],
+         const CProxy_MeshStreamerArrayClient<dtype> &clientProxy,
+         int yieldFlag = 0, double progressPeriodInMs = -1.0);
+
+    entry void receiveArrayData(
+              MeshStreamerMessage<ArrayDataItem<dtype> > *msg); 
+  };
+
 };