📄 mpicxx.h.in
字号:
Info& operator=(const Info &obj) { the_real_info = obj.the_real_info; return *this; } // logical bool operator== (const Info &obj) { return (the_real_info == obj.the_real_info); } bool operator!= (const Info &obj) { return (the_real_info != obj.the_real_info); } // C/C++ cast and assignment inline operator MPI_Info*() { return &the_real_info; } inline operator MPI_Info() const { return the_real_info; } Info& operator=(const MPI_Info& obj) { the_real_info = obj; return *this; } virtual void Delete( const char * v2 ) { MPIX_CALL( MPI_Info_delete( (MPI_Info) the_real_info, (char *)v2 )); } virtual void Get_nthkey( int v2, char * v3 ) const { MPIX_CALL( MPI_Info_get_nthkey( (MPI_Info) the_real_info, v2, v3 )); } virtual void Free( void ) { MPIX_CALL( MPI_Info_free( (MPI_Info *) &the_real_info )); } static Info Create( void ) { Info v1; MPIX_CALL( MPI_Info_create( &(v1.the_real_info) )); return v1; } virtual void Set( const char * v2, const char * v3 ) { MPIX_CALL( MPI_Info_set( (MPI_Info) the_real_info, (char *)v2, (char *)v3 )); } Info Dup( void ) const { Info v2; MPIX_CALL( MPI_Info_dup( (MPI_Info) the_real_info, &(v2.the_real_info) )); return v2; } virtual bool Get_valuelen( const char * v2, int &v3 ) const { int v4; MPIX_CALL( MPI_Info_get_valuelen( (MPI_Info) the_real_info, (char *)v2, &v3, &v4 )); return v4!= 0; } virtual bool Get( const char * v2, int v3, char * v4 ) const { int v5; MPIX_CALL( MPI_Info_get( (MPI_Info) the_real_info, (char *)v2, v3, v4, &v5 )); return v5!= 0; } virtual int Get_nkeys( void ) const { int v2; MPIX_CALL( MPI_Info_get_nkeys( (MPI_Info) the_real_info, &v2 )); return v2; }};class Status { friend class Comm; friend class File; friend class Request; protected: MPI_Status the_real_status; public: // new/delete inline Status(MPI_Status obj) : the_real_status(obj) {} inline Status(void) : the_real_status() {} virtual ~Status() {} // copy/assignment Status(const Status &obj) : the_real_status(obj.the_real_status){} Status& operator=(const Status &obj) { the_real_status = obj.the_real_status; return *this; } // C/C++ cast and assignment inline operator MPI_Status*() { return &the_real_status; } inline operator MPI_Status() const { return the_real_status; } Status& operator=(const MPI_Status& obj) { the_real_status = obj; return *this; } virtual bool Is_cancelled( void ) const { int v2; MPIX_CALL( MPI_Test_cancelled( (MPI_Status *) &the_real_status, &v2 )); return v2!= 0; } virtual int Get_elements( const Datatype &v2 ) const { int v3; MPIX_CALL( MPI_Get_elements( (MPI_Status *) &the_real_status, (MPI_Datatype)(v2.the_real_datatype), &v3 )); return v3; } virtual int Get_count( const Datatype &v2 ) const { int v3; MPIX_CALL( MPI_Get_count( (MPI_Status *) &the_real_status, (MPI_Datatype)(v2.the_real_datatype), &v3 )); return v3; } virtual void Set_cancelled( bool v2 ) { int l2; l2 = (v2 == true) ? 1 : 0; MPIX_CALL( MPI_Status_set_cancelled( (MPI_Status *) &the_real_status, l2 )); } virtual void Set_elements( const Datatype &v2, int v3 ) { MPIX_CALL( MPI_Status_set_elements( (MPI_Status *) &the_real_status, (MPI_Datatype)(v2.the_real_datatype), v3 )); } int Get_source(void) const { return the_real_status.MPI_SOURCE; } int Get_tag(void) const { return the_real_status.MPI_TAG; } int Get_error(void) const { return the_real_status.MPI_ERROR; } void Set_source(int source) { the_real_status.MPI_SOURCE = source; } void Set_tag(int tag) { the_real_status.MPI_TAG = tag; } void Set_error(int error) { the_real_status.MPI_ERROR = error; }};class Group { friend class Comm; friend class Intracomm; friend class Intercomm; friend class Win; friend class File; protected: MPI_Group the_real_group; public: // new/delete inline Group(MPI_Group obj) : the_real_group(obj) {} inline Group(void) : the_real_group(MPI_GROUP_NULL) {} virtual ~Group() {} // copy/assignment Group(const Group &obj) : the_real_group(obj.the_real_group){} Group& operator=(const Group &obj) { the_real_group = obj.the_real_group; return *this; } // logical bool operator== (const Group &obj) { return (the_real_group == obj.the_real_group); } bool operator!= (const Group &obj) { return (the_real_group != obj.the_real_group); } // C/C++ cast and assignment inline operator MPI_Group*() { return &the_real_group; } inline operator MPI_Group() const { return the_real_group; } Group& operator=(const MPI_Group& obj) { the_real_group = obj; return *this; } virtual Group Excl( int v2, const int * v3 ) const { Group v4; MPIX_CALL( MPI_Group_excl( (MPI_Group) the_real_group, v2, (int *)v3, &(v4.the_real_group) )); return v4; } virtual int Get_rank( void ) const { int v2; MPIX_CALL( MPI_Group_rank( (MPI_Group) the_real_group, &v2 )); return v2; } virtual void Free( void ) { MPIX_CALL( MPI_Group_free( (MPI_Group *) &the_real_group )); } static Group Union( const Group &v1, const Group &v2 ) { Group v3; MPIX_CALL( MPI_Group_union( (MPI_Group)(v1.the_real_group), (MPI_Group)(v2.the_real_group), &(v3.the_real_group) )); return v3; } static Group Intersect( const Group &v1, const Group &v2 ) { Group v3; MPIX_CALL( MPI_Group_intersection( (MPI_Group)(v1.the_real_group), (MPI_Group)(v2.the_real_group), &(v3.the_real_group) )); return v3; } virtual Group Range_excl( int v2, const int v3[][3] ) const { Group v4; MPIX_CALL( MPI_Group_range_excl( (MPI_Group) the_real_group, v2, (int (*)[3])v3, &(v4.the_real_group) )); return v4; } virtual Group Range_incl( int v2, const int v3[][3] ) const { Group v4; MPIX_CALL( MPI_Group_range_incl( (MPI_Group) the_real_group, v2, (int (*)[3])v3, &(v4.the_real_group) )); return v4; } static Group Difference( const Group &v1, const Group &v2 ) { Group v3; MPIX_CALL( MPI_Group_difference( (MPI_Group)(v1.the_real_group), (MPI_Group)(v2.the_real_group), &(v3.the_real_group) )); return v3; } static void Translate_ranks( const Group &v1, int v2, const int * v3, const Group &v4, int * v5 ) { MPIX_CALL( MPI_Group_translate_ranks( (MPI_Group)(v1.the_real_group), v2, (int *)v3, (MPI_Group)(v4.the_real_group), v5 )); } virtual Group Incl( int v2, const int * v3 ) const { Group v4; MPIX_CALL( MPI_Group_incl( (MPI_Group) the_real_group, v2, (int *)v3, &(v4.the_real_group) )); return v4; } virtual int Get_size( void ) const { int v2; MPIX_CALL( MPI_Group_size( (MPI_Group) the_real_group, &v2 )); return v2; } static int Compare( const Group &v1, const Group &v2 ) { int v3; MPIX_CALL( MPI_Group_compare( (MPI_Group)(v1.the_real_group), (MPI_Group)(v2.the_real_group), &v3 )); return v3; }};class Op { friend class Intracomm; friend class Intercomm; friend class Win; friend class Comm; protected: MPI_Op the_real_op; public: // new/delete inline Op(MPI_Op obj) : the_real_op(obj) {} inline Op(void) : the_real_op(MPI_OP_NULL) {} virtual ~Op() {} // copy/assignment Op(const Op &obj) : the_real_op(obj.the_real_op){} Op& operator=(const Op &obj) { the_real_op = obj.the_real_op; return *this; } // logical bool operator== (const Op &obj) { return (the_real_op == obj.the_real_op); } bool operator!= (const Op &obj) { return (the_real_op != obj.the_real_op); } // C/C++ cast and assignment inline operator MPI_Op*() { return &the_real_op; } inline operator MPI_Op() const { return the_real_op; } Op& operator=(const MPI_Op& obj) { the_real_op = obj; return *this; } virtual void Free( void ) { MPIX_CALL( MPI_Op_free( (MPI_Op *) &the_real_op )); } void Init( User_function *, bool );};class Errhandler { friend class Comm; friend class File; friend class Win; protected: MPI_Errhandler the_real_errhandler; public: // new/delete inline Errhandler(MPI_Errhandler obj) : the_real_errhandler(obj) {} inline Errhandler(void) : the_real_errhandler(MPI_ERRHANDLER_NULL) {} virtual ~Errhandler() {} // copy/assignment Errhandler(const Errhandler &obj) : the_real_errhandler(obj.the_real_errhandler){} Errhandler& operator=(const Errhandler &obj) { the_real_errhandler = obj.the_real_errhandler; return *this; } // logical bool operator== (const Errhandler &obj) { return (the_real_errhandler == obj.the_real_errhandler); } bool operator!= (const Errhandler &obj) { return (the_real_errhandler != obj.the_real_errhandler); } // C/C++ cast and assignment inline operator MPI_Errhandler*() { return &the_real_errhandler; } inline operator MPI_Errhandler() const { return the_real_errhandler; } Errhandler& operator=(const MPI_Errhandler& obj) { the_real_errhandler = obj; return *this; } virtual void Free( void ) { MPIX_CALL( MPI_Errhandler_free( (MPI_Errhandler *) &the_real_errhandler )); }};class Request { friend class Comm; friend class File; friend class Grequest; protected: MPI_Request the_real_request; public: // new/delete inline Request(MPI_Request obj) : the_real_request(obj) {} inline Request(void) : the_real_request(MPI_REQUEST_NULL) {} virtual ~Request() {} // copy/assignment Request(const Request &obj) : the_real_request(obj.the_real_request){} Request& operator=(const Request &obj) { the_real_request = obj.the_real_request; return *this; } // logical bool operator== (const Request &obj) { return (the_real_request == obj.the_real_request); } bool operator!= (const Request &obj) { return (the_real_request != obj.the_real_request); } // C/C++ cast and assignment inline operator MPI_Request*() { return &the_real_request; } inline operator MPI_Request() const { return the_real_request; } Request& operator=(const MPI_Request& obj) { the_real_request = obj; return *this; } static bool Testany( int v1, Request v2[], int &v3, Status & v5 ) { int v4; MPI_Request *l2 = new MPI_Request[v1]; { int i2; for (i2=0;i2<v1;i2++) { l2[i2] = v2[i2].the_real_request; } } MPIX_CALL( MPI_Testany( v1, l2, &v3, &v4, (MPI_Status *)&(v5.the_real_status ) )); { int i2; for (i2=0;i2<v1;i2++) { v2[i2].the_real_request = l2[i2]; } delete[] l2; } return v4!= 0; } static bool Testany( int v1, Request v2[], int &v3 ) { int v4; MPI_Request *l2 = new MPI_Request[v1]; { int i2; for (i2=0;i2<v1;i2++) { l2[i2] = v2[i2].the_real_request; } } MPIX_CALL( MPI_Testany( v1, l2, &v3, &v4, MPI_STATUS_IGNORE )); {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -