⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpicxx.h.in

📁 fortran并行计算包
💻 IN
📖 第 1 页 / 共 5 页
字号:
    }    // If the compiler does not support variable return types, return a // reference to Comm.  The user must then cast this to the correct type// (Standard-conforming C++ compilers support variable return types)#ifdef HAVE_NO_VARIABLE_RETURN_TYPE_SUPPORT    virtual Comm & Clone(void) const {         MPI_Comm ncomm;        MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);         Comm *clone = new Intercomm(ncomm);         return *clone;     };#else    virtual Intercomm & Clone(void) const {         MPI_Comm ncomm;        MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);         Intercomm *clone = new Intercomm(ncomm);         return *clone;     };#endif};class Intracomm : public Comm {    friend class Cartcomm;    friend class Graphcomm;    friend class Datatype;  public:    // new/delete    inline Intracomm(MPI_Comm obj) : Comm(obj) {}    inline Intracomm(void) : Comm() {}    virtual ~Intracomm() {}    // copy/assignment    Intracomm(const Intracomm &obj) : Comm(obj) {}    Intracomm& operator=(const Intracomm &obj) {      the_real_comm = obj.the_real_comm; return *this; }    // C/C++ cast and assignment    inline operator MPI_Comm*() { return &the_real_comm; }    inline operator MPI_Comm() const { return the_real_comm; }    Intracomm& operator=(const MPI_Comm& obj) {      the_real_comm = obj; return *this; }    virtual Intercomm Create_intercomm( int v2, const Comm &v3, int v4, int v5 ) const    {        Intercomm v6;        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;    }    virtual Intracomm Split( int v2, int v3 ) const    {        Intracomm v4;        MPIX_CALL( MPI_Comm_split( (MPI_Comm) the_real_comm, v2, v3, &(v4.the_real_comm) ));        return v4;    }    virtual Graphcomm Create_graph( int v2, const int * v3, const int * v4, bool v5 ) const;    virtual Cartcomm Create_cart( int v2, const int * v3, const bool v4[], bool v5 ) const;    virtual Intracomm Create( const Group &v2 ) const    {        Intracomm v3;        MPIX_CALL( MPI_Comm_create( (MPI_Comm) the_real_comm, (MPI_Group)(v2.the_real_group), &(v3.the_real_comm) ));        return v3;    }    Intracomm Dup( void ) const    {        Intracomm v2;        MPIX_CALL( MPI_Comm_dup( (MPI_Comm) the_real_comm, &(v2.the_real_comm) ));        return v2;    }    virtual void Scan( const void* v1, void* v2, int v3, const Datatype &v4, const Op &v5 ) const    {        MPIX_CALL( MPI_Scan( (void*)v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op)(v5.the_real_op), (MPI_Comm) the_real_comm ));    }    virtual void Exscan( const void * v1, void * v2, int v3, const Datatype &v4, const Op &v5 ) const    {        MPIX_CALL( MPI_Exscan( (void *)v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op)(v5.the_real_op), (MPI_Comm) the_real_comm ));    }    virtual Intercomm Accept( const char * v1, const Info &v2, int v3 ) const    {        Intercomm v5;        MPIX_CALL( MPI_Comm_accept( (char *)v1, (MPI_Info)(v2.the_real_info), v3, (MPI_Comm) the_real_comm, &(v5.the_real_comm) ));        return v5;    }    virtual Intercomm Connect( const char * v1, const Info &v2, int v3 ) const    {        Intercomm v5;        MPIX_CALL( MPI_Comm_connect( (char *)v1, (MPI_Info)(v2.the_real_info), v3, (MPI_Comm) the_real_comm, &(v5.the_real_comm) ));        return v5;    }    // If the compiler does not support variable return types, return a // reference to Comm.  The user must then cast this to the correct type// (Standard-conforming C++ compilers support variable return types)#ifdef HAVE_NO_VARIABLE_RETURN_TYPE_SUPPORT    virtual Comm & Clone(void) const {         MPI_Comm ncomm;        MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);         Comm *clone = new Intracomm(ncomm);         return *clone;     };#else    virtual Intracomm & Clone(void) const {         MPI_Comm ncomm;        MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);         Intracomm *clone = new Intracomm(ncomm);         return *clone;     };#endifIntercomm Spawn(const char* command, const char* argv[], int maxprocs, const MPI::Info& info, int root) const {    Intercomm ic;    MPIX_CALL( MPI_Comm_spawn( (char *)command, (char **)argv,                 maxprocs, info.the_real_info, root, the_real_comm,                 &(ic.the_real_comm), MPI_ERRCODES_IGNORE ) );    return ic;}Intercomm Spawn(const char* command, const char* argv[], int maxprocs, const MPI::Info& info, int root, int array_of_errcodes[]) const {    Intercomm ic;    MPIX_CALL( MPI_Comm_spawn( (char *)command, (char **)argv,                 maxprocs, info.the_real_info, root, the_real_comm,                 &(ic.the_real_comm), array_of_errcodes ) );    return ic;}Intercomm Spawn_multiple(int count, const char* array_of_commands[], const char** array_of_argv[], const int array_of_maxprocs[], const MPI::Info array_of_info[], int root) {    Intercomm ic;    MPI_Info  *li = new MPI_Info [count];    int i;    for (i=0; i<count; i++) {        li[i] = array_of_info[i].the_real_info;    }    MPIX_CALL( MPI_Comm_spawn_multiple( count, (char **)array_of_commands,           (char ***)array_of_argv, (int *)array_of_maxprocs,                 li, root, the_real_comm, &(ic.the_real_comm),                 MPI_ERRCODES_IGNORE ) );    delete [] li;    return ic;}Intercomm Spawn_multiple(int count, const char* array_of_commands[], const char** array_of_argv[], const int array_of_maxprocs[], const MPI::Info array_of_info[], int root, int array_of_errcodes[]) {    Intercomm ic;    MPI_Info  *li = new MPI_Info [count];    int i;    for (i=0; i<count; i++) {        li[i] = array_of_info[i].the_real_info;    }    MPIX_CALL( MPI_Comm_spawn_multiple( count, (char **)array_of_commands,           (char ***)array_of_argv, (int *)array_of_maxprocs,                 li, root, the_real_comm, &(ic.the_real_comm),                 array_of_errcodes ) );    delete [] li;    return ic;}};class Grequest : public Request {  public:    // new/delete    inline Grequest(MPI_Request obj) : Request(obj) {}    inline Grequest(void) : Request() {}    virtual ~Grequest() {}    // copy/assignment    Grequest(const Grequest &obj) : Request(obj) {}    Grequest& operator=(const Grequest &obj) {      the_real_request = obj.the_real_request; return *this; }    // logical    bool operator== (const Grequest &obj) {      return (the_real_request == obj.the_real_request); }    bool operator!= (const Grequest &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; }    Grequest& operator=(const MPI_Request& obj) {      the_real_request = obj; return *this; }    virtual void Complete( void )     {        MPIX_CALL( MPI_Grequest_complete( (MPI_Request) the_real_request ));    }    typedef int Query_function( void *, Status & );    typedef int Free_function( void * );    typedef int Cancel_function( void *, bool );    Grequest Start( Query_function query_fn,                    Free_function free_fn,                    Cancel_function cancel_fn,                    void *extra_state );};class Win  {		  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(const Win &obj) : the_real_win(obj.the_real_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() const { return the_real_win; }    Win& operator=(const MPI_Win& obj) {      the_real_win = obj; return *this; }    virtual Group Get_group( void ) const    {        Group v2;        MPIX_CALL( MPI_Win_get_group( (MPI_Win) the_real_win, &(v2.the_real_group) ));        return v2;    }    virtual void Fence( int v1 ) const    {        MPIX_CALL( MPI_Win_fence( v1, (MPI_Win) the_real_win ));    }    virtual void Start( const Group &v1, int v2 ) const    {        MPIX_CALL( MPI_Win_start( (MPI_Group)(v1.the_real_group), v2, (MPI_Win) the_real_win ));    }    virtual void Free( void )     {        MPIX_CALL( MPI_Win_free( (MPI_Win *) &the_real_win ));    }    virtual void Put( const void * v1, int v2, const Datatype &v3, int v4, Aint v5, int v6, const Datatype &v7 ) const    {        MPIX_CALL( MPI_Put( (void *)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, v6, (MPI_Datatype)(v7.the_real_datatype), (MPI_Win) the_real_win ));    }    virtual void Wait( void ) const    {        MPIX_CALL( MPI_Win_wait( (MPI_Win) the_real_win ));    }    virtual bool Test( void ) const    {        int v2;        MPIX_CALL( MPI_Win_test( (MPI_Win) the_real_win, &v2 ));        return v2!= 0;    }    virtual void Get( void * v1, int v2, const Datatype &v3, int v4, Aint v5, int v6, const Datatype &v7 ) const    {        MPIX_CALL( MPI_Get( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, v6, (MPI_Datatype)(v7.the_real_datatype), (MPI_Win) the_real_win ));    }    virtual bool Get_attr( int v2, void * v3 ) const    {        int v4;        MPIX_CALL( MPI_Win_get_attr( (MPI_Win) the_real_win, v2, v3, &v4 ));        return v4!= 0;    }    virtual void Set_attr( int v2, const void * v3 )     {        MPIX_CALL( MPI_Win_set_attr( (MPI_Win) the_real_win, v2, (void *)v3 ));    }    virtual void Complete( void ) const    {        MPIX_CALL( MPI_Win_complete( (MPI_Win) the_real_win ));    }    virtual void Set_errhandler( const Errhandler &v2 )     {        MPIX_CALL( MPI_Win_set_errhandler( (MPI_Win) the_real_win, (MPI_Errhandler)(v2.the_real_errhandler) ));    }    virtual void Set_name( const char * v2 )     {        MPIX_CALL( MPI_Win_set_name( (MPI_Win) the_real_win, (char *)v2 ));    }    virtual void Accumulate( const void * v1, int v2, const Datatype &v3, int v4, Aint v5, int v6, const Datatype &v7, const Op &v8 ) const    {        MPIX_CALL( MPI_Accumulate( (void *)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, v6, (MPI_Datatype)(v7.the_real_datatype), (MPI_Op)(v8.the_real_op), (MPI_Win) the_real_win ));    }    static Win Create( const void * v1, Aint v2, int v3, const Info &v4, const Intracomm &v5 )     {        Win v6;        MPIX_CALL( MPI_Win_create( (void *)v1, v2, v3, (MPI_Info)(v4.the_real_info), (MPI_Comm)(v5.the_real_comm), &(v6.the_real_win) ));        return v6;    }    virtual void Call_errhandler( int v2 ) const    {        MPIX_CALL( MPI_Win_call_errhandler( (MPI_Win) the_real_win, v2 ));    }    static void Free_keyval( int &v1 )     {        MPIX_CALL( MPI_Win_free_keyval( &v1 ));    }    virtual void Post( const Group &v1, int v2 ) const    {        MPIX_CALL( MPI_Win_post( (MPI_Group)(v1.the_real_group), v2, (MPI_Win) the_real_win ));    }    virtual void Unlock( int v1 ) const    {        MPIX_CALL( MPI_Win_unlock( v1, (MPI_Win) the_real_win ));    }    virtual void Delete_attr( int v2 )     {        MPIX_CALL( MPI_Win_delete_attr( (MPI_Win) the_real_win, v2 ));    }    virtual void Lock( int v1, int v2, int v3 ) const    {        MPIX_CALL( MPI_Win_lock( v1, v2, v3, (MPI_Win) the_real_win ));    }    virtual Errhandler Get_errhandler( void ) const    {        Errhandler v2;        MPIX_CALL( MPI_Win_get_errhandler( (MPI_Win) the_real_win, &(v2.the_real_errhandler) ));        return v2;    }    virtual void Get_name( char * v2, int &v3 ) const    {        MPIX_CALL( MPI_Win_get_name( (MPI_Win) the_real_win, v2, &v3 ));    }    typedef void Errhandler_fn(Win &, int *, ... );    static Errhandler Create_errhandler( Errhandler_fn * );    typedef int Copy_attr_function(const Win& oldwin, int win_keyval, void* extra_state, void* attribute_val_in, void* attribute_val_out, bool& flag);     typedef int Delete_attr_function(Win& win, int win_keyval, void* attribute_val, void* extra_state);     static int Create_keyval( Copy_attr_function *, Delete_attr_function *,                              void * );    // These functions are *not* part of MPI-2 but are provided    // because they should have been included    static int NULL_COPY_FN( const Win &oldwin, int keyval, void *ex,    void *attr_in, void *attr_out, bool &flag ) { flag = 1; return 0;}    static int NULL_DELETE_FN( Win &win, int keyval, void * attr,          void *ex ) { return 0; }    static int DUP_FN( const Win &oldwin, int keyval, void *ex,    void *attr_in, void *attr_out, bool &flag ) { flag = 1;     *(void **)attr_out = attr_in; return 0;} };#ifndef MPI_FILE_NULL#define MPI_FILE_NULL 0typedef int MPI_File;#endifclass File  {		  protected:    MPI_File the_real_file;  public:    // new/delete    inline File(MPI_File obj) : the_real_file(obj) {}    inline File(void) : the_real_file(MPI_FILE_NULL) {}    virtual ~File() {}    // copy/assignment    File(const File &obj) : the_real_file(obj.the_real_file){}    File& operator

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -