📄 mpicxx.h
字号:
/* -*- Mode: C++; c-basic-offset:4 ; -*- *//* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * * This file is automatically generated by buildiface -nosep -noromio * DO NOT EDIT *//* style: c++ header */namespace MPI {#ifdef HAVE_CXX_EXCEPTIONS#define MPIX_CALL( fnc ) \{int err; err = fnc ; if (err) throw Exception(err);}#else#define MPIX_CALL( fnc ) (void)fnc#endif// Typedefs for basic int typestypedef long MPI::Offset;typedef long MPI::Aint;typedef int MPI::Fint;class Datatype { friend class Comm; friend class Status; friend class Intracomm; friend class Intercomm; protected: MPI_Datatype the_real_datatype; public: // new/delete inline Datatype(MPI_Datatype obj) { the_real_datatype = obj; } inline Datatype(void) {the_real_datatype = MPI_DATATYPE_NULL;} virtual ~Datatype() {} // copy/assignment Datatype :: Datatype(const Datatype &obj) { the_real_datatype = obj.the_real_datatype; } Datatype& Datatype::operator=(const Datatype &obj) { the_real_datatype = obj.the_real_datatype; return *this; } // logical bool operator== (const Datatype &obj) { return (the_real_datatype == obj.the_real_datatype); } bool operator!= (const Datatype &obj) { return (the_real_datatype != obj.the_real_datatype); } // C/C++ cast and assignment inline operator MPI_Datatype*() { return &the_real_datatype; } inline operator MPI_Datatype() { return the_real_datatype; } Datatype& Datatype::operator=(const MPI_Datatype& obj) { the_real_datatype = obj; return *this; } void Commit( void ) { MPIX_CALL( MPI_Type_commit( (MPI_Datatype *) &the_real_datatype )); } Datatype Create_contiguous( int v1 ) { Datatype *v3 = new Datatype; MPIX_CALL( MPI_Type_contiguous( v1, (MPI_Datatype) the_real_datatype, &(v3->the_real_datatype) )); return *v3; } Datatype Create_vector( int v1, int v2, int v3 ) { Datatype *v5 = new Datatype; MPIX_CALL( MPI_Type_vector( v1, v2, v3, (MPI_Datatype) the_real_datatype, &(v5->the_real_datatype) )); return *v5; } Datatype Create_indexed( int v1, int * v2, int * v3 ) { Datatype *v5 = new Datatype; MPIX_CALL( MPI_Type_indexed( v1, v2, v3, (MPI_Datatype) the_real_datatype, &(v5->the_real_datatype) )); return *v5; } int Pack_size( int v1, Comm v3 ); int Get_size( void ) { int v2; MPIX_CALL( MPI_Type_size( (MPI_Datatype) the_real_datatype, &v2 )); return v2; } void Free( void ) { MPIX_CALL( MPI_Type_free( (MPI_Datatype *) &the_real_datatype )); } void Unpack( void* v1, int v2, int * v3, void * v4, int v5, Comm v7 ); void Pack( void* v1, int v2, void * v4, int v5, int * v6, Comm v7 ); void Get_name( char * v2, int * v3 ) { MPIX_CALL( MPI_Type_get_name( (MPI_Datatype) the_real_datatype, v2, v3 )); } void Set_name( char * v2 ) { MPIX_CALL( MPI_Type_set_name( (MPI_Datatype) the_real_datatype, v2 )); }};class Info { protected: MPI_Info the_real_info; public: // new/delete inline Info(MPI_Info obj) { the_real_info = obj; } inline Info(void) {the_real_info = MPI_INFO_NULL;} virtual ~Info() {} // copy/assignment Info :: Info(const Info &obj) { the_real_info = obj.the_real_info; } Info& 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() { return the_real_info; } Info& Info::operator=(const MPI_Info& obj) { the_real_info = obj; return *this; }};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) {} virtual ~Status() {} // copy/assignment Status :: Status(const Status &obj) { the_real_status = obj.the_real_status; } 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() { return the_real_status; } Status& Status::operator=(const MPI_Status& obj) { the_real_status = obj; return *this; } int Is_cancelled( void ) { int v2; MPIX_CALL( MPI_Test_cancelled( (MPI_Status *) &the_real_status, &v2 )); return v2; } int Get_elements( Datatype v2 ) { int v3; MPIX_CALL( MPI_Get_elements( (MPI_Status *) &the_real_status, (MPI_Datatype)(v2.the_real_datatype), &v3 )); return v3; } int Get_count( Datatype v2 ) { int v3; MPIX_CALL( MPI_Get_count( (MPI_Status *) &the_real_status, (MPI_Datatype)(v2.the_real_datatype), &v3 )); return v3; }};class Group { friend class Comm; friend class Intracomm; friend class Intercomm; 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 :: Group(const Group &obj) { the_real_group = obj.the_real_group; } 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() { return the_real_group; } Group& Group::operator=(const MPI_Group& obj) { the_real_group = obj; return *this; } int Compare( Group v2 ) { int v3; MPIX_CALL( MPI_Group_compare( (MPI_Group) the_real_group, (MPI_Group)(v2.the_real_group), &v3 )); return v3; } Group Difference( Group v2 ) { Group *v3 = new Group; MPIX_CALL( MPI_Group_difference( (MPI_Group) the_real_group, (MPI_Group)(v2.the_real_group), &(v3->the_real_group) )); return *v3; } Group Intersect( Group v2 ) { Group *v3 = new Group; MPIX_CALL( MPI_Group_intersection( (MPI_Group) the_real_group, (MPI_Group)(v2.the_real_group), &(v3->the_real_group) )); return *v3; } int Get_size( void ) { int v2; MPIX_CALL( MPI_Group_size( (MPI_Group) the_real_group, &v2 )); return v2; } Group Union( Group v2 ) { Group *v3 = new Group; MPIX_CALL( MPI_Group_union( (MPI_Group) the_real_group, (MPI_Group)(v2.the_real_group), &(v3->the_real_group) )); return *v3; } void Free( void ) { MPIX_CALL( MPI_Group_free( (MPI_Group *) &the_real_group )); } int Get_rank( void ) { int v2; MPIX_CALL( MPI_Group_rank( (MPI_Group) the_real_group, &v2 )); return v2; } Group Excl( int v2, int * v3 ) { Group *v4 = new Group; MPIX_CALL( MPI_Group_excl( (MPI_Group) the_real_group, v2, v3, &(v4->the_real_group) )); return *v4; } Group Incl( int v2, int * v3 ) { Group *v4 = new Group; MPIX_CALL( MPI_Group_incl( (MPI_Group) the_real_group, v2, v3, &(v4->the_real_group) )); return *v4; } void Translate_ranks( int v2, int * v3, Group v4, int * v5 ) { MPIX_CALL( MPI_Group_translate_ranks( (MPI_Group) the_real_group, v2, v3, (MPI_Group)(v4.the_real_group), v5 )); }};class Op { friend class Intracomm; 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 :: Op(const Op &obj) { the_real_op = obj.the_real_op; } 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() { return the_real_op; } Op& Op::operator=(const MPI_Op& obj) { the_real_op = obj; return *this; } void Free( void ) { MPIX_CALL( MPI_Op_free( (MPI_Op *) &the_real_op )); }};class Errhandler { 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 :: Errhandler(const Errhandler &obj) { the_real_errhandler = obj.the_real_errhandler; } 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() { return the_real_errhandler; } Errhandler& Errhandler::operator=(const MPI_Errhandler& obj) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -