LAMA
|
00001 00033 #ifndef LAMA_GPIINTERFACE_HPP_ 00034 #define LAMA_GPIINTERFACE_HPP_ 00035 //#define OSH_VERBOSE_DEBUG 00036 00037 #include <lama/pgas/PGASInterface.hpp> 00038 #include <lama/pgas/PGASAllocator.hpp> 00039 #include <lama/pgas/PGASSyncToken.hpp> 00040 00041 namespace lama{ 00042 class GPIInterface: public lama::PGASInterface 00043 { 00044 public: 00045 GPIInterface(); 00046 virtual ~GPIInterface(); 00047 virtual void* allocate(size_t size) const; 00048 virtual void free(void* ptr, const size_t size) const; 00049 virtual void syncronizeAll() const; 00050 virtual bool isPinned(const void* const ptr) const; 00051 virtual PGASSyncToken* getSyncToken(int arg1) const; 00052 virtual PartitionId getRank() const; 00053 virtual PartitionId getSize() const; 00054 00055 virtual PGASCommunicationKind getPreferredCommunicationKind() const; 00056 00057 virtual void get(void* dst, const void* src, size_t length, int srcpe) const; 00058 virtual void put(void* dst, const void* src, size_t length, int srcpe) const; 00059 00060 virtual void writeAt( std::ostream& stream ) const; 00061 PartitionId mRank; 00062 PartitionId mSize; 00063 PGASAllocator * mAllocator; 00064 private: 00065 static long mAllocated; 00066 static long mBarrierNum; 00067 long* pSync; 00068 void* pWork; 00069 LAMA_LOG_DECL_STATIC_LOGGER( logger ); 00070 }; 00071 } 00072 00073 #endif // LAMA_GPIINTERFACE_HPP_