Commit 14cff54f authored by Francois Tessier's avatar Francois Tessier

Adapt C and F90 bindings to the new Tapioca API

parent 8999fb86
#include "tapioca_capi.h"
#include "tapioca_singleton.hpp"
void tapioca_init_ ( int64_t *chunkCount, int *chunkSize,
int64_t *chunkOffset, int nChunks, int64_t header, MPI_Comm comm)
void tapioca_init_ ( int64_t *chunkCount, int *chunkSize, int64_t *chunkOffset,
int nChunks, int64_t header, char *fileName, MPI_Comm comm)
{
Tapioca_S::getInstance()->Init ( chunkCount, chunkSize, chunkOffset, nChunks, header, comm );
}
void tapioca_set_aggregation_tier_ ( int nBuffers, mem_t mem, char* fileName )
{
Tapioca_S::getInstance()->setAggregationTier ( nBuffers, mem, fileName );
}
void tapioca_set_target_tier_ ( mem_t mem, int64_t buffSize, char* fileName )
{
Tapioca_S::getInstance()->setTargetTier ( mem, buffSize, fileName );
Tapioca_S::getInstance()->Init ( chunkCount, chunkSize, chunkOffset, nChunks, header, fileName, comm );
}
int tapioca_write_ ( MPI_Offset offset, void *buf, int count,
......
#include "tapioca.hpp"
extern "C" {
void tapioca_init_ ( int64_t *chunkCount, int *chunkSize,
int64_t *chunkOffset, int nChunks, int64_t header, MPI_Comm comm);
void tapioca_set_aggregation_tier_ ( int nBuffers, mem_t mem, char* fileName );
void tapioca_set_target_tier_ ( mem_t mem, int64_t buffSize, char* fileName );
void tapioca_init_ ( int64_t *chunkCount, int *chunkSize, int64_t *chunkOffset,
int nChunks, int64_t header, char *fileName, MPI_Comm comm);
int tapioca_write_ ( MPI_Offset offset, void *buf, int count,
MPI_Datatype datatype, MPI_Status *status );
......
#include "tapioca_f90api.h"
#include "tapioca_singleton.hpp"
void tapioca_init_ ( int64_t *chunkCount, int *chunkSize,
int64_t *chunkOffset, int *nChunks, int64_t *header, MPI_Fint *comm)
void tapioca_init_ ( int64_t *chunkCount, int *chunkSize, int64_t *chunkOffset,
int *nChunks, int64_t *header, char *fileName, MPI_Fint *comm)
{
int nChunks_ = *nChunks;
int64_t header_ = (int64_t)*header;
MPI_Comm comm_ = MPI_Comm_f2c ( *comm );
Tapioca_S::getInstance()->Init ( chunkCount, chunkSize, chunkOffset, nChunks_, header_, comm_ );
}
void tapioca_set_aggregation_tier_ ( int* nBuffers, mem_t* mem, char* fileName )
{
int nBuffers_ = *nBuffers;
mem_t mem_ = *mem;
Tapioca_S::getInstance()->setAggregationTier ( nBuffers_, mem_, fileName );
}
void tapioca_set_target_tier_ ( mem_t* mem, int64_t* buffSize, char* fileName )
{
int64_t buffSize_ = (int64_t)*buffSize;
mem_t mem_ = *mem;
Tapioca_S::getInstance()->setTargetTier ( mem_, buffSize_, fileName );
Tapioca_S::getInstance()->Init ( chunkCount, chunkSize, chunkOffset, nChunks_, header_, fileName, comm_ );
}
int tapioca_write_ ( MPI_Offset* offset, void *buf, int64_t* count,
......
#include "tapioca.hpp"
extern "C" {
void tapioca_init_ ( int64_t *chunkCount, int *chunkSize,
int64_t *chunkOffset, int* nChunks, int64_t* header, MPI_Fint* comm);
void tapioca_set_aggregation_tier_ ( int* nBuffers, mem_t* mem, char* fileName );
void tapioca_set_target_tier_ ( mem_t* mem, int64_t* buffSize, char* fileName );
void tapioca_init_ ( int64_t *chunkCount, int *chunkSize, int64_t *chunkOffset,
int* nChunks, int64_t* header, char *fileName, MPI_Fint* comm);
int tapioca_write_ ( MPI_Offset* offset, void* buf, int64_t* count,
MPI_Fint* datatype, MPI_Status* status );
......
include ../make.inc/Makefile.$(ARCHI)
MPI_CFLAGS = -g -O3 -I../ -I. -I../architectures -I../architectures/$(ARCHI)
MPI_CFLAGS = -g -O3 -I../ -I. -I../architectures -I../architectures/$(ARCHI) -I../architectures/$(ARCHI)/include/
MPI_CFLAGS += -DDBG -DCOLOR #-DTIMING
TP_INCLUDE = ../architectures/tp_network_interface.hpp \
TP_INCLUDE = ../architectures/tp_topology_interface.hpp \
../architectures/tp_memory_interface.hpp \
../architectures/$(ARCHI)/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment