tapioca_capi.cpp 1.06 KB
Newer Older
1
#include "tapioca_capi.h"
2
#include "tapioca_singleton.hpp"
3

4 5
void tapioca_init_ ( int64_t *chunkCount, int *chunkSize,
		     int64_t *chunkOffset, int nChunks, int64_t header, MPI_Comm comm) 
6
{
7
  Tapioca_S::getInstance()->Init ( chunkCount, chunkSize, chunkOffset, nChunks, header, comm );
8 9
}

10
void tapioca_set_aggregation_tier_ ( int nBuffers, mem_t mem, char* fileName ) 
11
{
12
  Tapioca_S::getInstance()->setAggregationTier ( nBuffers, mem, fileName );
13 14
}

15
void tapioca_set_target_tier_ ( mem_t mem, int64_t buffSize, char* fileName )
16
{
17
  Tapioca_S::getInstance()->setTargetTier ( mem, buffSize, fileName );
18 19
}

20 21
int tapioca_write_ ( MPI_Offset offset, void *buf, int count,
		     MPI_Datatype datatype, MPI_Status *status )
22
{
23
  return Tapioca_S::getInstance()->Write ( offset, buf, count, datatype, status );
24 25
}

26 27
int tapioca_read_  ( MPI_Offset offset, void *buf, int count,
		     MPI_Datatype datatype, MPI_Status *status )
28
{
29
  return Tapioca_S::getInstance()->Read ( offset, buf, count, datatype, status );
30 31
}

32
void tapioca_finalize_ ( )
33
{
34
  Tapioca_S::getInstance()->Finalize ();
35
}