#ifndef TP_MEMORY_H #define TP_MEMORY_H #include #include #include #include #include #include #include #include #include #include "tp_utils.hpp" #include "tp_memory_interface.hpp" class Memory: public iMemory { public: Memory ( ); ~Memory ( ); /**********************/ /* |-- Allocation */ /**********************/ void memAlloc ( int64_t buffSize, mem_t mem, bool masterRank, char* fileName, MPI_Comm comm ); void memFree ( ); /**********************/ /* |-- I/O */ /**********************/ int memWrite ( void* srcBuffer, int64_t srcSize, int64_t offset, int destRank ); int memRead ( void* srcBuffer, int64_t srcSize, int64_t offset, int destRank ); int memFlush ( ); int memUncache ( ); /**********************/ /* |-- Utils */ /**********************/ char* memName ( ); mem_t memType ( char* name ); /************************/ /* |-- Characteristics */ /************************/ int64_t memBandwidth ( ); int64_t memLatency ( ); int64_t memCapacity ( ); bool memPersistency ( ); }; #endif // TP_MEMORY_H