📄 mpicxx.h
字号:
Comm *v3 = new Comm; MPIX_CALL( MPI_Comm_create( (MPI_Comm) the_real_comm, (MPI_Group)(v2.the_real_group), &(v3->the_real_comm) )); return *v3; } void Bcast( void* v1, int v2, Datatype v3, int v4 ) { MPIX_CALL( MPI_Bcast( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, (MPI_Comm) the_real_comm )); } void Barrier( void ) { MPIX_CALL( MPI_Barrier( (MPI_Comm) the_real_comm )); } void Alltoall( void* v1, int v2, Datatype v3, void* v4, int v5, Datatype v6 ) { MPIX_CALL( MPI_Alltoall( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Datatype)(v6.the_real_datatype), (MPI_Comm) the_real_comm )); } void Gather( void* v1, int v2, Datatype v3, void* v4, int v5, Datatype v6, int v7 ) { MPIX_CALL( MPI_Gather( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Datatype)(v6.the_real_datatype), v7, (MPI_Comm) the_real_comm )); } Comm Create_intercomm( int v2, Comm v3, int v4, int v5 ) { Comm *v6 = new Comm; MPIX_CALL( MPI_Intercomm_create( (MPI_Comm) the_real_comm, v2, (MPI_Comm)(v3.the_real_comm), v4, v5, &(v6->the_real_comm) )); return *v6; } void Reduce_scatter( void* v1, void* v2, int * v3, Datatype v4, Op v5 ) { MPIX_CALL( MPI_Reduce_scatter( v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op)(v5.the_real_op), (MPI_Comm) the_real_comm )); } void Scatterv( void* v1, int * v2, int * v3, Datatype v4, void* v5, int v6, Datatype v7, int v8 ) { MPIX_CALL( MPI_Scatterv( v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), v5, v6, (MPI_Datatype)(v7.the_real_datatype), v8, (MPI_Comm) the_real_comm )); } void Allgather( void* v1, int v2, Datatype v3, void* v4, int v5, Datatype v6 ) { MPIX_CALL( MPI_Allgather( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Datatype)(v6.the_real_datatype), (MPI_Comm) the_real_comm )); } Comm Dup( void ) { Comm *v2 = new Comm; MPIX_CALL( MPI_Comm_dup( (MPI_Comm) the_real_comm, &(v2->the_real_comm) )); return *v2; } void Reduce( void* v1, void* v2, int v3, Datatype v4, Op v5, int v6 ) { MPIX_CALL( MPI_Reduce( v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op)(v5.the_real_op), v6, (MPI_Comm) the_real_comm )); } void Scan( void* v1, void* v2, int v3, Datatype v4, Op v5 ) { MPIX_CALL( MPI_Scan( v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op)(v5.the_real_op), (MPI_Comm) the_real_comm )); } void Alltoallv( void* v1, int * v2, int * v3, Datatype v4, void* v5, int * v6, int * v7, Datatype v8 ) { MPIX_CALL( MPI_Alltoallv( v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), v5, v6, v7, (MPI_Datatype)(v8.the_real_datatype), (MPI_Comm) the_real_comm )); } Comm Create_cart( int v2, int * v3, int * v4, int v5 ) { Comm *v6 = new Comm; MPIX_CALL( MPI_Cart_create( (MPI_Comm) the_real_comm, v2, v3, v4, v5, &(v6->the_real_comm) )); return *v6; } void Allreduce( void* v1, void* v2, int v3, Datatype v4, Op v5 ) { MPIX_CALL( MPI_Allreduce( v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op)(v5.the_real_op), (MPI_Comm) the_real_comm )); } Comm Split( int v2, int v3 ) { Comm *v4 = new Comm; MPIX_CALL( MPI_Comm_split( (MPI_Comm) the_real_comm, v2, v3, &(v4->the_real_comm) )); return *v4; } void Allgatherv( void* v1, int v2, Datatype v3, void* v4, int * v5, int * v6, Datatype v7 ) { MPIX_CALL( MPI_Allgatherv( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, v6, (MPI_Datatype)(v7.the_real_datatype), (MPI_Comm) the_real_comm )); } void Scatter( void* v1, int v2, Datatype v3, void* v4, int v5, Datatype v6, int v7 ) { MPIX_CALL( MPI_Scatter( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Datatype)(v6.the_real_datatype), v7, (MPI_Comm) the_real_comm )); } void Gatherv( void* v1, int v2, Datatype v3, void* v4, int * v5, int * v6, Datatype v7, int v8 ) { MPIX_CALL( MPI_Gatherv( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, v6, (MPI_Datatype)(v7.the_real_datatype), v8, (MPI_Comm) the_real_comm )); } Comm Create_graph( int v2, int * v3, int * v4, int v5 ) { Comm *v6 = new Comm; MPIX_CALL( MPI_Graph_create( (MPI_Comm) the_real_comm, v2, v3, v4, v5, &(v6->the_real_comm) )); return *v6; } void Exscan( void * v1, void * v2, int v3, Datatype v4, Op v5 ) { MPIX_CALL( MPI_Exscan( v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op)(v5.the_real_op), (MPI_Comm) the_real_comm )); }};class Grequest : public Request { protected: MPI_Request the_real_grequest; public: // new/delete inline Grequest(MPI_Request obj) { the_real_grequest = obj; } inline Grequest(void) {the_real_grequest = MPI_REQUEST_NULL;} virtual ~Grequest() {} // copy/assignment Grequest :: Grequest(const Grequest &obj) { the_real_grequest = obj.the_real_grequest; } Grequest& Grequest::operator=(const Grequest &obj) { the_real_grequest = obj.the_real_grequest; return *this; } // logical bool operator== (const Grequest &obj) { return (the_real_grequest == obj.the_real_grequest); } bool operator!= (const Grequest &obj) { return (the_real_grequest != obj.the_real_grequest); } // C/C++ cast and assignment inline operator MPI_Request*() { return &the_real_grequest; } inline operator MPI_Request() { return the_real_grequest; } Grequest& Grequest::operator=(const MPI_Request& obj) { the_real_grequest = obj; return *this; }};class Win { friend class Datatype; protected: MPI_Win the_real_win; public: // new/delete inline Win(MPI_Win obj) { the_real_win = obj; } inline Win(void) {the_real_win = MPI_WIN_NULL;} virtual ~Win() {} // copy/assignment Win :: Win(const Win &obj) { the_real_win = obj.the_real_win; } Win& Win::operator=(const Win &obj) { the_real_win = obj.the_real_win; return *this; } // logical bool operator== (const Win &obj) { return (the_real_win == obj.the_real_win); } bool operator!= (const Win &obj) { return (the_real_win != obj.the_real_win); } // C/C++ cast and assignment inline operator MPI_Win*() { return &the_real_win; } inline operator MPI_Win() { return the_real_win; } Win& Win::operator=(const MPI_Win& obj) { the_real_win = obj; return *this; }};class Graphcomm : public Intracomm { protected: MPI_Comm the_real_graphcomm; public: // new/delete inline Graphcomm(MPI_Comm obj) { the_real_graphcomm = obj; } inline Graphcomm(void) {the_real_graphcomm = MPI_COMM_NULL;} virtual ~Graphcomm() {} // copy/assignment Graphcomm :: Graphcomm(const Graphcomm &obj) { the_real_graphcomm = obj.the_real_graphcomm; } Graphcomm& Graphcomm::operator=(const Graphcomm &obj) { the_real_graphcomm = obj.the_real_graphcomm; return *this; } // logical bool operator== (const Graphcomm &obj) { return (the_real_graphcomm == obj.the_real_graphcomm); } bool operator!= (const Graphcomm &obj) { return (the_real_graphcomm != obj.the_real_graphcomm); } // C/C++ cast and assignment inline operator MPI_Comm*() { return &the_real_graphcomm; } inline operator MPI_Comm() { return the_real_graphcomm; } Graphcomm& Graphcomm::operator=(const MPI_Comm& obj) { the_real_graphcomm = obj; return *this; } void Map( int v2, int * v3, int * v4, int * v5 ) { MPIX_CALL( MPI_Graph_map( (MPI_Comm) the_real_graphcomm, v2, v3, v4, v5 )); } void Get_topo( int * v2 ) { MPIX_CALL( MPI_Topo_test( (MPI_Comm) the_real_graphcomm, v2 )); } void Get_neighbors( int v2, int v3, int * v4 ) { MPIX_CALL( MPI_Graph_neighbors( (MPI_Comm) the_real_graphcomm, v2, v3, v4 )); } int Get_neighbors_count( int v2 ) { int v3; MPIX_CALL( MPI_Graph_neighbors_count( (MPI_Comm) the_real_graphcomm, v2, &v3 )); return v3; } void Get_dims( int * v2, int * v3 ) { MPIX_CALL( MPI_Graphdims_get( (MPI_Comm) the_real_graphcomm, v2, v3 )); }};class Cartcomm : public Intracomm { protected: MPI_Comm the_real_cartcomm; public: // new/delete inline Cartcomm(MPI_Comm obj) { the_real_cartcomm = obj; } inline Cartcomm(void) {the_real_cartcomm = MPI_COMM_NULL;} virtual ~Cartcomm() {} // copy/assignment Cartcomm :: Cartcomm(const Cartcomm &obj) { the_real_cartcomm = obj.the_real_cartcomm; } Cartcomm& Cartcomm::operator=(const Cartcomm &obj) { the_real_cartcomm = obj.the_real_cartcomm; return *this; } // logical bool operator== (const Cartcomm &obj) { return (the_real_cartcomm == obj.the_real_cartcomm); } bool operator!= (const Cartcomm &obj) { return (the_real_cartcomm != obj.the_real_cartcomm); } // C/C++ cast and assignment inline operator MPI_Comm*() { return &the_real_cartcomm; } inline operator MPI_Comm() { return the_real_cartcomm; } Cartcomm& Cartcomm::operator=(const MPI_Comm& obj) { the_real_cartcomm = obj; return *this; } int Get_cart_rank( int * v3 ) { int v2; MPIX_CALL( MPI_Cart_rank( (MPI_Comm) the_real_cartcomm, &v2, v3 )); return v2; } void Map( int v2, int * v3, int * v4, int * v5 ) { MPIX_CALL( MPI_Cart_map( (MPI_Comm) the_real_cartcomm, v2, v3, v4, v5 )); } int Shift( int v2, int v3, int * v5 ) { int v4; MPIX_CALL( MPI_Cart_shift( (MPI_Comm) the_real_cartcomm, v2, v3, &v4, v5 )); return v4; } int Get_topo( void ) { int v2; MPIX_CALL( MPI_Topo_test( (MPI_Comm) the_real_cartcomm, &v2 )); return v2; } Comm Sub( int * v2 ) { Comm *v3 = new Comm; MPIX_CALL( MPI_Cart_sub( (MPI_Comm) the_real_cartcomm, v2, &(v3->the_real_comm) )); return *v3; } int Get_dim( void ) { int v2; MPIX_CALL( MPI_Cartdim_get( (MPI_Comm) the_real_cartcomm, &v2 )); return v2; } Comm Dup( void ) { Comm *v2 = new Comm; MPIX_CALL( MPI_Comm_dup( (MPI_Comm) the_real_cartcomm, &(v2->the_real_comm) )); return *v2; }};extern Datatype MPI::CHAR;extern Datatype MPI::UNSIGNED_CHAR;extern Datatype MPI::BYTE;extern Datatype MPI::SHORT;extern Datatype MPI::UNSIGNED_SHORT;extern Datatype MPI::INT;extern Datatype MPI::UNSIGNED;extern Datatype MPI::LONG;extern Datatype MPI::UNSIGNED_LONG;extern Datatype MPI::FLOAT;extern Datatype MPI::DOUBLE;extern Datatype MPI::LONG_DOUBLE;extern Datatype MPI::LONG_LONG_INT;extern Datatype MPI::LONG_LONG;extern Datatype MPI::PACKED;extern Datatype MPI::LB;extern Datatype MPI::UB;extern Datatype MPI::FLOAT_INT;extern Datatype MPI::DOUBLE_INT;extern Datatype MPI::LONG_INT;extern Datatype MPI::SHORT_INT;extern Datatype MPI::LONG_DOUBLE_INT;extern Datatype MPI::TWOINT;extern const Op MPI::MAX;extern const Op MPI::MIN;extern const Op MPI::SUM;extern const Op MPI::PROD;extern const Op MPI::LAND;extern const Op MPI::BAND;extern const Op MPI::LOR;extern const Op MPI::BOR;extern const Op MPI::LXOR;extern const Op MPI::BXOR;extern const Op MPI::MINLOC;extern const Op MPI::MAXLOC;extern const Op MPI::REPLACE;extern Intracomm MPI::COMM_WORLD;extern Intracomm MPI::COMM_SELF;extern const Comm MPI::COMM_NULL;extern const Group MPI::GROUP_EMPTY;extern void Init(void);extern void Finalize(void);} // namespace MPI
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -