Geant4 Cross Reference |
1 // Copyright (C) 2010, Guy Barrand. All rights 1 // Copyright (C) 2010, Guy Barrand. All rights reserved. 2 // See the file tools.license for terms. 2 // See the file tools.license for terms. 3 3 4 #ifndef tools_impi 4 #ifndef tools_impi 5 #define tools_impi 5 #define tools_impi 6 6 7 #include <string> 7 #include <string> 8 #include <vector> 8 #include <vector> 9 9 10 #include "typedefs" 10 #include "typedefs" 11 11 12 namespace tools { 12 namespace tools { 13 13 14 class impi { 14 class impi { 15 public: 15 public: 16 virtual ~impi(){} 16 virtual ~impi(){} 17 public: 17 public: 18 virtual bool pack(char) = 0; 18 virtual bool pack(char) = 0; 19 virtual bool pack(short) = 0; 19 virtual bool pack(short) = 0; 20 virtual bool pack(int) = 0; 20 virtual bool pack(int) = 0; 21 virtual bool pack(unsigned int) = 0; 21 virtual bool pack(unsigned int) = 0; 22 virtual bool pack(uint64) = 0; 22 virtual bool pack(uint64) = 0; 23 virtual bool pack(int64) = 0; 23 virtual bool pack(int64) = 0; 24 virtual bool pack(float) = 0; 24 virtual bool pack(float) = 0; 25 virtual bool pack(double) = 0; 25 virtual bool pack(double) = 0; 26 virtual bool bpack(bool) = 0; 26 virtual bool bpack(bool) = 0; 27 virtual bool spack(const std::string&) = 0; 27 virtual bool spack(const std::string&) = 0; 28 virtual bool vpack(const std::vector<unsigne 28 virtual bool vpack(const std::vector<unsigned int>&) = 0; 29 virtual bool vpack(const std::vector<int>&) 29 virtual bool vpack(const std::vector<int>&) = 0; 30 virtual bool vpack(const std::vector<double> 30 virtual bool vpack(const std::vector<double>&) = 0; 31 virtual bool pack(uint32,const char*) = 0; 31 virtual bool pack(uint32,const char*) = 0; 32 virtual bool pack(uint32,const int*) = 0; 32 virtual bool pack(uint32,const int*) = 0; 33 33 34 virtual bool unpack(char&) = 0; 34 virtual bool unpack(char&) = 0; 35 virtual bool unpack(short&) = 0; 35 virtual bool unpack(short&) = 0; 36 virtual bool unpack(int&) = 0; 36 virtual bool unpack(int&) = 0; 37 virtual bool unpack(unsigned int&) = 0; 37 virtual bool unpack(unsigned int&) = 0; 38 virtual bool unpack(uint64&) = 0; 38 virtual bool unpack(uint64&) = 0; 39 virtual bool unpack(int64&) = 0; 39 virtual bool unpack(int64&) = 0; 40 virtual bool unpack(float&) = 0; 40 virtual bool unpack(float&) = 0; 41 virtual bool unpack(double&) = 0; 41 virtual bool unpack(double&) = 0; 42 virtual bool bunpack(bool&) = 0; 42 virtual bool bunpack(bool&) = 0; 43 virtual bool sunpack(std::string&) = 0; 43 virtual bool sunpack(std::string&) = 0; 44 virtual bool vunpack(std::vector<unsigned in 44 virtual bool vunpack(std::vector<unsigned int>&) = 0; 45 virtual bool vunpack(std::vector<int>&) = 0; 45 virtual bool vunpack(std::vector<int>&) = 0; 46 virtual bool vunpack(std::vector<double>&) = 46 virtual bool vunpack(std::vector<double>&) = 0; 47 virtual bool unpack(uint32&,char*&) = 0; 47 virtual bool unpack(uint32&,char*&) = 0; 48 virtual bool unpack(uint32&,int*&) = 0; 48 virtual bool unpack(uint32&,int*&) = 0; 49 49 50 virtual void pack_reset() = 0; 50 virtual void pack_reset() = 0; 51 virtual bool send_buffer(int,int) = 0; 51 virtual bool send_buffer(int,int) = 0; 52 52 53 virtual bool wait_buffer(int rank,int src,in 53 virtual bool wait_buffer(int rank,int src,int tag,int& probe_src,bool verbose = false) = 0; 54 virtual bool wait_buffer(int rank,int tag,in 54 virtual bool wait_buffer(int rank,int tag,int& probe_src,bool verbose = false) = 0; //MPI_ANY_SOURCE. 55 }; 55 }; 56 56 57 } 57 } 58 58 59 #endif 59 #endif