-: 0:Source:../../include/mpicxx.h
-: 0:Graph:initcxx.gcno
-: 0:Data:initcxx.gcda
-: 0:Runs:509
-: 0:Programs:136
-: 1:/* -*- Mode: C++; c-basic-offset:4 ; -*- */
-: 2:/*
-: 3: * (C) 2001 by Argonne National Laboratory.
-: 4: * See COPYRIGHT in top-level directory.
-: 5: *
-: 6: * This file is automatically generated by buildiface -nosep
-: 7: * DO NOT EDIT
-: 8: */
-: 9:/* style: c++ header */
-: 10:
-: 11:#ifdef MPI
-: 12:#error "You cannot define MPI; that name is reserved for the MPI namespace"
-: 13:#endif
-: 14:
-: 15:// Check for incompatible GCC versions
-: 16:// GCC (specifically) g++ changed the calling convention
-: 17:// between 3.2.3 and 3.4.3 (!!) Normally such changes
-: 18:// should only occur at major releases (e.g., version 3 to 4)
-: 19:#ifdef __GNUC__
-: 20:# if __GNUC__ >= 4
-: 21:# if __GNUC_MINOR__ > 2 && 2 == 2
-: 22:# error 'Please use the same version of GCC and g++ for compiling MPICH2 and user MPI programs'
-: 23:# endif
-: 24:# endif
-: 25:#endif
-: 26:// There is a name conflict between stdio.h and iostream (or iostream.h)
-: 27:// and the MPI C++ binding with respect to the names SEEK_SET, SEEK_CUR,
-: 28:// and SEEK_END. MPI wants these in the MPI namespace, but stdio.h,
-: 29:// iostream, or iostream.h will #define these to integer values.
-: 30:// #undef'ing these can cause obscure problems.
-: 31:#ifndef MPICH_IGNORE_CXX_SEEK
-: 32:
-: 33:// MPICH_DONT_INCLUDE_STDIO_H is another escape hatch for us, just like
-: 34:// MPICH_IGNORE_CXX_SEEK. If we encounter a wacky environment or user in the
-: 35:// wild that does not want our workaround and/or the stdio.h header, then we can
-: 36:// offer them a way out.
-: 37:#ifndef MPICH_DONT_INCLUDE_STDIO_H
-: 38:// ensure that we have SEEK_* defined
-: 39:# include <stdio.h>
-: 40:#endif
-: 41:
-: 42:enum MPIR_Dummy_seek_type {
-: 43: MPIR_DUMMY_SEEK_COMMA_VAL = -1 // permits cleaner comma logic
-: 44:#ifdef SEEK_SET
-: 45: , MPIR_SEEK_SET = SEEK_SET
-: 46:# undef SEEK_SET
-: 47: , SEEK_SET = MPIR_SEEK_SET
-: 48:#endif
-: 49:#ifdef SEEK_CUR
-: 50: , MPIR_SEEK_CUR = SEEK_CUR
-: 51:# undef SEEK_CUR
-: 52: , SEEK_CUR = MPIR_SEEK_CUR
-: 53:#endif
-: 54:#ifdef SEEK_END
-: 55: , MPIR_SEEK_END = SEEK_END
-: 56:# undef SEEK_END
-: 57: , SEEK_END = MPIR_SEEK_END
-: 58:#endif
-: 59:#ifdef LOCK_SHARED
-: 60: , MPIR_LOCK_SHARED = LOCK_SHARED
-: 61:# undef LOCK_SHARED
-: 62: , LOCK_SHARED = MPIR_LOCK_SHARED
-: 63:#endif
-: 64:};
-: 65:
-: 66:#endif // MPICH_IGNORE_CXX_SEEK
-: 67:namespace MPI {
-: 68:#if 1
-: 69:#define MPIX_CALL( fnc ) \
-: 70:{int err; err = fnc ; if (err) throw Exception(err);}
-: 71:#else
-: 72:#define MPIX_CALL( fnc ) (void)fnc
-: 73:#endif
-: 74:
-: 75:// Typedefs for basic int types
-: 76:typedef MPI_Offset Offset;
-: 77:typedef MPI_Aint Aint;
-: 78:typedef MPI_Fint Fint;
-: 79:
-: 80:// Special internal routine
-: 81:void MPIR_CXX_InitDatatypeNames( void );
-: 82:
-: 83:// Forward class declarations
-: 84:class Comm;
-: 85:class Nullcomm;
-: 86:class Intercomm;
-: 87:class Intracomm;
-: 88:class Cartcomm;
-: 89:class Graphcomm;
-: 90:
-: 91:extern int Detach_buffer( void *&v1 ) ;
-: 92:extern bool Is_initialized( void ) ;
-: 93:extern void Get_processor_name( char * v1, int &v2 ) ;
-: 94:extern void Get_error_string( int v1, char * v2, int &v3 ) ;
-: 95:extern void Compute_dims( int v1, int v2, int * v3 ) ;
-: 96:extern void Get_version( int &v1, int &v2 ) ;
-: 97:extern void Finalize( void ) ;
-: 98:extern void Pcontrol( const int v1, ... ) ;
-: 99:extern void Attach_buffer( void* v1, int v2 ) ;
-: 100:extern int Get_error_class( int v1 ) ;
-: 101:
-: 102:class Exception {
-: 103:
-: 104: protected:
-: 105: int the_real_exception;
-: 106:
-: 107: public:
-: 108: // new/delete
-: 109:
2: 110: inline Exception(int obj) : the_real_exception(obj) {}
-: 111: inline Exception(void) : the_real_exception(0) {}
-: 112:
|
#####: 113: virtual ~Exception() {}
-: 114: // copy/assignment
-: 115:
-: 116: Exception(const Exception &obj) : the_real_exception(obj.the_real_exception){}
-: 117:
-: 118: Exception& operator=(const Exception &obj) {
-: 119: the_real_exception = obj.the_real_exception; return *this; }
-: 120:
-: 121: // logical
-: 122: bool operator== (const Exception &obj) {
-: 123: return (the_real_exception == obj.the_real_exception); }
-: 124: bool operator!= (const Exception &obj) {
-: 125: return (the_real_exception != obj.the_real_exception); }
-: 126: // C/C++ cast and assignment
-: 127: inline operator int*() { return &the_real_exception; }
-: 128: inline operator int() const { return the_real_exception; }
-: 129: Exception& operator=(const int& obj) {
-: 130: the_real_exception = obj; return *this; }
-: 131:
-: 132: protected:
-: 133: char the_error_message[MPI_MAX_ERROR_STRING];
-: 134: public:
-: 135: int Get_error_code(void) { return the_real_exception; }
-: 136: int Get_error_class(void) { return MPI::Get_error_class(the_real_exception); }
-: 137: const char *Get_error_string(void)
-: 138: {
-: 139: int len;
-: 140: MPI_Error_string(the_real_exception, the_error_message, &len);
-: 141: return the_error_message;
-: 142: }
-: 143:};
-: 144:
-: 145:class Datatype {
-: 146: friend class Comm;
-: 147: friend class Status;
-: 148: friend class Intracomm;
-: 149: friend class Intercomm;
-: 150: friend class Win;
-: 151: friend class File;
-: 152: friend class Op;
-: 153:
-: 154: protected:
-: 155: MPI_Datatype the_real_datatype;
-: 156:
-: 157: public:
-: 158: // new/delete
-: 159:
|
26920: 160: inline Datatype(MPI_Datatype obj) : the_real_datatype(obj) {}
509: 161: inline Datatype(void) : the_real_datatype(MPI_DATATYPE_NULL) {}
-: 162:
27429: 163: virtual ~Datatype() {}
-: 164: // copy/assignment
-: 165:
-: 166: Datatype(const Datatype &obj) : the_real_datatype(obj.the_real_datatype){}
-: 167:
-: 168: Datatype& operator=(const Datatype &obj) {
-: 169: the_real_datatype = obj.the_real_datatype; return *this; }
-: 170:
-: 171: // logical
-: 172: bool operator== (const Datatype &obj) {
-: 173: return (the_real_datatype == obj.the_real_datatype); }
-: 174: bool operator!= (const Datatype &obj) {
-: 175: return (the_real_datatype != obj.the_real_datatype); }
-: 176: // C/C++ cast and assignment
-: 177: inline operator MPI_Datatype*() { return &the_real_datatype; }
8: 178: inline operator MPI_Datatype() const { return the_real_datatype; }
-: 179: Datatype& operator=(const MPI_Datatype& obj) {
-: 180: the_real_datatype = obj; return *this; }
|
#####: 181: virtual void Commit( void )
-: 182: {
#####: 183: MPIX_CALL( MPI_Type_commit( (MPI_Datatype *) &the_real_datatype ));
#####: 184: }
#####: 185: virtual void Free( void )
-: 186: {
#####: 187: MPIX_CALL( MPI_Type_free( (MPI_Datatype *) &the_real_datatype ));
#####: 188: }
#####: 189: virtual Datatype Create_indexed( int v1, const int * v2, const int * v3 ) const
-: 190: {
#####: 191: Datatype v5;
#####: 192: MPIX_CALL( MPI_Type_indexed( v1, (int *)v2, (int *)v3, (MPI_Datatype) the_real_datatype, &(v5.the_real_datatype) ));
#####: 193: return v5;
-: 194: }
#####: 195: virtual Datatype Create_contiguous( int v1 ) const
-: 196: {
#####: 197: Datatype v3;
#####: 198: MPIX_CALL( MPI_Type_contiguous( v1, (MPI_Datatype) the_real_datatype, &(v3.the_real_datatype) ));
#####: 199: return v3;
-: 200: }
#####: 201: virtual Datatype Create_vector( int v1, int v2, int v3 ) const
-: 202: {
#####: 203: Datatype v5;
#####: 204: MPIX_CALL( MPI_Type_vector( v1, v2, v3, (MPI_Datatype) the_real_datatype, &(v5.the_real_datatype) ));
#####: 205: return v5;
-: 206: }
-: 207: static Datatype Create_struct( int v1, int v2[], MPI_Aint v3[], const Datatype v4[] )
-: 208: {
-: 209: Datatype v5;
-: 210: MPI_Datatype *l4 = new MPI_Datatype[v1];
-: 211: {
-: 212: int i4;
-: 213: for (i4=0;i4<v1;i4++) {
-: 214: l4[i4] = v4[i4].the_real_datatype;
-: 215: }
-: 216: }
-: 217: MPIX_CALL( MPI_Type_create_struct( v1, (int *)v2, (MPI_Aint *)v3, l4, &(v5.the_real_datatype) ));
-: 218: delete[] l4;
-: 219: return v5;
-: 220: }
-: 221: virtual int Pack_size( int v1, const Comm &v3 ) const;
-: 222: virtual void Pack( const void* v1, int v2, void * v4, int v5, int &v6, const Comm &v7 ) const;
#####: 223: virtual int Get_size( void ) const
-: 224: {
-: 225: int v2;
#####: 226: MPIX_CALL( MPI_Type_size( (MPI_Datatype) the_real_datatype, &v2 ));
#####: 227: return v2;
-: 228: }
#####: 229: virtual void Get_envelope( int &v2, int &v3, int &v4, int &v5 ) const
-: 230: {
#####: 231: MPIX_CALL( MPI_Type_get_envelope( (MPI_Datatype) the_real_datatype, &v2, &v3, &v4, &v5 ));
#####: 232: }
#####: 233: virtual Datatype Create_hvector( int v1, int v2, Aint v3 ) const
-: 234: {
#####: 235: Datatype v5;
#####: 236: MPIX_CALL( MPI_Type_create_hvector( v1, v2, v3, (MPI_Datatype) the_real_datatype, &(v5.the_real_datatype) ));
#####: 237: return v5;
-: 238: }
-: 239: static Datatype Match_size( int v1, int v2 )
-: 240: {
-: 241: Datatype v3;
-: 242: MPIX_CALL( MPI_Type_match_size( v1, v2, &(v3.the_real_datatype) ));
-: 243: return v3;
-: 244: }
#####: 245: virtual Datatype Create_resized( const Aint v2, const Aint v3 ) const
-: 246: {
#####: 247: Datatype v4;
#####: 248: MPIX_CALL( MPI_Type_create_resized( (MPI_Datatype) the_real_datatype, (MPI_Aint)v2, (MPI_Aint)v3, &(v4.the_real_datatype) ));
#####: 249: return v4;
-: 250: }
#####: 251: virtual Datatype Create_indexed_block( int v1, int v2, const int v3[] ) const
-: 252: {
#####: 253: Datatype v5;
#####: 254: MPIX_CALL( MPI_Type_create_indexed_block( v1, v2, (int *)v3, (MPI_Datatype) the_real_datatype, &(v5.the_real_datatype) ));
#####: 255: return v5;
-: 256: }
#####: 257: virtual Aint Pack_external_size( char * v1, const int v2 ) const
-: 258: {
-: 259: MPI_Aint v4;
#####: 260: MPIX_CALL( MPI_Pack_external_size( v1, (int)v2, (MPI_Datatype) the_real_datatype, &v4 ));
#####: 261: return v4;
-: 262: }
-: 263: Datatype Dup( void ) const
-: 264: {
-: 265: Datatype v2;
-: 266: MPIX_CALL( MPI_Type_dup( (MPI_Datatype) the_real_datatype, &(v2.the_real_datatype) ));
-: 267: return v2;
-: 268: }
#####: 269: virtual Datatype Create_hindexed( int v1, const int v2[], const Aint v3[] ) const
-: 270: {
#####: 271: Datatype v5;
#####: 272: MPIX_CALL( MPI_Type_create_hindexed( v1, (int *)v2, (MPI_Aint *)v3, (MPI_Datatype) the_real_datatype, &(v5.the_real_datatype) ));
#####: 273: return v5;
-: 274: }
#####: 275: virtual bool Get_attr( int v2, void * v3 ) const
-: 276: {
-: 277: int v4;
#####: 278: MPIX_CALL( MPI_Type_get_attr( (MPI_Datatype) the_real_datatype, v2, v3, &v4 ));
#####: 279: return v4!= 0;
-: 280: }
#####: 281: virtual void Get_true_extent( Aint & v2, Aint & v3 ) const
-: 282: {
#####: 283: MPIX_CALL( MPI_Type_get_true_extent( (MPI_Datatype) the_real_datatype, &v2, &v3 ));
#####: 284: }
#####: 285: virtual Datatype Create_darray( int v1, int v2, int v3, const int v4[], const int v5[], const int v6[], const int v7[], int v8 ) const
-: 286: {
#####: 287: Datatype v10;
#####: 288: MPIX_CALL( MPI_Type_create_darray( v1, v2, v3, (int *)v4, (int *)v5, (int *)v6, (int *)v7, v8, (MPI_Datatype) the_real_datatype, &(v10.the_real_datatype) ));
#####: 289: return v10;
-: 290: }
-: 291: static Datatype Create_f90_real( int v1, int v2 )
-: 292: {
-: 293: Datatype v3;
-: 294: MPIX_CALL( MPI_Type_create_f90_real( v1, v2, &(v3.the_real_datatype) ));
-: 295: return v3;
-: 296: }
#####: 297: virtual void Get_contents( int v2, int v3, int v4, int v5[], MPI_Aint v6[], Datatype v7[] ) const
-: 298: {
#####: 299: MPI_Datatype *l7 = new MPI_Datatype[v4];
#####: 300: MPIX_CALL( MPI_Type_get_contents( (MPI_Datatype) the_real_datatype, v2, v3, v4, v5, v6, l7 ));
-: 301: {
-: 302: int i7;
#####: 303: for (i7=0;i7<v4;i7++) {
#####: 304: v7[i7].the_real_datatype = l7[i7];
-: 305: }
#####: 306: delete[] l7;
-: 307: }
#####: 308: }
#####: 309: virtual void Set_attr( int v2, const void * v3 )
-: 310: {
#####: 311: MPIX_CALL( MPI_Type_set_attr( (MPI_Datatype) the_real_datatype, v2, (void *)v3 ));
#####: 312: }
#####: 313: virtual void Set_name( const char * v2 )
-: 314: {
#####: 315: MPIX_CALL( MPI_Type_set_name( (MPI_Datatype) the_real_datatype, (char *)v2 ));
#####: 316: }
-: 317: static Datatype Create_f90_complex( int v1, int v2 )
-: 318: {
-: 319: Datatype v3;
-: 320: MPIX_CALL( MPI_Type_create_f90_complex( v1, v2, &(v3.the_real_datatype) ));
-: 321: return v3;
-: 322: }
#####: 323: virtual Datatype Create_subarray( int v1, int v2[], const int v3[], const int v4[], const int v5 ) const
-: 324: {
#####: 325: Datatype v7;
#####: 326: MPIX_CALL( MPI_Type_create_subarray( v1, v2, (int *)v3, (int *)v4, (int)v5, (MPI_Datatype) the_real_datatype, &(v7.the_real_datatype) ));
#####: 327: return v7;
-: 328: }
#####: 329: virtual void Unpack_external( char * v1, const void * v2, const Aint v3, Aint & v4, void * v5, int v6 ) const
-: 330: {
#####: 331: MPIX_CALL( MPI_Unpack_external( v1, (void *)v2, (MPI_Aint)v3, &v4, v5, v6, (MPI_Datatype) the_real_datatype ));
#####: 332: }
-: 333: static void Free_keyval( int &v1 )
-: 334: {
-: 335: MPIX_CALL( MPI_Type_free_keyval( &v1 ));
-: 336: }
-: 337: static Datatype Create_struct( int v1, const int v2[], const Aint v3[], const Datatype v4[] )
-: 338: {
-: 339: Datatype v5;
-: 340: MPI_Datatype *l4 = new MPI_Datatype[v1];
-: 341: {
-: 342: int i4;
-: 343: for (i4=0;i4<v1;i4++) {
-: 344: l4[i4] = v4[i4].the_real_datatype;
-: 345: }
-: 346: }
-: 347: MPIX_CALL( MPI_Type_create_struct( v1, (int *)v2, (MPI_Aint *)v3, l4, &(v5.the_real_datatype) ));
-: 348: delete[] l4;
-: 349: return v5;
-: 350: }
-: 351: static Datatype Create_f90_integer( int v1 )
-: 352: {
-: 353: Datatype v2;
-: 354: MPIX_CALL( MPI_Type_create_f90_integer( v1, &(v2.the_real_datatype) ));
-: 355: return v2;
-: 356: }
#####: 357: virtual void Pack_external( char * v1, const void * v2, const int v3, void * v5, Aint v6, Aint & v7 ) const
-: 358: {
#####: 359: MPIX_CALL( MPI_Pack_external( v1, (void *)v2, (int)v3, (MPI_Datatype) the_real_datatype, v5, v6, &v7 ));
#####: 360: }
#####: 361: virtual void Get_extent( Aint & v2, Aint & v3 ) const
-: 362: {
#####: 363: MPIX_CALL( MPI_Type_get_extent( (MPI_Datatype) the_real_datatype, &v2, &v3 ));
#####: 364: }
#####: 365: virtual void Delete_attr( int v2 )
-: 366: {
#####: 367: MPIX_CALL( MPI_Type_delete_attr( (MPI_Datatype) the_real_datatype, v2 ));
#####: 368: }
#####: 369: virtual void Get_name( char * v2, int &v3 ) const
-: 370: {
#####: 371: MPIR_CXX_InitDatatypeNames();
#####: 372: MPIX_CALL( MPI_Type_get_name( (MPI_Datatype) the_real_datatype, v2, &v3 ));
#####: 373: }
-: 374:
-: 375: void Unpack( const void *, int, void *, int, int &, const Comm & ) const;
-: 376:
-: 377: typedef int Copy_attr_function(const Datatype& oldtype, int type_keyval, void* extra_state, void* attribute_val_in, void* attribute_val_out, bool& flag);
-: 378: typedef int Delete_attr_function(Datatype& type, int type_keyval, void* attribute_val, void* extra_state);
-: 379:
-: 380: static int Create_keyval( Copy_attr_function *, Delete_attr_function *,
-: 381: void * );
-: 382: // These functions are *not* part of MPI-2 but are provided
-: 383: // because they should have been included
-: 384: static int NULL_COPY_FN( const Datatype &oldtype, int keyval, void *ex,
#####: 385: void *attr_in, void *attr_out, bool &flag ) { flag = 1; return 0;}
-: 386: static int NULL_DELETE_FN( Datatype &type, int keyval, void * attr,
#####: 387: void *ex ) { return 0; }
-: 388: static int DUP_FN( const Datatype &oldtype, int keyval, void *ex,
-: 389: void *attr_in, void *attr_out, bool &flag ) { flag = 1;
-: 390: *(void **)attr_out = attr_in; return 0;}
-: 391:
-: 392:
-: 393:};
-: 394:
-: 395: typedef void User_function(const void *, void*, int, const Datatype&);
-: 396:
-: 397:class Info {
-: 398: friend class File;
-: 399: friend class Win;
-: 400: friend class Comm;
-: 401: friend class Intracomm;
-: 402:
-: 403: protected:
-: 404: MPI_Info the_real_info;
-: 405:
-: 406: public:
-: 407: // new/delete
-: 408:
-: 409: inline Info(MPI_Info obj) : the_real_info(obj) {}
|
509: 410: inline Info(void) : the_real_info(MPI_INFO_NULL) {}
-: 411:
509: 412: virtual ~Info() {}
-: 413: // copy/assignment
-: 414:
-: 415: Info(const Info &obj) : the_real_info(obj.the_real_info){}
-: 416:
-: 417: Info& operator=(const Info &obj) {
-: 418: the_real_info = obj.the_real_info; return *this; }
-: 419:
-: 420: // logical
-: 421: bool operator== (const Info &obj) {
-: 422: return (the_real_info == obj.the_real_info); }
-: 423: bool operator!= (const Info &obj) {
-: 424: return (the_real_info != obj.the_real_info); }
-: 425: // C/C++ cast and assignment
-: 426: inline operator MPI_Info*() { return &the_real_info; }
8: 427: inline operator MPI_Info() const { return the_real_info; }
-: 428: Info& operator=(const MPI_Info& obj) {
-: 429: the_real_info = obj; return *this; }
|
#####: 430: virtual void Delete( const char * v2 )
-: 431: {
#####: 432: MPIX_CALL( MPI_Info_delete( (MPI_Info) the_real_info, (char *)v2 ));
#####: 433: }
#####: 434: virtual void Get_nthkey( int v2, char * v3 ) const
-: 435: {
#####: 436: MPIX_CALL( MPI_Info_get_nthkey( (MPI_Info) the_real_info, v2, v3 ));
#####: 437: }
#####: 438: virtual void Free( void )
-: 439: {
#####: 440: MPIX_CALL( MPI_Info_free( (MPI_Info *) &the_real_info ));
#####: 441: }
-: 442: static Info Create( void )
-: 443: {
-: 444: Info v1;
-: 445: MPIX_CALL( MPI_Info_create( &(v1.the_real_info) ));
-: 446: return v1;
-: 447: }
#####: 448: virtual void Set( const char * v2, const char * v3 )
-: 449: {
#####: 450: MPIX_CALL( MPI_Info_set( (MPI_Info) the_real_info, (char *)v2, (char *)v3 ));
#####: 451: }
-: 452: Info Dup( void ) const
-: 453: {
-: 454: Info v2;
-: 455: MPIX_CALL( MPI_Info_dup( (MPI_Info) the_real_info, &(v2.the_real_info) ));
-: 456: return v2;
-: 457: }
#####: 458: virtual bool Get_valuelen( const char * v2, int &v3 ) const
-: 459: {
-: 460: int v4;
#####: 461: MPIX_CALL( MPI_Info_get_valuelen( (MPI_Info) the_real_info, (char *)v2, &v3, &v4 ));
#####: 462: return v4!= 0;
-: 463: }
#####: 464: virtual bool Get( const char * v2, int v3, char * v4 ) const
-: 465: {
-: 466: int v5;
#####: 467: MPIX_CALL( MPI_Info_get( (MPI_Info) the_real_info, (char *)v2, v3, v4, &v5 ));
#####: 468: return v5!= 0;
-: 469: }
#####: 470: virtual int Get_nkeys( void ) const
-: 471: {
-: 472: int v2;
#####: 473: MPIX_CALL( MPI_Info_get_nkeys( (MPI_Info) the_real_info, &v2 ));
#####: 474: return v2;
-: 475: }
-: 476:};
-: 477:
-: 478:class Status {
-: 479: friend class Comm;
-: 480: friend class File;
-: 481: friend class Request;
-: 482:
-: 483: protected:
-: 484: MPI_Status the_real_status;
-: 485:
-: 486: public:
-: 487: // new/delete
-: 488:
-: 489: inline Status(MPI_Status obj) : the_real_status(obj) {}
#####: 490: inline Status(void) : the_real_status() {}
-: 491:
#####: 492: virtual ~Status() {}
-: 493: // copy/assignment
-: 494:
-: 495: Status(const Status &obj) : the_real_status(obj.the_real_status){}
-: 496:
-: 497: Status& operator=(const Status &obj) {
-: 498: the_real_status = obj.the_real_status; return *this; }
-: 499:
-: 500: // C/C++ cast and assignment
-: 501: inline operator MPI_Status*() { return &the_real_status; }
#####: 502: inline operator MPI_Status() const { return the_real_status; }
-: 503: Status& operator=(const MPI_Status& obj) {
-: 504: the_real_status = obj; return *this; }
#####: 505: virtual bool Is_cancelled( void ) const
-: 506: {
-: 507: int v2;
#####: 508: MPIX_CALL( MPI_Test_cancelled( (MPI_Status *) &the_real_status, &v2 ));
#####: 509: return v2!= 0;
-: 510: }
#####: 511: virtual int Get_elements( const Datatype &v2 ) const
-: 512: {
-: 513: int v3;
#####: 514: MPIX_CALL( MPI_Get_elements( (MPI_Status *) &the_real_status, (MPI_Datatype)(v2.the_real_datatype), &v3 ));
#####: 515: return v3;
-: 516: }
#####: 517: virtual int Get_count( const Datatype &v2 ) const
-: 518: {
-: 519: int v3;
#####: 520: MPIX_CALL( MPI_Get_count( (MPI_Status *) &the_real_status, (MPI_Datatype)(v2.the_real_datatype), &v3 ));
#####: 521: return v3;
-: 522: }
#####: 523: virtual void Set_cancelled( bool v2 )
-: 524: {
-: 525: int l2;
#####: 526: l2 = (v2 == true) ? 1 : 0;
#####: 527: MPIX_CALL( MPI_Status_set_cancelled( (MPI_Status *) &the_real_status, l2 ));
#####: 528: }
#####: 529: virtual void Set_elements( const Datatype &v2, int v3 )
-: 530: {
#####: 531: MPIX_CALL( MPI_Status_set_elements( (MPI_Status *) &the_real_status, (MPI_Datatype)(v2.the_real_datatype), v3 ));
#####: 532: }
-: 533:
-: 534: int Get_source(void) const { return the_real_status.MPI_SOURCE; }
-: 535: int Get_tag(void) const { return the_real_status.MPI_TAG; }
-: 536: int Get_error(void) const { return the_real_status.MPI_ERROR; }
-: 537: void Set_source(int source) { the_real_status.MPI_SOURCE = source; }
-: 538: void Set_tag(int tag) { the_real_status.MPI_TAG = tag; }
-: 539: void Set_error(int error) { the_real_status.MPI_ERROR = error; }
-: 540:};
-: 541:
-: 542:class Group {
-: 543: friend class Comm;
-: 544: friend class Intracomm;
-: 545: friend class Intercomm;
-: 546: friend class Win;
-: 547: friend class File;
-: 548:
-: 549: protected:
-: 550: MPI_Group the_real_group;
-: 551:
-: 552: public:
-: 553: // new/delete
-: 554:
|
509: 555: inline Group(MPI_Group obj) : the_real_group(obj) {}
517: 556: inline Group(void) : the_real_group(MPI_GROUP_NULL) {}
-: 557:
1018: 558: virtual ~Group() {}
-: 559: // copy/assignment
-: 560:
-: 561: Group(const Group &obj) : the_real_group(obj.the_real_group){}
-: 562:
-: 563: Group& operator=(const Group &obj) {
-: 564: the_real_group = obj.the_real_group; return *this; }
-: 565:
-: 566: // logical
-: 567: bool operator== (const Group &obj) {
-: 568: return (the_real_group == obj.the_real_group); }
-: 569: bool operator!= (const Group &obj) {
-: 570: return (the_real_group != obj.the_real_group); }
-: 571: // C/C++ cast and assignment
-: 572: inline operator MPI_Group*() { return &the_real_group; }
-: 573: inline operator MPI_Group() const { return the_real_group; }
-: 574: Group& operator=(const MPI_Group& obj) {
-: 575: the_real_group = obj; return *this; }
|
#####: 576: virtual Group Excl( int v2, const int * v3 ) const
-: 577: {
#####: 578: Group v4;
#####: 579: MPIX_CALL( MPI_Group_excl( (MPI_Group) the_real_group, v2, (int *)v3, &(v4.the_real_group) ));
#####: 580: return v4;
-: 581: }
#####: 582: virtual int Get_rank( void ) const
-: 583: {
-: 584: int v2;
#####: 585: MPIX_CALL( MPI_Group_rank( (MPI_Group) the_real_group, &v2 ));
#####: 586: return v2;
-: 587: }
#####: 588: virtual void Free( void )
-: 589: {
#####: 590: MPIX_CALL( MPI_Group_free( (MPI_Group *) &the_real_group ));
#####: 591: }
-: 592: static Group Union( const Group &v1, const Group &v2 )
-: 593: {
-: 594: Group v3;
-: 595: MPIX_CALL( MPI_Group_union( (MPI_Group)(v1.the_real_group), (MPI_Group)(v2.the_real_group), &(v3.the_real_group) ));
-: 596: return v3;
-: 597: }
-: 598: static Group Intersect( const Group &v1, const Group &v2 )
-: 599: {
-: 600: Group v3;
-: 601: MPIX_CALL( MPI_Group_intersection( (MPI_Group)(v1.the_real_group), (MPI_Group)(v2.the_real_group), &(v3.the_real_group) ));
-: 602: return v3;
-: 603: }
#####: 604: virtual Group Range_excl( int v2, const int v3[][3] ) const
-: 605: {
#####: 606: Group v4;
#####: 607: MPIX_CALL( MPI_Group_range_excl( (MPI_Group) the_real_group, v2, (int (*)[3])v3, &(v4.the_real_group) ));
#####: 608: return v4;
-: 609: }
#####: 610: virtual Group Range_incl( int v2, const int v3[][3] ) const
-: 611: {
#####: 612: Group v4;
#####: 613: MPIX_CALL( MPI_Group_range_incl( (MPI_Group) the_real_group, v2, (int (*)[3])v3, &(v4.the_real_group) ));
#####: 614: return v4;
-: 615: }
-: 616: static Group Difference( const Group &v1, const Group &v2 )
-: 617: {
-: 618: Group v3;
-: 619: MPIX_CALL( MPI_Group_difference( (MPI_Group)(v1.the_real_group), (MPI_Group)(v2.the_real_group), &(v3.the_real_group) ));
-: 620: return v3;
-: 621: }
-: 622: static void Translate_ranks( const Group &v1, int v2, const int * v3, const Group &v4, int * v5 )
-: 623: {
-: 624: MPIX_CALL( MPI_Group_translate_ranks( (MPI_Group)(v1.the_real_group), v2, (int *)v3, (MPI_Group)(v4.the_real_group), v5 ));
-: 625: }
#####: 626: virtual Group Incl( int v2, const int * v3 ) const
-: 627: {
#####: 628: Group v4;
#####: 629: MPIX_CALL( MPI_Group_incl( (MPI_Group) the_real_group, v2, (int *)v3, &(v4.the_real_group) ));
#####: 630: return v4;
-: 631: }
#####: 632: virtual int Get_size( void ) const
-: 633: {
-: 634: int v2;
#####: 635: MPIX_CALL( MPI_Group_size( (MPI_Group) the_real_group, &v2 ));
#####: 636: return v2;
-: 637: }
-: 638: static int Compare( const Group &v1, const Group &v2 )
-: 639: {
-: 640: int v3;
-: 641: MPIX_CALL( MPI_Group_compare( (MPI_Group)(v1.the_real_group), (MPI_Group)(v2.the_real_group), &v3 ));
-: 642: return v3;
-: 643: }
-: 644:};
-: 645:
-: 646:class Op {
-: 647: friend class Intracomm;
-: 648: friend class Intercomm;
-: 649: friend class Win;
-: 650: friend class Comm;
-: 651:
-: 652: protected:
-: 653: MPI_Op the_real_op;
-: 654:
-: 655: public:
-: 656: // new/delete
-: 657:
|
6617: 658: inline Op(MPI_Op obj) : the_real_op(obj) {}
509: 659: inline Op(void) : the_real_op(MPI_OP_NULL) {}
-: 660:
7126: 661: virtual ~Op() {}
-: 662: // copy/assignment
-: 663:
-: 664: Op(const Op &obj) : the_real_op(obj.the_real_op){}
-: 665:
-: 666: Op& operator=(const Op &obj) {
-: 667: the_real_op = obj.the_real_op; return *this; }
-: 668:
-: 669: // logical
-: 670: bool operator== (const Op &obj) {
-: 671: return (the_real_op == obj.the_real_op); }
-: 672: bool operator!= (const Op &obj) {
-: 673: return (the_real_op != obj.the_real_op); }
-: 674: // C/C++ cast and assignment
-: 675: inline operator MPI_Op*() { return &the_real_op; }
-: 676: inline operator MPI_Op() const { return the_real_op; }
-: 677: Op& operator=(const MPI_Op& obj) {
-: 678: the_real_op = obj; return *this; }
|
#####: 679: virtual void Free( void )
-: 680: {
#####: 681: MPIX_CALL( MPI_Op_free( (MPI_Op *) &the_real_op ));
#####: 682: }
#####: 683: virtual bool Is_commutative( void )
-: 684: {
-: 685: int v2;
#####: 686: MPIX_CALL( MPI_Op_commutative( (MPI_Op) the_real_op, &v2 ));
#####: 687: return v2!= 0;
-: 688: }
#####: 689: virtual void Reduce_local( void * v1, void * v2, int v3, Datatype v4 )
-: 690: {
#####: 691: MPIX_CALL( MPI_Reduce_local( v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op) the_real_op ));
#####: 692: }
-: 693:
-: 694: void Init( User_function *, bool );
-: 695:};
-: 696:
-: 697:class Errhandler {
-: 698: friend class Comm;
-: 699: friend class File;
-: 700: friend class Win;
-: 701:
-: 702: protected:
-: 703: MPI_Errhandler the_real_errhandler;
-: 704:
-: 705: public:
-: 706: // new/delete
-: 707:
|
1527: 708: inline Errhandler(MPI_Errhandler obj) : the_real_errhandler(obj) {}
527: 709: inline Errhandler(void) : the_real_errhandler(MPI_ERRHANDLER_NULL) {}
-: 710:
2039: 711: virtual ~Errhandler() {}
-: 712: // copy/assignment
-: 713:
-: 714: Errhandler(const Errhandler &obj) : the_real_errhandler(obj.the_real_errhandler){}
-: 715:
-: 716: Errhandler& operator=(const Errhandler &obj) {
-: 717: the_real_errhandler = obj.the_real_errhandler; return *this; }
-: 718:
-: 719: // logical
3: 720: bool operator== (const Errhandler &obj) {
3: 721: return (the_real_errhandler == obj.the_real_errhandler); }
-: 722: bool operator!= (const Errhandler &obj) {
-: 723: return (the_real_errhandler != obj.the_real_errhandler); }
-: 724: // C/C++ cast and assignment
-: 725: inline operator MPI_Errhandler*() { return &the_real_errhandler; }
-: 726: inline operator MPI_Errhandler() const { return the_real_errhandler; }
-: 727: Errhandler& operator=(const MPI_Errhandler& obj) {
-: 728: the_real_errhandler = obj; return *this; }
3: 729: virtual void Free( void )
-: 730: {
3: 731: MPIX_CALL( MPI_Errhandler_free( (MPI_Errhandler *) &the_real_errhandler ));
3: 732: }
-: 733:};
-: 734:
-: 735:class Request {
-: 736: friend class Comm;
-: 737: friend class File;
-: 738: friend class Grequest;
-: 739:
-: 740: protected:
-: 741: MPI_Request the_real_request;
-: 742:
-: 743: public:
-: 744: // new/delete
-: 745:
-: 746: inline Request(MPI_Request obj) : the_real_request(obj) {}
509: 747: inline Request(void) : the_real_request(MPI_REQUEST_NULL) {}
-: 748:
509: 749: virtual ~Request() {}
-: 750: // copy/assignment
-: 751:
-: 752: Request(const Request &obj) : the_real_request(obj.the_real_request){}
-: 753:
-: 754: Request& operator=(const Request &obj) {
-: 755: the_real_request = obj.the_real_request; return *this; }
-: 756:
-: 757: // logical
-: 758: bool operator== (const Request &obj) {
-: 759: return (the_real_request == obj.the_real_request); }
-: 760: bool operator!= (const Request &obj) {
-: 761: return (the_real_request != obj.the_real_request); }
-: 762: // C/C++ cast and assignment
-: 763: inline operator MPI_Request*() { return &the_real_request; }
-: 764: inline operator MPI_Request() const { return the_real_request; }
-: 765: Request& operator=(const MPI_Request& obj) {
-: 766: the_real_request = obj; return *this; }
-: 767: static bool Testany( int v1, Request v2[], int &v3, Status & v5 )
-: 768: {
-: 769: int v4;
-: 770: MPI_Request *l2 = new MPI_Request[v1];
-: 771: {
-: 772: int i2;
-: 773: for (i2=0;i2<v1;i2++) {
-: 774: l2[i2] = v2[i2].the_real_request;
-: 775: }
-: 776: }
-: 777: MPIX_CALL( MPI_Testany( v1, l2, &v3, &v4, (MPI_Status *)&(v5.the_real_status ) ));
-: 778: {
-: 779: int i2;
-: 780: for (i2=0;i2<v1;i2++) {
-: 781: v2[i2].the_real_request = l2[i2];
-: 782: }
-: 783: delete[] l2;
-: 784: }
-: 785: return v4!= 0;
-: 786: }
-: 787: static bool Testany( int v1, Request v2[], int &v3 )
-: 788: {
-: 789: int v4;
-: 790: MPI_Request *l2 = new MPI_Request[v1];
-: 791: {
-: 792: int i2;
-: 793: for (i2=0;i2<v1;i2++) {
-: 794: l2[i2] = v2[i2].the_real_request;
-: 795: }
-: 796: }
-: 797: MPIX_CALL( MPI_Testany( v1, l2, &v3, &v4, MPI_STATUS_IGNORE ));
-: 798: {
-: 799: int i2;
-: 800: for (i2=0;i2<v1;i2++) {
-: 801: v2[i2].the_real_request = l2[i2];
-: 802: }
-: 803: delete[] l2;
-: 804: }
-: 805: return v4!= 0;
-: 806: }
-: 807: static int Waitsome( int v1, Request v2[], int * v4, Status v5[] )
-: 808: {
-: 809: int v3;
-: 810: MPI_Request *l2 = new MPI_Request[v1];
-: 811: MPI_Status *l5 = new MPI_Status[v1];
-: 812: {
-: 813: int i2;
-: 814: for (i2=0;i2<v1;i2++) {
-: 815: l2[i2] = v2[i2].the_real_request;
-: 816: }
-: 817: }
-: 818: MPIX_CALL( MPI_Waitsome( v1, l2, &v3, v4, l5 ));
-: 819: {
-: 820: int i2;
-: 821: for (i2=0;i2<v1;i2++) {
-: 822: v2[i2].the_real_request = l2[i2];
-: 823: }
-: 824: delete[] l2;
-: 825: }
-: 826: {
-: 827: int i5;
-: 828: for (i5=0;i5<v1;i5++) {
-: 829: v5[i5].the_real_status = l5[i5];
-: 830: }
-: 831: delete[] l5;
-: 832: }
-: 833: return v3;
-: 834: }
-: 835: static int Waitsome( int v1, Request v2[], int * v4 )
-: 836: {
-: 837: int v3;
-: 838: MPI_Request *l2 = new MPI_Request[v1];
-: 839: {
-: 840: int i2;
-: 841: for (i2=0;i2<v1;i2++) {
-: 842: l2[i2] = v2[i2].the_real_request;
-: 843: }
-: 844: }
-: 845: MPIX_CALL( MPI_Waitsome( v1, l2, &v3, v4, MPI_STATUSES_IGNORE ));
-: 846: {
-: 847: int i2;
-: 848: for (i2=0;i2<v1;i2++) {
-: 849: v2[i2].the_real_request = l2[i2];
-: 850: }
-: 851: delete[] l2;
-: 852: }
-: 853: return v3;
-: 854: }
|
#####: 855: virtual void Free( void )
-: 856: {
#####: 857: MPIX_CALL( MPI_Request_free( (MPI_Request *) &the_real_request ));
#####: 858: }
-: 859: static bool Testall( int v1, Request v2[], Status v4[] )
-: 860: {
-: 861: int v3;
-: 862: MPI_Request *l2 = new MPI_Request[v1];
-: 863: MPI_Status *l4 = new MPI_Status[v1];
-: 864: {
-: 865: int i2;
-: 866: for (i2=0;i2<v1;i2++) {
-: 867: l2[i2] = v2[i2].the_real_request;
-: 868: }
-: 869: }
-: 870: MPIX_CALL( MPI_Testall( v1, l2, &v3, l4 ));
-: 871: {
-: 872: int i2;
-: 873: for (i2=0;i2<v1;i2++) {
-: 874: v2[i2].the_real_request = l2[i2];
-: 875: }
-: 876: delete[] l2;
-: 877: }
-: 878: {
-: 879: int i4;
-: 880: for (i4=0;i4<v1;i4++) {
-: 881: v4[i4].the_real_status = l4[i4];
-: 882: }
-: 883: delete[] l4;
-: 884: }
-: 885: return v3!= 0;
-: 886: }
-: 887: static bool Testall( int v1, Request v2[] )
-: 888: {
-: 889: int v3;
-: 890: MPI_Request *l2 = new MPI_Request[v1];
-: 891: {
-: 892: int i2;
-: 893: for (i2=0;i2<v1;i2++) {
-: 894: l2[i2] = v2[i2].the_real_request;
-: 895: }
-: 896: }
-: 897: MPIX_CALL( MPI_Testall( v1, l2, &v3, MPI_STATUSES_IGNORE ));
-: 898: {
-: 899: int i2;
-: 900: for (i2=0;i2<v1;i2++) {
-: 901: v2[i2].the_real_request = l2[i2];
-: 902: }
-: 903: delete[] l2;
-: 904: }
-: 905: return v3!= 0;
-: 906: }
#####: 907: virtual void Wait( Status & v2 )
-: 908: {
#####: 909: MPIX_CALL( MPI_Wait( (MPI_Request *) &the_real_request, (MPI_Status *)&(v2.the_real_status ) ));
#####: 910: }
#####: 911: virtual void Wait( void )
-: 912: {
#####: 913: MPIX_CALL( MPI_Wait( (MPI_Request *) &the_real_request, MPI_STATUS_IGNORE ));
#####: 914: }
-: 915: static int Testsome( int v1, Request v2[], int * v4, Status v5[] )
-: 916: {
-: 917: int v3;
-: 918: MPI_Request *l2 = new MPI_Request[v1];
-: 919: MPI_Status *l5 = new MPI_Status[v1];
-: 920: {
-: 921: int i2;
-: 922: for (i2=0;i2<v1;i2++) {
-: 923: l2[i2] = v2[i2].the_real_request;
-: 924: }
-: 925: }
-: 926: MPIX_CALL( MPI_Testsome( v1, l2, &v3, v4, l5 ));
-: 927: {
-: 928: int i2;
-: 929: for (i2=0;i2<v1;i2++) {
-: 930: v2[i2].the_real_request = l2[i2];
-: 931: }
-: 932: delete[] l2;
-: 933: }
-: 934: {
-: 935: int i5;
-: 936: for (i5=0;i5<v1;i5++) {
-: 937: v5[i5].the_real_status = l5[i5];
-: 938: }
-: 939: delete[] l5;
-: 940: }
-: 941: return v3;
-: 942: }
-: 943: static int Testsome( int v1, Request v2[], int * v4 )
-: 944: {
-: 945: int v3;
-: 946: MPI_Request *l2 = new MPI_Request[v1];
-: 947: {
-: 948: int i2;
-: 949: for (i2=0;i2<v1;i2++) {
-: 950: l2[i2] = v2[i2].the_real_request;
-: 951: }
-: 952: }
-: 953: MPIX_CALL( MPI_Testsome( v1, l2, &v3, v4, MPI_STATUSES_IGNORE ));
-: 954: {
-: 955: int i2;
-: 956: for (i2=0;i2<v1;i2++) {
-: 957: v2[i2].the_real_request = l2[i2];
-: 958: }
-: 959: delete[] l2;
-: 960: }
-: 961: return v3;
-: 962: }
-: 963: static void Waitall( int v1, Request v2[], Status v3[] )
-: 964: {
-: 965: MPI_Request *l2 = new MPI_Request[v1];
-: 966: MPI_Status *l3 = new MPI_Status[v1];
-: 967: {
-: 968: int i2;
-: 969: for (i2=0;i2<v1;i2++) {
-: 970: l2[i2] = v2[i2].the_real_request;
-: 971: }
-: 972: }
-: 973: MPIX_CALL( MPI_Waitall( v1, l2, l3 ));
-: 974: {
-: 975: int i2;
-: 976: for (i2=0;i2<v1;i2++) {
-: 977: v2[i2].the_real_request = l2[i2];
-: 978: }
-: 979: delete[] l2;
-: 980: }
-: 981: {
-: 982: int i3;
-: 983: for (i3=0;i3<v1;i3++) {
-: 984: v3[i3].the_real_status = l3[i3];
-: 985: }
-: 986: delete[] l3;
-: 987: }
-: 988: }
-: 989: static void Waitall( int v1, Request v2[] )
-: 990: {
-: 991: MPI_Request *l2 = new MPI_Request[v1];
-: 992: {
-: 993: int i2;
-: 994: for (i2=0;i2<v1;i2++) {
-: 995: l2[i2] = v2[i2].the_real_request;
-: 996: }
-: 997: }
-: 998: MPIX_CALL( MPI_Waitall( v1, l2, MPI_STATUSES_IGNORE ));
-: 999: {
-: 1000: int i2;
-: 1001: for (i2=0;i2<v1;i2++) {
-: 1002: v2[i2].the_real_request = l2[i2];
-: 1003: }
-: 1004: delete[] l2;
-: 1005: }
-: 1006: }
-: 1007: static int Waitany( int v1, Request v2[], Status & v4 )
-: 1008: {
-: 1009: int v3;
-: 1010: MPI_Request *l2 = new MPI_Request[v1];
-: 1011: {
-: 1012: int i2;
-: 1013: for (i2=0;i2<v1;i2++) {
-: 1014: l2[i2] = v2[i2].the_real_request;
-: 1015: }
-: 1016: }
-: 1017: MPIX_CALL( MPI_Waitany( v1, l2, &v3, (MPI_Status *)&(v4.the_real_status ) ));
-: 1018: {
-: 1019: int i2;
-: 1020: for (i2=0;i2<v1;i2++) {
-: 1021: v2[i2].the_real_request = l2[i2];
-: 1022: }
-: 1023: delete[] l2;
-: 1024: }
-: 1025: return v3;
-: 1026: }
-: 1027: static int Waitany( int v1, Request v2[] )
-: 1028: {
-: 1029: int v3;
-: 1030: MPI_Request *l2 = new MPI_Request[v1];
-: 1031: {
-: 1032: int i2;
-: 1033: for (i2=0;i2<v1;i2++) {
-: 1034: l2[i2] = v2[i2].the_real_request;
-: 1035: }
-: 1036: }
-: 1037: MPIX_CALL( MPI_Waitany( v1, l2, &v3, MPI_STATUS_IGNORE ));
-: 1038: {
-: 1039: int i2;
-: 1040: for (i2=0;i2<v1;i2++) {
-: 1041: v2[i2].the_real_request = l2[i2];
-: 1042: }
-: 1043: delete[] l2;
-: 1044: }
-: 1045: return v3;
-: 1046: }
#####: 1047: virtual bool Test( Status & v3 )
-: 1048: {
-: 1049: int v2;
#####: 1050: MPIX_CALL( MPI_Test( (MPI_Request *) &the_real_request, &v2, (MPI_Status *)&(v3.the_real_status ) ));
#####: 1051: return v2!= 0;
-: 1052: }
#####: 1053: virtual bool Test( void )
-: 1054: {
-: 1055: int v2;
#####: 1056: MPIX_CALL( MPI_Test( (MPI_Request *) &the_real_request, &v2, MPI_STATUS_IGNORE ));
#####: 1057: return v2!= 0;
-: 1058: }
#####: 1059: virtual void Cancel( void ) const
-: 1060: {
#####: 1061: MPIX_CALL( MPI_Cancel( (MPI_Request *) &the_real_request ));
#####: 1062: }
#####: 1063: virtual bool Get_status( Status & v3 ) const
-: 1064: {
-: 1065: int v2;
#####: 1066: MPIX_CALL( MPI_Request_get_status( (MPI_Request) the_real_request, &v2, (MPI_Status *)&(v3.the_real_status ) ));
#####: 1067: return v2!= 0;
-: 1068: }
#####: 1069: virtual bool Get_status( void ) const
-: 1070: {
-: 1071: int v2;
#####: 1072: MPIX_CALL( MPI_Request_get_status( (MPI_Request) the_real_request, &v2, MPI_STATUS_IGNORE ));
#####: 1073: return v2!= 0;
-: 1074: }
-: 1075:};
-: 1076:
-: 1077:class Prequest : public Request {
-: 1078:
-: 1079: public:
-: 1080: // new/delete
-: 1081:
-: 1082: inline Prequest(MPI_Request obj) : Request(obj) {}
#####: 1083: inline Prequest(void) : Request() {}
-: 1084:
#####: 1085: virtual ~Prequest() {}
-: 1086: // copy/assignment
-: 1087:
-: 1088: Prequest(const Prequest &obj) : Request(obj) {}
-: 1089:
-: 1090: Prequest& operator=(const Prequest &obj) {
-: 1091: the_real_request = obj.the_real_request; return *this; }
-: 1092:
-: 1093: // C/C++ cast and assignment
-: 1094: inline operator MPI_Request*() { return &the_real_request; }
-: 1095: inline operator MPI_Request() const { return the_real_request; }
-: 1096: Prequest& operator=(const MPI_Request& obj) {
-: 1097: the_real_request = obj; return *this; }
#####: 1098: virtual void Start( void )
-: 1099: {
#####: 1100: MPIX_CALL( MPI_Start( (MPI_Request *) &the_real_request ));
#####: 1101: }
-: 1102: static void Startall( int v1, Prequest v2[] )
-: 1103: {
-: 1104: MPI_Request *l2 = new MPI_Request[v1];
-: 1105: {
-: 1106: int i2;
-: 1107: for (i2=0;i2<v1;i2++) {
-: 1108: l2[i2] = v2[i2].the_real_request;
-: 1109: }
-: 1110: }
-: 1111: MPIX_CALL( MPI_Startall( v1, l2 ));
-: 1112: {
-: 1113: int i2;
-: 1114: for (i2=0;i2<v1;i2++) {
-: 1115: v2[i2].the_real_request = l2[i2];
-: 1116: }
-: 1117: delete[] l2;
-: 1118: }
-: 1119: }
-: 1120:};
-: 1121:
-: 1122:class Comm {
-: 1123: friend class Cartcomm;
-: 1124: friend class Intercomm;
-: 1125: friend class Intracomm;
-: 1126: friend class Graphcomm;
-: 1127: friend class Nullcomm;
-: 1128: friend class Datatype;
-: 1129: friend class Win;
-: 1130: friend class File;
-: 1131:
-: 1132: protected:
-: 1133: MPI_Comm the_real_comm;
-: 1134:
-: 1135: public:
-: 1136: // new/delete
-: 1137:
|
1047: 1138: inline Comm(MPI_Comm obj) : the_real_comm(obj) {}
576: 1139: inline Comm(void) : the_real_comm(MPI_COMM_NULL) {}
-: 1140:
1566: 1141: virtual ~Comm() {}
-: 1142: // copy/assignment
-: 1143:
10: 1144: Comm(const Comm &obj) : the_real_comm(obj.the_real_comm){}
-: 1145:
-: 1146: Comm& operator=(const Comm &obj) {
-: 1147: the_real_comm = obj.the_real_comm; return *this; }
-: 1148:
-: 1149: // logical
-: 1150: bool operator== (const Comm &obj) {
-: 1151: return (the_real_comm == obj.the_real_comm); }
-: 1152: bool operator!= (const Comm &obj) {
-: 1153: return (the_real_comm != obj.the_real_comm); }
-: 1154: // C/C++ cast and assignment
-: 1155: inline operator MPI_Comm*() { return &the_real_comm; }
-: 1156: inline operator MPI_Comm() const { return the_real_comm; }
-: 1157: Comm& operator=(const MPI_Comm& obj) {
-: 1158: the_real_comm = obj; return *this; }
|
#####: 1159: virtual Group Get_group( void ) const
-: 1160: {
#####: 1161: Group v2;
#####: 1162: MPIX_CALL( MPI_Comm_group( (MPI_Comm) the_real_comm, &(v2.the_real_group) ));
#####: 1163: return v2;
-: 1164: }
#####: 1165: virtual int Get_rank( void ) const
-: 1166: {
-: 1167: int v2;
#####: 1168: MPIX_CALL( MPI_Comm_rank( (MPI_Comm) the_real_comm, &v2 ));
#####: 1169: return v2;
-: 1170: }
#####: 1171: virtual Prequest Bsend_init( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1172: {
#####: 1173: Prequest v7;
#####: 1174: MPIX_CALL( MPI_Bsend_init( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, &(v7.the_real_request) ));
#####: 1175: return v7;
-: 1176: }
#####: 1177: virtual Prequest Ssend_init( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1178: {
#####: 1179: Prequest v7;
#####: 1180: MPIX_CALL( MPI_Ssend_init( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, &(v7.the_real_request) ));
#####: 1181: return v7;
-: 1182: }
#####: 1183: virtual bool Is_inter( void ) const
-: 1184: {
-: 1185: int v2;
#####: 1186: MPIX_CALL( MPI_Comm_test_inter( (MPI_Comm) the_real_comm, &v2 ));
#####: 1187: return v2!= 0;
-: 1188: }
#####: 1189: virtual Prequest Rsend_init( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1190: {
#####: 1191: Prequest v7;
#####: 1192: MPIX_CALL( MPI_Rsend_init( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, &(v7.the_real_request) ));
#####: 1193: return v7;
-: 1194: }
#####: 1195: virtual Request Ibsend( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1196: {
#####: 1197: Request v7;
#####: 1198: MPIX_CALL( MPI_Ibsend( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, &(v7.the_real_request) ));
#####: 1199: return v7;
-: 1200: }
#####: 1201: virtual void Abort( int v2 ) const
-: 1202: {
#####: 1203: MPIX_CALL( MPI_Abort( (MPI_Comm) the_real_comm, v2 ));
#####: 1204: }
|
80: 1205: virtual void Free( void )
-: 1206: {
80: 1207: MPIX_CALL( MPI_Comm_free( (MPI_Comm *) &the_real_comm ));
80: 1208: }
|
#####: 1209: virtual Prequest Send_init( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1210: {
#####: 1211: Prequest v7;
#####: 1212: MPIX_CALL( MPI_Send_init( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, &(v7.the_real_request) ));
#####: 1213: return v7;
-: 1214: }
#####: 1215: virtual void Recv( void* v1, int v2, const Datatype &v3, int v4, int v5, Status & v7 ) const
-: 1216: {
#####: 1217: MPIX_CALL( MPI_Recv( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, (MPI_Status *)&(v7.the_real_status ) ));
#####: 1218: }
#####: 1219: virtual void Recv( void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1220: {
#####: 1221: MPIX_CALL( MPI_Recv( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, MPI_STATUS_IGNORE ));
#####: 1222: }
#####: 1223: virtual void Sendrecv( const void * v1, int v2, const Datatype &v3, int v4, int v5, void * v6, int v7, const Datatype &v8, int v9, int v10, Status & v12 ) const
-: 1224: {
#####: 1225: MPIX_CALL( MPI_Sendrecv( (void *)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, v6, v7, (MPI_Datatype)(v8.the_real_datatype), v9, v10, (MPI_Comm) the_real_comm, (MPI_Status *)&(v12.the_real_status ) ));
#####: 1226: }
#####: 1227: virtual void Sendrecv( const void * v1, int v2, const Datatype &v3, int v4, int v5, void * v6, int v7, const Datatype &v8, int v9, int v10 ) const
-: 1228: {
#####: 1229: MPIX_CALL( MPI_Sendrecv( (void *)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, v6, v7, (MPI_Datatype)(v8.the_real_datatype), v9, v10, (MPI_Comm) the_real_comm, MPI_STATUS_IGNORE ));
#####: 1230: }
|
8: 1231: virtual void Sendrecv_replace( void* v1, int v2, const Datatype &v3, int v4, int v5, int v6, int v7, Status & v9 ) const
-: 1232: {
8: 1233: MPIX_CALL( MPI_Sendrecv_replace( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, v6, v7, (MPI_Comm) the_real_comm, (MPI_Status *)&(v9.the_real_status ) ));
8: 1234: }
|
#####: 1235: virtual void Sendrecv_replace( void* v1, int v2, const Datatype &v3, int v4, int v5, int v6, int v7 ) const
-: 1236: {
#####: 1237: MPIX_CALL( MPI_Sendrecv_replace( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, v6, v7, (MPI_Comm) the_real_comm, MPI_STATUS_IGNORE ));
#####: 1238: }
#####: 1239: virtual int Get_topology( void ) const
-: 1240: {
-: 1241: int v2;
#####: 1242: MPIX_CALL( MPI_Topo_test( (MPI_Comm) the_real_comm, &v2 ));
#####: 1243: return v2;
-: 1244: }
#####: 1245: virtual Request Isend( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1246: {
#####: 1247: Request v7;
#####: 1248: MPIX_CALL( MPI_Isend( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, &(v7.the_real_request) ));
#####: 1249: return v7;
-: 1250: }
#####: 1251: virtual void Probe( int v1, int v2, Status & v4 ) const
-: 1252: {
#####: 1253: MPIX_CALL( MPI_Probe( v1, v2, (MPI_Comm) the_real_comm, (MPI_Status *)&(v4.the_real_status ) ));
#####: 1254: }
#####: 1255: virtual void Probe( int v1, int v2 ) const
-: 1256: {
#####: 1257: MPIX_CALL( MPI_Probe( v1, v2, (MPI_Comm) the_real_comm, MPI_STATUS_IGNORE ));
#####: 1258: }
-: 1259: static int Compare( const Comm &v1, const Comm &v2 )
-: 1260: {
-: 1261: int v3;
-: 1262: MPIX_CALL( MPI_Comm_compare( (MPI_Comm)(v1.the_real_comm), (MPI_Comm)(v2.the_real_comm), &v3 ));
-: 1263: return v3;
-: 1264: }
#####: 1265: virtual int Get_size( void ) const
-: 1266: {
-: 1267: int v2;
#####: 1268: MPIX_CALL( MPI_Comm_size( (MPI_Comm) the_real_comm, &v2 ));
#####: 1269: return v2;
-: 1270: }
#####: 1271: virtual Request Issend( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1272: {
#####: 1273: Request v7;
#####: 1274: MPIX_CALL( MPI_Issend( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, &(v7.the_real_request) ));
#####: 1275: return v7;
-: 1276: }
|
4: 1277: virtual void Set_errhandler( const Errhandler &v2 )
-: 1278: {
4: 1279: MPIX_CALL( MPI_Comm_set_errhandler( (MPI_Comm) the_real_comm, (MPI_Errhandler)(v2.the_real_errhandler) ));
4: 1280: }
|
#####: 1281: virtual void Send( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1282: {
#####: 1283: MPIX_CALL( MPI_Send( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm ));
#####: 1284: }
#####: 1285: virtual Request Irsend( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1286: {
#####: 1287: Request v7;
#####: 1288: MPIX_CALL( MPI_Irsend( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, &(v7.the_real_request) ));
#####: 1289: return v7;
-: 1290: }
#####: 1291: virtual void Ssend( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1292: {
#####: 1293: MPIX_CALL( MPI_Ssend( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm ));
#####: 1294: }
#####: 1295: virtual Prequest Recv_init( void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1296: {
#####: 1297: Prequest v7;
#####: 1298: MPIX_CALL( MPI_Recv_init( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, &(v7.the_real_request) ));
#####: 1299: return v7;
-: 1300: }
#####: 1301: virtual bool Iprobe( int v1, int v2, Status & v5 ) const
-: 1302: {
-: 1303: int v4;
#####: 1304: MPIX_CALL( MPI_Iprobe( v1, v2, (MPI_Comm) the_real_comm, &v4, (MPI_Status *)&(v5.the_real_status ) ));
#####: 1305: return v4!= 0;
-: 1306: }
#####: 1307: virtual bool Iprobe( int v1, int v2 ) const
-: 1308: {
-: 1309: int v4;
#####: 1310: MPIX_CALL( MPI_Iprobe( v1, v2, (MPI_Comm) the_real_comm, &v4, MPI_STATUS_IGNORE ));
#####: 1311: return v4!= 0;
-: 1312: }
#####: 1313: virtual void Bsend( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1314: {
#####: 1315: MPIX_CALL( MPI_Bsend( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm ));
#####: 1316: }
#####: 1317: virtual Request Irecv( void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1318: {
#####: 1319: Request v7;
#####: 1320: MPIX_CALL( MPI_Irecv( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm, &(v7.the_real_request) ));
#####: 1321: return v7;
-: 1322: }
|
4: 1323: virtual Errhandler Get_errhandler( void ) const
-: 1324: {
4: 1325: Errhandler v2;
4: 1326: MPIX_CALL( MPI_Comm_get_errhandler( (MPI_Comm) the_real_comm, &(v2.the_real_errhandler) ));
|
#####: 1327: return v2;
-: 1328: }
#####: 1329: virtual void Rsend( const void* v1, int v2, const Datatype &v3, int v4, int v5 ) const
-: 1330: {
#####: 1331: MPIX_CALL( MPI_Rsend( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Comm) the_real_comm ));
#####: 1332: }
#####: 1333: virtual void Reduce_scatter_block( const void * v1, void * v2, int v3, const Datatype &v4, const Op &v5 ) const
-: 1334: {
#####: 1335: MPIX_CALL( MPI_Reduce_scatter_block( (void *)v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op)(v5.the_real_op), (MPI_Comm) the_real_comm ));
#####: 1336: }
#####: 1337: virtual void Gatherv( const void* v1, int v2, const Datatype &v3, void* v4, const int * v5, const int * v6, const Datatype &v7, int v8 ) const
-: 1338: {
#####: 1339: MPIX_CALL( MPI_Gatherv( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, (int *)v5, (int *)v6, (MPI_Datatype)(v7.the_real_datatype), v8, (MPI_Comm) the_real_comm ));
#####: 1340: }
#####: 1341: virtual void Disconnect( void )
-: 1342: {
#####: 1343: MPIX_CALL( MPI_Comm_disconnect( (MPI_Comm *) &the_real_comm ));
#####: 1344: }
#####: 1345: virtual void Allreduce( const void* v1, void* v2, int v3, const Datatype &v4, const Op &v5 ) const
-: 1346: {
#####: 1347: MPIX_CALL( MPI_Allreduce( (void*)v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op)(v5.the_real_op), (MPI_Comm) the_real_comm ));
#####: 1348: }
#####: 1349: virtual void Alltoallw( const void * v1, const int v2[], const int v3[], const Datatype v4[], void * v5, const int v6[], const int v7[], const Datatype v8[] ) const
-: 1350: {
#####: 1351: MPI_Datatype *l4 = new MPI_Datatype[Get_size()];
#####: 1352: MPI_Datatype *l8 = new MPI_Datatype[Get_size()];
-: 1353: {
-: 1354: int i4;
#####: 1355: for (i4=0;i4<Get_size();i4++) {
#####: 1356: l4[i4] = v4[i4].the_real_datatype;
-: 1357: }
-: 1358: }
-: 1359: {
-: 1360: int i8;
#####: 1361: for (i8=0;i8<Get_size();i8++) {
#####: 1362: l8[i8] = v8[i8].the_real_datatype;
-: 1363: }
-: 1364: }
#####: 1365: MPIX_CALL( MPI_Alltoallw( (void *)v1, (int *)v2, (int *)v3, l4, v5, (int *)v6, (int *)v7, l8, (MPI_Comm) the_real_comm ));
#####: 1366: delete[] l4;
#####: 1367: delete[] l8;
#####: 1368: }
-: 1369: static Intercomm Join( const int v1 ) ;
#####: 1370: virtual void Alltoall( const void* v1, int v2, const Datatype &v3, void* v4, int v5, const Datatype &v6 ) const
-: 1371: {
#####: 1372: MPIX_CALL( MPI_Alltoall( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Datatype)(v6.the_real_datatype), (MPI_Comm) the_real_comm ));
#####: 1373: }
#####: 1374: virtual bool Get_attr( int v2, void * v3 ) const
-: 1375: {
-: 1376: int v4;
#####: 1377: MPIX_CALL( MPI_Comm_get_attr( (MPI_Comm) the_real_comm, v2, v3, &v4 ));
#####: 1378: return v4!= 0;
-: 1379: }
#####: 1380: virtual void Barrier( void ) const
-: 1381: {
#####: 1382: MPIX_CALL( MPI_Barrier( (MPI_Comm) the_real_comm ));
#####: 1383: }
#####: 1384: virtual void Bcast( void* v1, int v2, const Datatype &v3, int v4 ) const
-: 1385: {
#####: 1386: MPIX_CALL( MPI_Bcast( v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, (MPI_Comm) the_real_comm ));
#####: 1387: }
#####: 1388: virtual void Set_attr( int v2, const void * v3 )
-: 1389: {
#####: 1390: MPIX_CALL( MPI_Comm_set_attr( (MPI_Comm) the_real_comm, v2, (void *)v3 ));
#####: 1391: }
#####: 1392: virtual void Set_name( const char * v2 )
-: 1393: {
#####: 1394: MPIX_CALL( MPI_Comm_set_name( (MPI_Comm) the_real_comm, (char *)v2 ));
#####: 1395: }
-: 1396: static Intercomm Get_parent( void ) ;
#####: 1397: virtual void Alltoallv( const void* v1, const int * v2, const int * v3, const Datatype &v4, void* v5, const int * v6, const int * v7, const Datatype &v8 ) const
-: 1398: {
#####: 1399: MPIX_CALL( MPI_Alltoallv( (void*)v1, (int *)v2, (int *)v3, (MPI_Datatype)(v4.the_real_datatype), v5, (int *)v6, (int *)v7, (MPI_Datatype)(v8.the_real_datatype), (MPI_Comm) the_real_comm ));
#####: 1400: }
#####: 1401: virtual void Reduce_scatter( const void* v1, void* v2, int * v3, const Datatype &v4, const Op &v5 ) const
-: 1402: {
#####: 1403: MPIX_CALL( MPI_Reduce_scatter( (void*)v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op)(v5.the_real_op), (MPI_Comm) the_real_comm ));
#####: 1404: }
#####: 1405: virtual void Scatter( const void* v1, int v2, const Datatype &v3, void* v4, int v5, const Datatype &v6, int v7 ) const
-: 1406: {
#####: 1407: MPIX_CALL( MPI_Scatter( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Datatype)(v6.the_real_datatype), v7, (MPI_Comm) the_real_comm ));
#####: 1408: }
-: 1409: virtual void Call_errhandler( int v2 ) const;
#####: 1410: virtual void Gather( const void* v1, int v2, const Datatype &v3, void* v4, int v5, const Datatype &v6, int v7 ) const
-: 1411: {
#####: 1412: MPIX_CALL( MPI_Gather( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Datatype)(v6.the_real_datatype), v7, (MPI_Comm) the_real_comm ));
#####: 1413: }
-: 1414: static void Free_keyval( int &v1 )
-: 1415: {
-: 1416: MPIX_CALL( MPI_Comm_free_keyval( &v1 ));
-: 1417: }
#####: 1418: virtual void Reduce( const void* v1, void* v2, int v3, const Datatype &v4, const Op &v5, int v6 ) const
-: 1419: {
#####: 1420: MPIX_CALL( MPI_Reduce( (void*)v1, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Op)(v5.the_real_op), v6, (MPI_Comm) the_real_comm ));
#####: 1421: }
#####: 1422: virtual void Allgather( const void* v1, int v2, const Datatype &v3, void* v4, int v5, const Datatype &v6 ) const
-: 1423: {
#####: 1424: MPIX_CALL( MPI_Allgather( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, v5, (MPI_Datatype)(v6.the_real_datatype), (MPI_Comm) the_real_comm ));
#####: 1425: }
#####: 1426: virtual void Delete_attr( int v2 )
-: 1427: {
#####: 1428: MPIX_CALL( MPI_Comm_delete_attr( (MPI_Comm) the_real_comm, v2 ));
#####: 1429: }
#####: 1430: virtual void Scatterv( const void* v1, const int * v2, const int * v3, const Datatype &v4, void* v5, int v6, const Datatype &v7, int v8 ) const
-: 1431: {
#####: 1432: MPIX_CALL( MPI_Scatterv( (void*)v1, (int *)v2, (int *)v3, (MPI_Datatype)(v4.the_real_datatype), v5, v6, (MPI_Datatype)(v7.the_real_datatype), v8, (MPI_Comm) the_real_comm ));
#####: 1433: }
#####: 1434: virtual void Get_name( char * v2, int &v3 ) const
-: 1435: {
#####: 1436: MPIX_CALL( MPI_Comm_get_name( (MPI_Comm) the_real_comm, v2, &v3 ));
#####: 1437: }
#####: 1438: virtual void Allgatherv( const void* v1, int v2, const Datatype &v3, void* v4, const int * v5, const int * v6, const Datatype &v7 ) const
-: 1439: {
#####: 1440: MPIX_CALL( MPI_Allgatherv( (void*)v1, v2, (MPI_Datatype)(v3.the_real_datatype), v4, (int *)v5, (int *)v6, (MPI_Datatype)(v7.the_real_datatype), (MPI_Comm) the_real_comm ));
#####: 1441: }
-: 1442: virtual Comm &Clone(void) const = 0;
-: 1443: typedef int Copy_attr_function(const Comm& oldcomm, int comm_keyval, void* extra_state, void* attribute_val_in, void* attribute_val_out, bool& flag);
-: 1444: typedef int Delete_attr_function(Comm& comm, int comm_keyval, void* attribute_val, void* extra_state);
-: 1445: typedef void Errhandler_function(Comm &, int *, ... );
-: 1446: typedef Errhandler_function Errhandler_fn;
-: 1447:
-: 1448: static int Create_keyval( Copy_attr_function *, Delete_attr_function *,
-: 1449: void * );
-: 1450:
-: 1451: static int NULL_COPY_FN( const Comm &oldcomm, int keyval, void *ex,
#####: 1452: void *attr_in, void *attr_out, bool &flag ) { flag = 0; return 0;}
#####: 1453: static int NULL_DELETE_FN( Comm &comm, int keyval, void * attr, void *ex )
#####: 1454: { return 0; }
-: 1455: static int DUP_FN( const Comm &oldcomm, int keyval, void *ex,
-: 1456: void *attr_in, void *attr_out, bool &flag ) { flag = 1;
-: 1457: *(void **)attr_out = attr_in; return 0;}
-: 1458: static Errhandler Create_errhandler( Errhandler_function * );
-: 1459:
-: 1460:};
-: 1461:
-: 1462:class Nullcomm : public Comm {
-: 1463:
-: 1464: public:
-: 1465: // new/delete
-: 1466:
-: 1467: inline Nullcomm(MPI_Comm obj) : Comm(obj) {}
|
1018: 1468: inline Nullcomm(void) : Comm() {}
-: 1469:
509: 1470: virtual ~Nullcomm() {}
-: 1471: // copy/assignment
-: 1472:
-: 1473: Nullcomm(const Nullcomm &obj) : Comm(obj) {}
-: 1474:
-: 1475: Nullcomm& operator=(const Nullcomm &obj) {
-: 1476: the_real_comm = obj.the_real_comm; return *this; }
-: 1477:
-: 1478: // C/C++ cast and assignment
-: 1479: inline operator MPI_Comm*() { return &the_real_comm; }
-: 1480: inline operator MPI_Comm() const { return the_real_comm; }
-: 1481: Nullcomm& operator=(const MPI_Comm& obj) {
-: 1482: the_real_comm = obj; return *this; }
-: 1483:
-: 1484:// If the compiler does not support variable return types, return a
-: 1485:// reference to Comm. The user must then cast this to the correct type
-: 1486:// (Standard-conforming C++ compilers support variable return types)
-: 1487:#ifdef HAVE_NO_VARIABLE_RETURN_TYPE_SUPPORT
-: 1488: virtual Comm & Clone(void) const {
-: 1489: Comm *clone = new Nullcomm(MPI_COMM_NULL);
-: 1490: return *clone;
-: 1491: };
-: 1492:#else
|
#####: 1493: virtual Nullcomm & Clone(void) const {
#####: 1494: Nullcomm *clone = new Nullcomm();
#####: 1495: return *clone;
-: 1496: };
-: 1497:#endif
-: 1498:};
-: 1499:
-: 1500:class Intercomm : public Comm {
-: 1501: friend class Intracomm;
-: 1502:
-: 1503: public:
-: 1504: // new/delete
-: 1505:
|
20: 1506: inline Intercomm(MPI_Comm obj) : Comm(obj) {}
20: 1507: inline Intercomm(void) : Comm() {}
-: 1508:
20: 1509: virtual ~Intercomm() {}
-: 1510: // copy/assignment
-: 1511:
20: 1512: Intercomm(const Intercomm &obj) : Comm(obj) {}
-: 1513:
10: 1514: Intercomm& operator=(const Intercomm &obj) {
10: 1515: the_real_comm = obj.the_real_comm; return *this; }
-: 1516:
-: 1517: // C/C++ cast and assignment
-: 1518: inline operator MPI_Comm*() { return &the_real_comm; }
-: 1519: inline operator MPI_Comm() const { return the_real_comm; }
-: 1520: Intercomm& operator=(const MPI_Comm& obj) {
-: 1521: the_real_comm = obj; return *this; }
-: 1522: virtual Intracomm Merge( bool v2 ) const;
8: 1523: virtual Group Get_remote_group( void ) const
-: 1524: {
8: 1525: Group v2;
8: 1526: MPIX_CALL( MPI_Comm_remote_group( (MPI_Comm) the_real_comm, &(v2.the_real_group) ));
|
#####: 1527: return v2;
-: 1528: }
|
65: 1529: virtual int Get_remote_size( void ) const
-: 1530: {
-: 1531: int v2;
65: 1532: MPIX_CALL( MPI_Comm_remote_size( (MPI_Comm) the_real_comm, &v2 ));
65: 1533: return v2;
-: 1534: }
-: 1535: Intercomm Dup( void ) const
-: 1536: {
-: 1537: Intercomm v2;
-: 1538: MPIX_CALL( MPI_Comm_dup( (MPI_Comm) the_real_comm, &(v2.the_real_comm) ));
-: 1539: return v2;
-: 1540: }
|
#####: 1541: virtual Intercomm Split( int v2, int v3 ) const
-: 1542: {
#####: 1543: Intercomm v4;
#####: 1544: MPIX_CALL( MPI_Comm_split( (MPI_Comm) the_real_comm, v2, v3, &(v4.the_real_comm) ));
#####: 1545: return v4;
-: 1546: }
-: 1547:
-: 1548:// If the compiler does not support variable return types, return a
-: 1549:// reference to Comm. The user must then cast this to the correct type
-: 1550:// (Standard-conforming C++ compilers support variable return types)
-: 1551:#ifdef HAVE_NO_VARIABLE_RETURN_TYPE_SUPPORT
-: 1552: virtual Comm & Clone(void) const {
-: 1553: MPI_Comm ncomm;
-: 1554: MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);
-: 1555: Comm *clone = new Intercomm(ncomm);
-: 1556: return *clone;
-: 1557: };
-: 1558:#else
#####: 1559: virtual Intercomm & Clone(void) const {
-: 1560: MPI_Comm ncomm;
#####: 1561: MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);
#####: 1562: Intercomm *clone = new Intercomm(ncomm);
#####: 1563: return *clone;
-: 1564: };
-: 1565:#endif
-: 1566:};
-: 1567:
-: 1568:class Intracomm : public Comm {
-: 1569: friend class Cartcomm;
-: 1570: friend class Graphcomm;
-: 1571: friend class Datatype;
-: 1572:
-: 1573: public:
-: 1574: // new/delete
-: 1575:
|
2074: 1576: inline Intracomm(MPI_Comm obj) : Comm(obj) {}
114: 1577: inline Intracomm(void) : Comm() {}
-: 1578:
1037: 1579: virtual ~Intracomm() {}
-: 1580: // copy/assignment
-: 1581:
-: 1582: Intracomm(const Intracomm &obj) : Comm(obj) {}
-: 1583:
-: 1584: Intracomm& operator=(const Intracomm &obj) {
-: 1585: the_real_comm = obj.the_real_comm; return *this; }
-: 1586:
-: 1587: // C/C++ cast and assignment
-: 1588: inline operator MPI_Comm*() { return &the_real_comm; }
-: 1589: inline operator MPI_Comm() const { return the_real_comm; }
-: 1590: Intracomm& operator=(const MPI_Comm& obj) {
-: 1591: the_real_comm = obj; return *this; }
|
#####: 1592: virtual Intercomm Create_intercomm( int v2, const Comm &v3, int v4, int v5 ) const
-: 1593: {
#####: 1594: Intercomm v6;
#####: 1595: MPIX_CALL( MPI_Intercomm_create( (MPI_Comm) the_real_comm, v2, (MPI_Comm)(v3.the_real_comm), v4, v5, &(v6.the_real_comm) ));
#####: 1596: return v6;
-: 1597: }
#####: 1598: virtual Intracomm Split( int v2, int v3 ) const
-: 1599: {
#####: 1600: Intracomm v4;
#####: 1601: MPIX_CALL( MPI_Comm_split( (MPI_Comm) the_real_comm, v2, v3, &(v4.the_real_comm) ));
#####: 1602: return v4;
-: 1603: }
-: 1604: virtual Graphcomm Create_graph( int v2, const int * v3, const int * v4, bool v5 ) const;
-: 1605: virtual Cartcomm Create_cart( int v2, const int * v3, const bool v4[], bool v5 ) const;
#####: 1606: virtual Intracomm Create( const Group &v2 ) const
-: 1607: {
#####: 1608: Intracomm v3;
#####: 1609: MPIX_CALL( MPI_Comm_create( (MPI_Comm) the_real_comm, (MPI_Group)(v2.the_real_group), &(v3.the_real_comm) ));
#####: 1610: return v3;
-: 1611: }
-: 1612: Intracomm Dup( void ) const
-: 1613: {
-: 1614: Intracomm v2;
-: 1615: MPIX_CALL( MPI_Comm_dup( (MPI_Comm) the_real_comm, &(v2.the_real_comm) ));
-: 1616: return v2;
-: 1617: }
#####: 1618: virtual void Scan( const void* v1, void* v2, int v3, const Datatype &v4, const Op &v5 ) const
-: 1619: {
#####: 1620: 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 ));
#####: 1621: }
#####: 1622: virtual void Exscan( const void * v1, void * v2, int v3, const Datatype &v4, const Op &v5 ) const
-: 1623: {
#####: 1624: 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 ));
#####: 1625: }
#####: 1626: virtual Intercomm Accept( const char * v1, const Info &v2, int v3 ) const
-: 1627: {
#####: 1628: Intercomm v5;
#####: 1629: MPIX_CALL( MPI_Comm_accept( (char *)v1, (MPI_Info)(v2.the_real_info), v3, (MPI_Comm) the_real_comm, &(v5.the_real_comm) ));
#####: 1630: return v5;
-: 1631: }
#####: 1632: virtual Intercomm Connect( const char * v1, const Info &v2, int v3 ) const
-: 1633: {
#####: 1634: Intercomm v5;
#####: 1635: MPIX_CALL( MPI_Comm_connect( (char *)v1, (MPI_Info)(v2.the_real_info), v3, (MPI_Comm) the_real_comm, &(v5.the_real_comm) ));
#####: 1636: return v5;
-: 1637: }
-: 1638:
-: 1639:// If the compiler does not support variable return types, return a
-: 1640:// reference to Comm. The user must then cast this to the correct type
-: 1641:// (Standard-conforming C++ compilers support variable return types)
-: 1642:#ifdef HAVE_NO_VARIABLE_RETURN_TYPE_SUPPORT
-: 1643: virtual Comm & Clone(void) const {
-: 1644: MPI_Comm ncomm;
-: 1645: MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);
-: 1646: Comm *clone = new Intracomm(ncomm);
-: 1647: return *clone;
-: 1648: };
-: 1649:#else
#####: 1650: virtual Intracomm & Clone(void) const {
-: 1651: MPI_Comm ncomm;
#####: 1652: MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);
#####: 1653: Intracomm *clone = new Intracomm(ncomm);
#####: 1654: return *clone;
-: 1655: };
-: 1656:#endif
-: 1657:
-: 1658:Intercomm Spawn(const char* command, const char* argv[], int maxprocs, const MPI::Info& info, int root) const {
-: 1659: Intercomm ic;
-: 1660: MPIX_CALL( MPI_Comm_spawn( (char *)command, (char **)argv,
-: 1661: maxprocs, info.the_real_info, root, the_real_comm,
-: 1662: &(ic.the_real_comm), MPI_ERRCODES_IGNORE ) );
-: 1663: return ic;
-: 1664:}
-: 1665:Intercomm Spawn(const char* command, const char* argv[], int maxprocs, const MPI::Info& info, int root, int array_of_errcodes[]) const {
-: 1666: Intercomm ic;
-: 1667: MPIX_CALL( MPI_Comm_spawn( (char *)command, (char **)argv,
-: 1668: maxprocs, info.the_real_info, root, the_real_comm,
-: 1669: &(ic.the_real_comm), array_of_errcodes ) );
-: 1670: return ic;
-: 1671:}
-: 1672: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) {
-: 1673: Intercomm ic;
-: 1674: MPI_Info *li = new MPI_Info [count];
-: 1675: int i;
-: 1676: for (i=0; i<count; i++) {
-: 1677: li[i] = array_of_info[i].the_real_info;
-: 1678: }
-: 1679: MPIX_CALL( MPI_Comm_spawn_multiple( count, (char **)array_of_commands,
-: 1680: (char ***)array_of_argv, (int *)array_of_maxprocs,
-: 1681: li, root, the_real_comm, &(ic.the_real_comm),
-: 1682: MPI_ERRCODES_IGNORE ) );
-: 1683: delete [] li;
-: 1684: return ic;
-: 1685:}
-: 1686: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[]) {
-: 1687: Intercomm ic;
-: 1688: MPI_Info *li = new MPI_Info [count];
-: 1689: int i;
-: 1690: for (i=0; i<count; i++) {
-: 1691: li[i] = array_of_info[i].the_real_info;
-: 1692: }
-: 1693: MPIX_CALL( MPI_Comm_spawn_multiple( count, (char **)array_of_commands,
-: 1694: (char ***)array_of_argv, (int *)array_of_maxprocs,
-: 1695: li, root, the_real_comm, &(ic.the_real_comm),
-: 1696: array_of_errcodes ) );
-: 1697: delete [] li;
-: 1698: return ic;
-: 1699:}
-: 1700:
-: 1701:};
-: 1702:
-: 1703:class Grequest : public Request {
-: 1704:
-: 1705: public:
-: 1706: // new/delete
-: 1707:
-: 1708: inline Grequest(MPI_Request obj) : Request(obj) {}
#####: 1709: inline Grequest(void) : Request() {}
-: 1710:
#####: 1711: virtual ~Grequest() {}
-: 1712: // copy/assignment
-: 1713:
-: 1714: Grequest(const Grequest &obj) : Request(obj) {}
-: 1715:
-: 1716: Grequest& operator=(const Grequest &obj) {
-: 1717: the_real_request = obj.the_real_request; return *this; }
-: 1718:
-: 1719: // logical
-: 1720: bool operator== (const Grequest &obj) {
-: 1721: return (the_real_request == obj.the_real_request); }
-: 1722: bool operator!= (const Grequest &obj) {
-: 1723: return (the_real_request != obj.the_real_request); }
-: 1724: // C/C++ cast and assignment
-: 1725: inline operator MPI_Request*() { return &the_real_request; }
-: 1726: inline operator MPI_Request() const { return the_real_request; }
-: 1727: Grequest& operator=(const MPI_Request& obj) {
-: 1728: the_real_request = obj; return *this; }
#####: 1729: virtual void Complete( void )
-: 1730: {
#####: 1731: MPIX_CALL( MPI_Grequest_complete( (MPI_Request) the_real_request ));
#####: 1732: }
-: 1733:
-: 1734: typedef int Query_function( void *, Status & );
-: 1735: typedef int Free_function( void * );
-: 1736: typedef int Cancel_function( void *, bool );
-: 1737:
-: 1738: Grequest Start( Query_function *query_fn,
-: 1739: Free_function *free_fn,
-: 1740: Cancel_function *cancel_fn,
-: 1741: void *extra_state );
-: 1742:};
-: 1743:
-: 1744:class Win {
-: 1745:
-: 1746: protected:
-: 1747: MPI_Win the_real_win;
-: 1748:
-: 1749: public:
-: 1750: // new/delete
-: 1751:
|
4: 1752: inline Win(MPI_Win obj) : the_real_win(obj) {}
509: 1753: inline Win(void) : the_real_win(MPI_WIN_NULL) {}
-: 1754:
513: 1755: virtual ~Win() {}
-: 1756: // copy/assignment
-: 1757:
-: 1758: Win(const Win &obj) : the_real_win(obj.the_real_win){}
-: 1759:
-: 1760: Win& operator=(const Win &obj) {
-: 1761: the_real_win = obj.the_real_win; return *this; }
-: 1762:
-: 1763: // logical
-: 1764: bool operator== (const Win &obj) {
-: 1765: return (the_real_win == obj.the_real_win); }
-: 1766: bool operator!= (const Win &obj) {
-: 1767: return (the_real_win != obj.the_real_win); }
-: 1768: // C/C++ cast and assignment
-: 1769: inline operator MPI_Win*() { return &the_real_win; }
-: 1770: inline operator MPI_Win() const { return the_real_win; }
-: 1771: Win& operator=(const MPI_Win& obj) {
-: 1772: the_real_win = obj; return *this; }
|
#####: 1773: virtual Group Get_group( void ) const
-: 1774: {
#####: 1775: Group v2;
#####: 1776: MPIX_CALL( MPI_Win_get_group( (MPI_Win) the_real_win, &(v2.the_real_group) ));
#####: 1777: return v2;
-: 1778: }
#####: 1779: virtual void Fence( int v1 ) const
-: 1780: {
#####: 1781: MPIX_CALL( MPI_Win_fence( v1, (MPI_Win) the_real_win ));
#####: 1782: }
#####: 1783: virtual void Start( const Group &v1, int v2 ) const
-: 1784: {
#####: 1785: MPIX_CALL( MPI_Win_start( (MPI_Group)(v1.the_real_group), v2, (MPI_Win) the_real_win ));
#####: 1786: }
|
8: 1787: virtual void Free( void )
-: 1788: {
8: 1789: MPIX_CALL( MPI_Win_free( (MPI_Win *) &the_real_win ));
8: 1790: }
|
#####: 1791: virtual void Put( const void * v1, int v2, const Datatype &v3, int v4, Aint v5, int v6, const Datatype &v7 ) const
-: 1792: {
#####: 1793: 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 ));
#####: 1794: }
#####: 1795: virtual void Wait( void ) const
-: 1796: {
#####: 1797: MPIX_CALL( MPI_Win_wait( (MPI_Win) the_real_win ));
#####: 1798: }
#####: 1799: virtual bool Test( void ) const
-: 1800: {
-: 1801: int v2;
#####: 1802: MPIX_CALL( MPI_Win_test( (MPI_Win) the_real_win, &v2 ));
#####: 1803: return v2!= 0;
-: 1804: }
#####: 1805: virtual void Get( void * v1, int v2, const Datatype &v3, int v4, Aint v5, int v6, const Datatype &v7 ) const
-: 1806: {
#####: 1807: 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 ));
#####: 1808: }
|
12: 1809: virtual bool Get_attr( int v2, void * v3 ) const
-: 1810: {
-: 1811: int v4;
12: 1812: MPIX_CALL( MPI_Win_get_attr( (MPI_Win) the_real_win, v2, v3, &v4 ));
12: 1813: return v4!= 0;
-: 1814: }
4: 1815: virtual void Set_attr( int v2, const void * v3 )
-: 1816: {
4: 1817: MPIX_CALL( MPI_Win_set_attr( (MPI_Win) the_real_win, v2, (void *)v3 ));
4: 1818: }
|
#####: 1819: virtual void Complete( void ) const
-: 1820: {
#####: 1821: MPIX_CALL( MPI_Win_complete( (MPI_Win) the_real_win ));
#####: 1822: }
|
4: 1823: virtual void Set_errhandler( const Errhandler &v2 )
-: 1824: {
4: 1825: MPIX_CALL( MPI_Win_set_errhandler( (MPI_Win) the_real_win, (MPI_Errhandler)(v2.the_real_errhandler) ));
4: 1826: }
|
#####: 1827: virtual void Set_name( const char * v2 )
-: 1828: {
#####: 1829: MPIX_CALL( MPI_Win_set_name( (MPI_Win) the_real_win, (char *)v2 ));
#####: 1830: }
#####: 1831: virtual void Accumulate( const void * v1, int v2, const Datatype &v3, int v4, Aint v5, int v6, const Datatype &v7, const Op &v8 ) const
-: 1832: {
#####: 1833: 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 ));
#####: 1834: }
-: 1835: static Win Create( const void * v1, Aint v2, int v3, const Info &v4, const Intracomm &v5 )
-: 1836: {
-: 1837: Win v6;
-: 1838: 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) ));
-: 1839: return v6;
-: 1840: }
-: 1841: virtual void Call_errhandler( int v2 ) const;
-: 1842: static void Free_keyval( int &v1 )
-: 1843: {
-: 1844: MPIX_CALL( MPI_Win_free_keyval( &v1 ));
-: 1845: }
#####: 1846: virtual void Post( const Group &v1, int v2 ) const
-: 1847: {
#####: 1848: MPIX_CALL( MPI_Win_post( (MPI_Group)(v1.the_real_group), v2, (MPI_Win) the_real_win ));
#####: 1849: }
#####: 1850: virtual void Unlock( int v1 ) const
-: 1851: {
#####: 1852: MPIX_CALL( MPI_Win_unlock( v1, (MPI_Win) the_real_win ));
#####: 1853: }
#####: 1854: virtual void Delete_attr( int v2 )
-: 1855: {
#####: 1856: MPIX_CALL( MPI_Win_delete_attr( (MPI_Win) the_real_win, v2 ));
#####: 1857: }
#####: 1858: virtual void Lock( int v1, int v2, int v3 ) const
-: 1859: {
#####: 1860: MPIX_CALL( MPI_Win_lock( v1, v2, v3, (MPI_Win) the_real_win ));
#####: 1861: }
|
4: 1862: virtual Errhandler Get_errhandler( void ) const
-: 1863: {
4: 1864: Errhandler v2;
4: 1865: MPIX_CALL( MPI_Win_get_errhandler( (MPI_Win) the_real_win, &(v2.the_real_errhandler) ));
|
#####: 1866: return v2;
-: 1867: }
#####: 1868: virtual void Get_name( char * v2, int &v3 ) const
-: 1869: {
#####: 1870: MPIX_CALL( MPI_Win_get_name( (MPI_Win) the_real_win, v2, &v3 ));
#####: 1871: }
-: 1872: typedef void Errhandler_function(Win &, int *, ... );
-: 1873: typedef Errhandler_function Errhandler_fn;
-: 1874:
-: 1875: static Errhandler Create_errhandler( Errhandler_function * );
-: 1876:
-: 1877: typedef int Copy_attr_function(const Win& oldwin, int win_keyval, void* extra_state, void* attribute_val_in, void* attribute_val_out, bool& flag);
-: 1878: typedef int Delete_attr_function(Win& win, int win_keyval, void* attribute_val, void* extra_state);
-: 1879:
-: 1880: static int Create_keyval( Copy_attr_function *, Delete_attr_function *,
-: 1881: void * );
-: 1882: // These functions are *not* part of MPI-2 but are provided
-: 1883: // because they should have been included
-: 1884: static int NULL_COPY_FN( const Win &oldwin, int keyval, void *ex,
#####: 1885: void *attr_in, void *attr_out, bool &flag ) { flag = 1; return 0;}
-: 1886: static int NULL_DELETE_FN( Win &win, int keyval, void * attr,
#####: 1887: void *ex ) { return 0; }
-: 1888: static int DUP_FN( const Win &oldwin, int keyval, void *ex,
-: 1889: void *attr_in, void *attr_out, bool &flag ) { flag = 1;
-: 1890: *(void **)attr_out = attr_in; return 0;}
-: 1891:
-: 1892:
-: 1893:};
-: 1894:#ifndef MPI_FILE_NULL
-: 1895:#define MPI_FILE_NULL 0
-: 1896:typedef int MPI_File;
-: 1897:#endif
-: 1898:
-: 1899:class File {
-: 1900:
-: 1901: protected:
-: 1902: MPI_File the_real_file;
-: 1903:
-: 1904: public:
-: 1905: // new/delete
-: 1906:
|
4: 1907: inline File(MPI_File obj) : the_real_file(obj) {}
509: 1908: inline File(void) : the_real_file(MPI_FILE_NULL) {}
-: 1909:
513: 1910: virtual ~File() {}
-: 1911: // copy/assignment
-: 1912:
-: 1913: File(const File &obj) : the_real_file(obj.the_real_file){}
-: 1914:
-: 1915: File& operator=(const File &obj) {
-: 1916: the_real_file = obj.the_real_file; return *this; }
-: 1917:
-: 1918: // logical
-: 1919: bool operator== (const File &obj) {
-: 1920: return (the_real_file == obj.the_real_file); }
-: 1921: bool operator!= (const File &obj) {
-: 1922: return (the_real_file != obj.the_real_file); }
-: 1923: // C/C++ cast and assignment
-: 1924: inline operator MPI_File*() { return &the_real_file; }
-: 1925: inline operator MPI_File() const { return the_real_file; }
-: 1926: File& operator=(const MPI_File& obj) {
-: 1927: the_real_file = obj; return *this; }
-: 1928:#ifdef MPI_MODE_RDONLY
|
#####: 1929: virtual Aint Get_type_extent( const Datatype &v2 ) const
-: 1930: {
-: 1931: MPI_Aint v3;
#####: 1932: MPIX_CALL( MPI_File_get_type_extent( (MPI_File) the_real_file, (MPI_Datatype)(v2.the_real_datatype), &v3 ));
#####: 1933: return v3;
-: 1934: }
#####: 1935: virtual void Read_ordered_end( void * v2, Status & v3 )
-: 1936: {
#####: 1937: MPIX_CALL( MPI_File_read_ordered_end( (MPI_File) the_real_file, v2, (MPI_Status *)&(v3.the_real_status ) ));
#####: 1938: }
#####: 1939: virtual void Read_ordered_end( void * v2 )
-: 1940: {
#####: 1941: MPIX_CALL( MPI_File_read_ordered_end( (MPI_File) the_real_file, v2, MPI_STATUS_IGNORE ));
#####: 1942: }
#####: 1943: virtual void Seek_shared( Offset v2, int v3 )
-: 1944: {
#####: 1945: MPIX_CALL( MPI_File_seek_shared( (MPI_File) the_real_file, v2, v3 ));
#####: 1946: }
#####: 1947: virtual void Read_ordered( void * v2, int v3, const Datatype &v4, Status & v5 )
-: 1948: {
#####: 1949: MPIX_CALL( MPI_File_read_ordered( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Status *)&(v5.the_real_status ) ));
#####: 1950: }
#####: 1951: virtual void Read_ordered( void * v2, int v3, const Datatype &v4 )
-: 1952: {
#####: 1953: MPIX_CALL( MPI_File_read_ordered( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 1954: }
#####: 1955: virtual Request Iread_shared( void * v2, int v3, const Datatype &v4 )
-: 1956: {
#####: 1957: Request v5;
#####: 1958: MPIX_CALL( MPI_File_iread_shared( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPIO_Request *)&(v5.the_real_request) ));
#####: 1959: return v5;
-: 1960: }
#####: 1961: virtual Info Get_info( void ) const
-: 1962: {
#####: 1963: Info v2;
#####: 1964: MPIX_CALL( MPI_File_get_info( (MPI_File) the_real_file, &(v2.the_real_info) ));
#####: 1965: return v2;
-: 1966: }
#####: 1967: virtual void Write_ordered_begin( const void * v2, int v3, const Datatype &v4 )
-: 1968: {
#####: 1969: MPIX_CALL( MPI_File_write_ordered_begin( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype) ));
#####: 1970: }
#####: 1971: virtual void Set_info( const Info &v2 )
-: 1972: {
#####: 1973: MPIX_CALL( MPI_File_set_info( (MPI_File) the_real_file, (MPI_Info)(v2.the_real_info) ));
#####: 1974: }
#####: 1975: virtual void Write_ordered( const void * v2, int v3, const Datatype &v4, Status & v5 )
-: 1976: {
#####: 1977: MPIX_CALL( MPI_File_write_ordered( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Status *)&(v5.the_real_status ) ));
#####: 1978: }
#####: 1979: virtual void Write_ordered( const void * v2, int v3, const Datatype &v4 )
-: 1980: {
#####: 1981: MPIX_CALL( MPI_File_write_ordered( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 1982: }
#####: 1983: virtual void Sync( void )
-: 1984: {
#####: 1985: MPIX_CALL( MPI_File_sync( (MPI_File) the_real_file ));
#####: 1986: }
#####: 1987: virtual void Read( void * v2, int v3, const Datatype &v4, Status & v5 )
-: 1988: {
#####: 1989: MPIX_CALL( MPI_File_read( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Status *)&(v5.the_real_status ) ));
#####: 1990: }
#####: 1991: virtual void Read( void * v2, int v3, const Datatype &v4 )
-: 1992: {
#####: 1993: MPIX_CALL( MPI_File_read( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 1994: }
#####: 1995: virtual void Write_all( const void * v2, int v3, const Datatype &v4, Status & v5 )
-: 1996: {
#####: 1997: MPIX_CALL( MPI_File_write_all( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Status *)&(v5.the_real_status ) ));
#####: 1998: }
#####: 1999: virtual void Write_all( const void * v2, int v3, const Datatype &v4 )
-: 2000: {
#####: 2001: MPIX_CALL( MPI_File_write_all( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 2002: }
#####: 2003: virtual Offset Get_size( void ) const
-: 2004: {
-: 2005: MPI_Offset v2;
#####: 2006: MPIX_CALL( MPI_File_get_size( (MPI_File) the_real_file, &v2 ));
#####: 2007: return v2;
-: 2008: }
#####: 2009: virtual void Write_all_end( const void * v2, Status & v3 )
-: 2010: {
#####: 2011: MPIX_CALL( MPI_File_write_all_end( (MPI_File) the_real_file, (void *)v2, (MPI_Status *)&(v3.the_real_status ) ));
#####: 2012: }
#####: 2013: virtual void Write_all_end( const void * v2 )
-: 2014: {
#####: 2015: MPIX_CALL( MPI_File_write_all_end( (MPI_File) the_real_file, (void *)v2, MPI_STATUS_IGNORE ));
#####: 2016: }
-: 2017: static void Delete( const char * v1, const Info &v2 )
-: 2018: {
-: 2019: MPIX_CALL( MPI_File_delete( (char *)v1, (MPI_Info)(v2.the_real_info) ));
-: 2020: }
#####: 2021: virtual void Read_ordered_begin( void * v2, int v3, const Datatype &v4 )
-: 2022: {
#####: 2023: MPIX_CALL( MPI_File_read_ordered_begin( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype) ));
#####: 2024: }
#####: 2025: virtual Request Iread_at( Offset v2, void * v3, int v4, const Datatype &v5 )
-: 2026: {
#####: 2027: Request v6;
#####: 2028: MPIX_CALL( MPI_File_iread_at( (MPI_File) the_real_file, v2, v3, v4, (MPI_Datatype)(v5.the_real_datatype), (MPIO_Request *)&(v6.the_real_request) ));
#####: 2029: return v6;
-: 2030: }
#####: 2031: virtual void Write_at_all_end( const void * v2, Status & v3 )
-: 2032: {
#####: 2033: MPIX_CALL( MPI_File_write_at_all_end( (MPI_File) the_real_file, (void *)v2, (MPI_Status *)&(v3.the_real_status ) ));
#####: 2034: }
#####: 2035: virtual void Write_at_all_end( const void * v2 )
-: 2036: {
#####: 2037: MPIX_CALL( MPI_File_write_at_all_end( (MPI_File) the_real_file, (void *)v2, MPI_STATUS_IGNORE ));
#####: 2038: }
#####: 2039: virtual Offset Get_position_shared( void ) const
-: 2040: {
-: 2041: MPI_Offset v2;
#####: 2042: MPIX_CALL( MPI_File_get_position_shared( (MPI_File) the_real_file, &v2 ));
#####: 2043: return v2;
-: 2044: }
#####: 2045: virtual void Write_shared( const void * v2, int v3, const Datatype &v4, Status & v5 )
-: 2046: {
#####: 2047: MPIX_CALL( MPI_File_write_shared( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Status *)&(v5.the_real_status ) ));
#####: 2048: }
#####: 2049: virtual void Write_shared( const void * v2, int v3, const Datatype &v4 )
-: 2050: {
#####: 2051: MPIX_CALL( MPI_File_write_shared( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 2052: }
#####: 2053: virtual Request Iwrite_at( Offset v2, const void * v3, int v4, const Datatype &v5 )
-: 2054: {
#####: 2055: Request v6;
#####: 2056: MPIX_CALL( MPI_File_iwrite_at( (MPI_File) the_real_file, (MPI_Offset)v2, (void *)v3, v4, (MPI_Datatype)(v5.the_real_datatype), (MPIO_Request *)&(v6.the_real_request) ));
#####: 2057: return v6;
-: 2058: }
#####: 2059: virtual void Get_view( Offset & v2, Datatype &v3, Datatype &v4, char * v5 ) const
-: 2060: {
#####: 2061: MPIX_CALL( MPI_File_get_view( (MPI_File) the_real_file, &v2, (MPI_Datatype *)&(v3.the_real_datatype), (MPI_Datatype *)&(v4.the_real_datatype), v5 ));
#####: 2062: }
-: 2063: virtual void Call_errhandler( int v2 ) const;
#####: 2064: virtual void Write_all_begin( const void * v2, int v3, const Datatype &v4 )
-: 2065: {
#####: 2066: MPIX_CALL( MPI_File_write_all_begin( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype) ));
#####: 2067: }
#####: 2068: virtual void Read_all_end( void * v2, Status & v3 )
-: 2069: {
#####: 2070: MPIX_CALL( MPI_File_read_all_end( (MPI_File) the_real_file, v2, (MPI_Status *)&(v3.the_real_status ) ));
#####: 2071: }
#####: 2072: virtual void Read_all_end( void * v2 )
-: 2073: {
#####: 2074: MPIX_CALL( MPI_File_read_all_end( (MPI_File) the_real_file, v2, MPI_STATUS_IGNORE ));
#####: 2075: }
#####: 2076: virtual Offset Get_byte_offset( const Offset v2 ) const
-: 2077: {
-: 2078: MPI_Offset v3;
#####: 2079: MPIX_CALL( MPI_File_get_byte_offset( (MPI_File) the_real_file, (MPI_Offset)v2, &v3 ));
#####: 2080: return v3;
-: 2081: }
#####: 2082: virtual Request Iread( void * v2, int v3, const Datatype &v4 )
-: 2083: {
#####: 2084: Request v5;
#####: 2085: MPIX_CALL( MPI_File_iread( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPIO_Request *)&(v5.the_real_request) ));
#####: 2086: return v5;
-: 2087: }
#####: 2088: virtual void Read_at_all_end( void * v2, Status & v3 )
-: 2089: {
#####: 2090: MPIX_CALL( MPI_File_read_at_all_end( (MPI_File) the_real_file, v2, (MPI_Status *)&(v3.the_real_status ) ));
#####: 2091: }
#####: 2092: virtual void Read_at_all_end( void * v2 )
-: 2093: {
#####: 2094: MPIX_CALL( MPI_File_read_at_all_end( (MPI_File) the_real_file, v2, MPI_STATUS_IGNORE ));
#####: 2095: }
#####: 2096: virtual void Write_at( Offset v2, const void * v3, int v4, const Datatype &v5, Status & v6 )
-: 2097: {
#####: 2098: MPIX_CALL( MPI_File_write_at( (MPI_File) the_real_file, v2, (void *)v3, v4, (MPI_Datatype)(v5.the_real_datatype), (MPI_Status *)&(v6.the_real_status ) ));
#####: 2099: }
#####: 2100: virtual void Write_at( Offset v2, const void * v3, int v4, const Datatype &v5 )
-: 2101: {
#####: 2102: MPIX_CALL( MPI_File_write_at( (MPI_File) the_real_file, v2, (void *)v3, v4, (MPI_Datatype)(v5.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 2103: }
#####: 2104: virtual void Write_at_all_begin( Offset v2, const void * v3, int v4, const Datatype &v5 )
-: 2105: {
#####: 2106: MPIX_CALL( MPI_File_write_at_all_begin( (MPI_File) the_real_file, v2, (void *)v3, v4, (MPI_Datatype)(v5.the_real_datatype) ));
#####: 2107: }
|
4: 2108: virtual Errhandler Get_errhandler( void ) const
-: 2109: {
4: 2110: Errhandler v2;
4: 2111: MPIX_CALL( MPI_File_get_errhandler( (MPI_File) the_real_file, &(v2.the_real_errhandler) ));
|
#####: 2112: return v2;
-: 2113: }
#####: 2114: virtual int Get_amode( void ) const
-: 2115: {
-: 2116: int v2;
#####: 2117: MPIX_CALL( MPI_File_get_amode( (MPI_File) the_real_file, &v2 ));
#####: 2118: return v2;
-: 2119: }
#####: 2120: virtual void Set_atomicity( bool v2 )
-: 2121: {
-: 2122: int l2;
#####: 2123: l2 = (v2 == true) ? 1 : 0;
#####: 2124: MPIX_CALL( MPI_File_set_atomicity( (MPI_File) the_real_file, l2 ));
#####: 2125: }
#####: 2126: virtual Group Get_group( void ) const
-: 2127: {
#####: 2128: Group v2;
#####: 2129: MPIX_CALL( MPI_File_get_group( (MPI_File) the_real_file, &(v2.the_real_group) ));
#####: 2130: return v2;
-: 2131: }
#####: 2132: virtual Offset Get_position( void ) const
-: 2133: {
-: 2134: MPI_Offset v2;
#####: 2135: MPIX_CALL( MPI_File_get_position( (MPI_File) the_real_file, &v2 ));
#####: 2136: return v2;
-: 2137: }
-: 2138: static File Open( const Intracomm &v1, const char * v2, int v3, const Info &v4 )
-: 2139: {
-: 2140: File v5;
-: 2141: MPIX_CALL( MPI_File_open( (MPI_Comm)(v1.the_real_comm), (char *)v2, v3, (MPI_Info)(v4.the_real_info), &(v5.the_real_file) ));
-: 2142: return v5;
-: 2143: }
#####: 2144: virtual void Seek( Offset v2, int v3 )
-: 2145: {
#####: 2146: MPIX_CALL( MPI_File_seek( (MPI_File) the_real_file, v2, v3 ));
#####: 2147: }
#####: 2148: virtual void Read_all_begin( void * v2, int v3, const Datatype &v4 )
-: 2149: {
#####: 2150: MPIX_CALL( MPI_File_read_all_begin( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype) ));
#####: 2151: }
#####: 2152: virtual void Read_at_all_begin( Offset v2, void * v3, int v4, const Datatype &v5 )
-: 2153: {
#####: 2154: MPIX_CALL( MPI_File_read_at_all_begin( (MPI_File) the_real_file, v2, v3, v4, (MPI_Datatype)(v5.the_real_datatype) ));
#####: 2155: }
#####: 2156: virtual void Read_all( void * v2, int v3, const Datatype &v4, Status & v5 )
-: 2157: {
#####: 2158: MPIX_CALL( MPI_File_read_all( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Status *)&(v5.the_real_status ) ));
#####: 2159: }
#####: 2160: virtual void Read_all( void * v2, int v3, const Datatype &v4 )
-: 2161: {
#####: 2162: MPIX_CALL( MPI_File_read_all( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 2163: }
#####: 2164: virtual void Preallocate( Offset v2 )
-: 2165: {
#####: 2166: MPIX_CALL( MPI_File_preallocate( (MPI_File) the_real_file, v2 ));
#####: 2167: }
#####: 2168: virtual void Read_at_all( Offset v2, void * v3, int v4, const Datatype &v5, Status & v6 )
-: 2169: {
#####: 2170: MPIX_CALL( MPI_File_read_at_all( (MPI_File) the_real_file, v2, v3, v4, (MPI_Datatype)(v5.the_real_datatype), (MPI_Status *)&(v6.the_real_status ) ));
#####: 2171: }
#####: 2172: virtual void Read_at_all( Offset v2, void * v3, int v4, const Datatype &v5 )
-: 2173: {
#####: 2174: MPIX_CALL( MPI_File_read_at_all( (MPI_File) the_real_file, v2, v3, v4, (MPI_Datatype)(v5.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 2175: }
#####: 2176: virtual void Read_shared( void * v2, int v3, const Datatype &v4, Status & v5 )
-: 2177: {
#####: 2178: MPIX_CALL( MPI_File_read_shared( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Status *)&(v5.the_real_status ) ));
#####: 2179: }
#####: 2180: virtual void Read_shared( void * v2, int v3, const Datatype &v4 )
-: 2181: {
#####: 2182: MPIX_CALL( MPI_File_read_shared( (MPI_File) the_real_file, v2, v3, (MPI_Datatype)(v4.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 2183: }
#####: 2184: virtual Request Iwrite( const void * v2, int v3, const Datatype &v4 )
-: 2185: {
#####: 2186: Request v5;
#####: 2187: MPIX_CALL( MPI_File_iwrite( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPIO_Request *)&(v5.the_real_request) ));
#####: 2188: return v5;
-: 2189: }
#####: 2190: virtual Request Iwrite_shared( const void * v2, int v3, const Datatype &v4 )
-: 2191: {
#####: 2192: Request v5;
#####: 2193: MPIX_CALL( MPI_File_iwrite_shared( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPIO_Request *)&(v5.the_real_request) ));
#####: 2194: return v5;
-: 2195: }
|
4: 2196: virtual void Set_errhandler( const Errhandler &v2 )
-: 2197: {
4: 2198: MPIX_CALL( MPI_File_set_errhandler( (MPI_File) the_real_file, (MPI_Errhandler)(v2.the_real_errhandler) ));
4: 2199: }
|
#####: 2200: virtual void Write_at_all( Offset v2, const void * v3, int v4, const Datatype &v5, Status & v6 )
-: 2201: {
#####: 2202: MPIX_CALL( MPI_File_write_at_all( (MPI_File) the_real_file, v2, (void *)v3, v4, (MPI_Datatype)(v5.the_real_datatype), (MPI_Status *)&(v6.the_real_status ) ));
#####: 2203: }
#####: 2204: virtual void Write_at_all( Offset v2, const void * v3, int v4, const Datatype &v5 )
-: 2205: {
#####: 2206: MPIX_CALL( MPI_File_write_at_all( (MPI_File) the_real_file, v2, (void *)v3, v4, (MPI_Datatype)(v5.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 2207: }
#####: 2208: virtual void Set_size( Offset v2 )
-: 2209: {
#####: 2210: MPIX_CALL( MPI_File_set_size( (MPI_File) the_real_file, v2 ));
#####: 2211: }
#####: 2212: virtual void Set_view( Offset v2, const Datatype &v3, const Datatype v4, const char * v5, const Info &v6 )
-: 2213: {
#####: 2214: MPIX_CALL( MPI_File_set_view( (MPI_File) the_real_file, v2, (MPI_Datatype)(v3.the_real_datatype), (MPI_Datatype)v4, (char *)v5, (MPI_Info)(v6.the_real_info) ));
#####: 2215: }
#####: 2216: virtual void Read_at( Offset v2, void * v3, int v4, const Datatype &v5, Status & v6 )
-: 2217: {
#####: 2218: MPIX_CALL( MPI_File_read_at( (MPI_File) the_real_file, v2, v3, v4, (MPI_Datatype)(v5.the_real_datatype), (MPI_Status *)&(v6.the_real_status ) ));
#####: 2219: }
#####: 2220: virtual void Read_at( Offset v2, void * v3, int v4, const Datatype &v5 )
-: 2221: {
#####: 2222: MPIX_CALL( MPI_File_read_at( (MPI_File) the_real_file, v2, v3, v4, (MPI_Datatype)(v5.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 2223: }
#####: 2224: virtual void Close( void )
-: 2225: {
#####: 2226: MPIX_CALL( MPI_File_close( (MPI_File *) &the_real_file ));
#####: 2227: }
#####: 2228: virtual void Write_ordered_end( const void * v2, Status & v3 )
-: 2229: {
#####: 2230: MPIX_CALL( MPI_File_write_ordered_end( (MPI_File) the_real_file, (void *)v2, (MPI_Status *)&(v3.the_real_status ) ));
#####: 2231: }
#####: 2232: virtual void Write_ordered_end( const void * v2 )
-: 2233: {
#####: 2234: MPIX_CALL( MPI_File_write_ordered_end( (MPI_File) the_real_file, (void *)v2, MPI_STATUS_IGNORE ));
#####: 2235: }
#####: 2236: virtual void Write( const void * v2, int v3, const Datatype &v4, Status & v5 )
-: 2237: {
#####: 2238: MPIX_CALL( MPI_File_write( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype), (MPI_Status *)&(v5.the_real_status ) ));
#####: 2239: }
#####: 2240: virtual void Write( const void * v2, int v3, const Datatype &v4 )
-: 2241: {
#####: 2242: MPIX_CALL( MPI_File_write( (MPI_File) the_real_file, (void *)v2, v3, (MPI_Datatype)(v4.the_real_datatype), MPI_STATUS_IGNORE ));
#####: 2243: }
#####: 2244: virtual bool Get_atomicity( void ) const
-: 2245: {
-: 2246: int v2;
#####: 2247: MPIX_CALL( MPI_File_get_atomicity( (MPI_File) the_real_file, &v2 ));
#####: 2248: return v2!= 0;
-: 2249: }
-: 2250: typedef void Errhandler_function(File &, int *, ... );
-: 2251: typedef Errhandler_function Errhandler_fn;
-: 2252:
-: 2253: static Errhandler Create_errhandler( Errhandler_function * );
-: 2254:
-: 2255:#endif
-: 2256:};
-: 2257:
-: 2258:class Graphcomm : public Intracomm {
-: 2259:
-: 2260: public:
-: 2261: // new/delete
-: 2262:
#####: 2263: inline Graphcomm(MPI_Comm obj) : Intracomm(obj) {}
|
8: 2264: inline Graphcomm(void) : Intracomm() {}
-: 2265:
|
#####: 2266: virtual ~Graphcomm() {}
-: 2267: // copy/assignment
-: 2268:
-: 2269: Graphcomm(const Graphcomm &obj) : Intracomm(obj) {}
-: 2270:
-: 2271: Graphcomm& operator=(const Graphcomm &obj) {
-: 2272: the_real_comm = obj.the_real_comm; return *this; }
-: 2273:
-: 2274: // C/C++ cast and assignment
-: 2275: inline operator MPI_Comm*() { return &the_real_comm; }
-: 2276: inline operator MPI_Comm() const { return the_real_comm; }
-: 2277: Graphcomm& operator=(const MPI_Comm& obj) {
-: 2278: the_real_comm = obj; return *this; }
#####: 2279: virtual void Get_dims( int * v2, int * v3 ) const
-: 2280: {
#####: 2281: MPIX_CALL( MPI_Graphdims_get( (MPI_Comm) the_real_comm, v2, v3 ));
#####: 2282: }
#####: 2283: virtual void Get_topo( int v2, int v3, int * v4, int * v5 ) const
-: 2284: {
#####: 2285: MPIX_CALL( MPI_Graph_get( (MPI_Comm) the_real_comm, v2, v3, v4, v5 ));
#####: 2286: }
#####: 2287: virtual int Map( int v2, const int * v3, const int * v4 ) const
-: 2288: {
-: 2289: int v5;
#####: 2290: MPIX_CALL( MPI_Graph_map( (MPI_Comm) the_real_comm, v2, (int *)v3, (int *)v4, &v5 ));
#####: 2291: return v5;
-: 2292: }
#####: 2293: virtual void Get_neighbors( int v2, int v3, int * v4 ) const
-: 2294: {
#####: 2295: MPIX_CALL( MPI_Graph_neighbors( (MPI_Comm) the_real_comm, v2, v3, v4 ));
#####: 2296: }
#####: 2297: virtual int Get_neighbors_count( int v2 ) const
-: 2298: {
-: 2299: int v3;
#####: 2300: MPIX_CALL( MPI_Graph_neighbors_count( (MPI_Comm) the_real_comm, v2, &v3 ));
#####: 2301: return v3;
-: 2302: }
-: 2303: Graphcomm Dup( void ) const
-: 2304: {
-: 2305: Graphcomm v2;
-: 2306: MPIX_CALL( MPI_Comm_dup( (MPI_Comm) the_real_comm, &(v2.the_real_comm) ));
-: 2307: return v2;
-: 2308: }
-: 2309:
-: 2310:// If the compiler does not support variable return types, return a
-: 2311:// reference to Comm. The user must then cast this to the correct type
-: 2312:// (Standard-conforming C++ compilers support variable return types)
-: 2313:#ifdef HAVE_NO_VARIABLE_RETURN_TYPE_SUPPORT
-: 2314: virtual Comm & Clone(void) const {
-: 2315: MPI_Comm ncomm;
-: 2316: MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);
-: 2317: Comm *clone = new Graphcomm(ncomm);
-: 2318: return *clone;
-: 2319: };
-: 2320:#else
#####: 2321: virtual Graphcomm & Clone(void) const {
-: 2322: MPI_Comm ncomm;
#####: 2323: MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);
#####: 2324: Graphcomm *clone = new Graphcomm(ncomm);
#####: 2325: return *clone;
-: 2326: };
-: 2327:#endif
-: 2328:};
-: 2329:
-: 2330:class Cartcomm : public Intracomm {
-: 2331:
-: 2332: public:
-: 2333: // new/delete
-: 2334:
#####: 2335: inline Cartcomm(MPI_Comm obj) : Intracomm(obj) {}
|
48: 2336: inline Cartcomm(void) : Intracomm() {}
-: 2337:
|
#####: 2338: virtual ~Cartcomm() {}
-: 2339: // copy/assignment
-: 2340:
-: 2341: Cartcomm(const Cartcomm &obj) : Intracomm(obj) {}
-: 2342:
-: 2343: Cartcomm& operator=(const Cartcomm &obj) {
-: 2344: the_real_comm = obj.the_real_comm; return *this; }
-: 2345:
-: 2346: // C/C++ cast and assignment
-: 2347: inline operator MPI_Comm*() { return &the_real_comm; }
-: 2348: inline operator MPI_Comm() const { return the_real_comm; }
-: 2349: Cartcomm& operator=(const MPI_Comm& obj) {
-: 2350: the_real_comm = obj; return *this; }
#####: 2351: virtual void Get_coords( int v2, int v3, int * v4 ) const
-: 2352: {
#####: 2353: MPIX_CALL( MPI_Cart_coords( (MPI_Comm) the_real_comm, v2, v3, v4 ));
#####: 2354: }
#####: 2355: virtual int Get_cart_rank( const int * v2 ) const
-: 2356: {
-: 2357: int v3;
#####: 2358: MPIX_CALL( MPI_Cart_rank( (MPI_Comm) the_real_comm, (int *)v2, &v3 ));
#####: 2359: return v3;
-: 2360: }
#####: 2361: virtual int Get_dim( void ) const
-: 2362: {
-: 2363: int v2;
#####: 2364: MPIX_CALL( MPI_Cartdim_get( (MPI_Comm) the_real_comm, &v2 ));
#####: 2365: return v2;
-: 2366: }
#####: 2367: virtual void Get_topo( int v2, int * v3, bool v4[], int * v5 ) const
-: 2368: {
#####: 2369: int *l4 = new int[v2];
#####: 2370: MPIX_CALL( MPI_Cart_get( (MPI_Comm) the_real_comm, v2, v3, l4, v5 ));
-: 2371: {
-: 2372: int i4;
#####: 2373: for (i4=0;i4<v2;i4++) {
-: 2374: // Unfortunately, at least one C++ compiler (Microsoft's)
-: 2375: // generates warning messages when the type size changes
-: 2376: // even when an explicit cast is used. To avoid these messages, we
-: 2377: // cause the generated code to explicitly compute a
-: 2378: // boolean value
#####: 2379: v4[i4] = l4[i4] != 0;
-: 2380: }
#####: 2381: delete[] l4;
-: 2382: }
#####: 2383: }
#####: 2384: virtual int Map( int v2, const int * v3, const bool v4[] ) const
-: 2385: {
-: 2386: int v5;
#####: 2387: int *l4 = new int[v2];
-: 2388: {
-: 2389: int i4;
#####: 2390: for (i4=0;i4<v2;i4++) {
#####: 2391: l4[i4] = v4[i4] == true ? 1 : 0;
-: 2392: }
-: 2393: }
#####: 2394: MPIX_CALL( MPI_Cart_map( (MPI_Comm) the_real_comm, v2, (int *)v3, l4, &v5 ));
-: 2395:
#####: 2396: delete[] l4;
#####: 2397: return v5;
-: 2398: }
#####: 2399: virtual Cartcomm Sub( const bool v2[] ) const
-: 2400: {
#####: 2401: Cartcomm v3;
#####: 2402: int *l2 = new int[10];
-: 2403: {
-: 2404: int i2;
#####: 2405: for (i2=0;i2<10;i2++) {
#####: 2406: l2[i2] = v2[i2] == true ? 1 : 0;
-: 2407: }
-: 2408: }
#####: 2409: MPIX_CALL( MPI_Cart_sub( (MPI_Comm) the_real_comm, l2, &(v3.the_real_comm) ));
-: 2410:
#####: 2411: delete[] l2;
#####: 2412: return v3;
-: 2413: }
#####: 2414: virtual void Shift( int v2, int v3, int &v4, int &v5 ) const
-: 2415: {
#####: 2416: MPIX_CALL( MPI_Cart_shift( (MPI_Comm) the_real_comm, v2, v3, &v4, &v5 ));
#####: 2417: }
-: 2418: Cartcomm Dup( void ) const
-: 2419: {
-: 2420: Cartcomm v2;
-: 2421: MPIX_CALL( MPI_Comm_dup( (MPI_Comm) the_real_comm, &(v2.the_real_comm) ));
-: 2422: return v2;
-: 2423: }
-: 2424:
-: 2425:// If the compiler does not support variable return types, return a
-: 2426:// reference to Comm. The user must then cast this to the correct type
-: 2427:// (Standard-conforming C++ compilers support variable return types)
-: 2428:#ifdef HAVE_NO_VARIABLE_RETURN_TYPE_SUPPORT
-: 2429: virtual Comm & Clone(void) const {
-: 2430: MPI_Comm ncomm;
-: 2431: MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);
-: 2432: Comm *clone = new Cartcomm(ncomm);
-: 2433: return *clone;
-: 2434: };
-: 2435:#else
#####: 2436: virtual Cartcomm & Clone(void) const {
-: 2437: MPI_Comm ncomm;
#####: 2438: MPI_Comm_dup( (MPI_Comm)the_real_comm, &ncomm);
#####: 2439: Cartcomm *clone = new Cartcomm(ncomm);
#####: 2440: return *clone;
-: 2441: };
-: 2442:#endif
-: 2443:};
-: 2444:extern int Add_error_class( void ) ;
-: 2445:extern void* Alloc_mem( Aint v1, const Info &v2 ) ;
-: 2446:extern void Lookup_name( const char * v1, const Info &v2, char * v3 ) ;
-: 2447:extern void Publish_name( const char * v1, const Info &v2, const char * v3 ) ;
-: 2448:extern void Unpublish_name( const char * v1, const Info &v2, const char * v3 ) ;
-: 2449:extern Aint Get_address( void * v1 ) ;
-: 2450:extern void Add_error_string( int v1, const char * v2 ) ;
-: 2451:extern int Query_thread( void ) ;
-: 2452:extern void Close_port( const char * v1 ) ;
-: 2453:extern int Add_error_code( int v1 ) ;
-: 2454:extern void Free_mem( void * v1 ) ;
-: 2455:extern void Open_port( const Info &v1, char * v2 ) ;
-: 2456:extern bool Is_finalized( void ) ;
-: 2457:extern bool Is_thread_main( void ) ;
-: 2458:
-: 2459:#ifdef MPI_MODE_RDONLY
-: 2460:typedef int Datarep_extent_function( const Datatype&, Aint&, void *);
-: 2461:typedef int Datarep_conversion_function( void *, Datatype &, int, void *,
-: 2462: Offset, void * );
-: 2463:#endif
-: 2464:
-: 2465:
-: 2466:extern Datatype CHAR;
-: 2467:extern Datatype UNSIGNED_CHAR;
-: 2468:extern Datatype BYTE;
-: 2469:extern Datatype SHORT;
-: 2470:extern Datatype UNSIGNED_SHORT;
-: 2471:extern Datatype INT;
-: 2472:extern Datatype UNSIGNED;
-: 2473:extern Datatype LONG;
-: 2474:extern Datatype UNSIGNED_LONG;
-: 2475:extern Datatype FLOAT;
-: 2476:extern Datatype DOUBLE;
-: 2477:extern Datatype LONG_DOUBLE;
-: 2478:extern Datatype LONG_LONG_INT;
-: 2479:extern Datatype LONG_LONG;
-: 2480:extern Datatype PACKED;
-: 2481:extern Datatype LB;
-: 2482:extern Datatype UB;
-: 2483:extern Datatype FLOAT_INT;
-: 2484:extern Datatype DOUBLE_INT;
-: 2485:extern Datatype LONG_INT;
-: 2486:extern Datatype SHORT_INT;
-: 2487:extern Datatype LONG_DOUBLE_INT;
-: 2488:extern Datatype REAL4;
-: 2489:extern Datatype REAL8;
-: 2490:extern Datatype REAL16;
-: 2491:extern Datatype COMPLEX8;
-: 2492:extern Datatype COMPLEX16;
-: 2493:extern Datatype COMPLEX32;
-: 2494:extern Datatype INTEGER1;
-: 2495:extern Datatype INTEGER2;
-: 2496:extern Datatype INTEGER4;
-: 2497:extern Datatype INTEGER8;
-: 2498:extern Datatype INTEGER16;
-: 2499:extern Datatype WCHAR;
-: 2500:extern Datatype SIGNED_CHAR;
-: 2501:extern Datatype UNSIGNED_LONG_LONG;
-: 2502:extern Datatype TWOINT;
-: 2503:extern Datatype BOOL;
-: 2504:#define MPIR_CXX_BOOL 0x4c000133
-: 2505:extern Datatype COMPLEX;
-: 2506:#define MPIR_CXX_COMPLEX 0x4c000834
-: 2507:extern Datatype DOUBLE_COMPLEX;
-: 2508:#define MPIR_CXX_DOUBLE_COMPLEX 0x4c001035
-: 2509:extern Datatype LONG_DOUBLE_COMPLEX;
-: 2510:#define MPIR_CXX_LONG_DOUBLE_COMPLEX 0x4c001836
-: 2511:extern Datatype DATATYPE_NULL;
-: 2512:
-: 2513:#if 1
-: 2514:extern Datatype INTEGER;
-: 2515:extern Datatype REAL;
-: 2516:extern Datatype DOUBLE_PRECISION;
-: 2517:extern Datatype F_COMPLEX;
-: 2518:extern Datatype F_DOUBLE_COMPLEX;
-: 2519:extern Datatype LOGICAL;
-: 2520:extern Datatype CHARACTER;
-: 2521:extern Datatype TWOREAL;
-: 2522:extern Datatype TWODOUBLE_PRECISION;
-: 2523:extern Datatype TWOINTEGER;
-: 2524:#endif
-: 2525:extern const Op MAX;
-: 2526:extern const Op MIN;
-: 2527:extern const Op SUM;
-: 2528:extern const Op PROD;
-: 2529:extern const Op LAND;
-: 2530:extern const Op BAND;
-: 2531:extern const Op LOR;
-: 2532:extern const Op BOR;
-: 2533:extern const Op LXOR;
-: 2534:extern const Op BXOR;
-: 2535:extern const Op MINLOC;
-: 2536:extern const Op MAXLOC;
-: 2537:extern const Op REPLACE;
-: 2538:extern const Op OP_NULL;
-: 2539:extern Intracomm COMM_WORLD;
-: 2540:extern Intracomm COMM_SELF;
-: 2541:extern const Group GROUP_EMPTY;
-: 2542:extern const Nullcomm COMM_NULL;
-: 2543:extern const Group GROUP_NULL;
-: 2544:extern const Request REQUEST_NULL;
-: 2545:extern const Errhandler ERRHANDLER_NULL;
-: 2546:extern const Errhandler ERRORS_RETURN;
-: 2547:extern const Errhandler ERRORS_ARE_FATAL;
-: 2548:extern const Errhandler ERRORS_THROW_EXCEPTIONS;
-: 2549:extern const Info INFO_NULL;
-: 2550:extern const Win WIN_NULL;
-: 2551:extern File FILE_NULL;
-: 2552:extern const int BSEND_OVERHEAD;
-: 2553:extern const int KEYVAL_INVALID;
-: 2554:extern const int CART;
-: 2555:extern const int GRAPH;
-: 2556:extern const int IDENT;
-: 2557:extern const int SIMILAR;
-: 2558:extern const int CONGRUENT;
-: 2559:extern const int UNEQUAL;
-: 2560:extern const int PROC_NULL;
-: 2561:extern const int ANY_TAG;
-: 2562:extern const int ANY_SOURCE;
-: 2563:extern const int ROOT;
-: 2564:extern const int TAG_UB;
-: 2565:extern const int IO;
-: 2566:extern const int HOST;
-: 2567:extern const int WTIME_IS_GLOBAL;
-: 2568:extern const int UNIVERSE_SIZE;
-: 2569:extern const int LASTUSEDCODE;
-: 2570:extern const int APPNUM;
-: 2571:extern const int MAX_PROCESSOR_NAME;
-: 2572:extern const int MAX_ERROR_STRING;
-: 2573:extern const int MAX_PORT_NAME;
-: 2574:extern const int MAX_OBJECT_NAME;
-: 2575:extern const int MAX_INFO_VAL;
-: 2576:extern const int MAX_INFO_KEY;
-: 2577:extern const int UNDEFINED;
-: 2578:extern const int LOCK_EXCLUSIVE;
-: 2579:extern const int LOCK_SHARED;
-: 2580:extern const int WIN_BASE;
-: 2581:extern const int WIN_DISP_UNIT;
-: 2582:extern const int WIN_SIZE;
-: 2583:extern const int SUCCESS;
-: 2584:extern const int ERR_BUFFER;
-: 2585:extern const int ERR_COUNT;
-: 2586:extern const int ERR_TYPE;
-: 2587:extern const int ERR_TAG;
-: 2588:extern const int ERR_COMM;
-: 2589:extern const int ERR_RANK;
-: 2590:extern const int ERR_REQUEST;
-: 2591:extern const int ERR_ROOT;
-: 2592:extern const int ERR_GROUP;
-: 2593:extern const int ERR_OP;
-: 2594:extern const int ERR_TOPOLOGY;
-: 2595:extern const int ERR_DIMS;
-: 2596:extern const int ERR_ARG;
-: 2597:extern const int ERR_UNKNOWN;
-: 2598:extern const int ERR_TRUNCATE;
-: 2599:extern const int ERR_OTHER;
-: 2600:extern const int ERR_INTERN;
-: 2601:extern const int ERR_PENDING;
-: 2602:extern const int ERR_IN_STATUS;
-: 2603:extern const int ERR_LASTCODE;
-: 2604:extern const int ERR_FILE;
-: 2605:extern const int ERR_ACCESS;
-: 2606:extern const int ERR_AMODE;
-: 2607:extern const int ERR_BAD_FILE;
-: 2608:extern const int ERR_FILE_EXISTS;
-: 2609:extern const int ERR_FILE_IN_USE;
-: 2610:extern const int ERR_NO_SPACE;
-: 2611:extern const int ERR_NO_SUCH_FILE;
-: 2612:extern const int ERR_IO;
-: 2613:extern const int ERR_READ_ONLY;
-: 2614:extern const int ERR_CONVERSION;
-: 2615:extern const int ERR_DUP_DATAREP;
-: 2616:extern const int ERR_UNSUPPORTED_DATAREP;
-: 2617:extern const int ERR_INFO;
-: 2618:extern const int ERR_INFO_KEY;
-: 2619:extern const int ERR_INFO_VALUE;
-: 2620:extern const int ERR_INFO_NOKEY;
-: 2621:extern const int ERR_NAME;
-: 2622:extern const int ERR_NO_MEM;
-: 2623:extern const int ERR_NOT_SAME;
-: 2624:extern const int ERR_PORT;
-: 2625:extern const int ERR_QUOTA;
-: 2626:extern const int ERR_SERVICE;
-: 2627:extern const int ERR_SPAWN;
-: 2628:extern const int ERR_UNSUPPORTED_OPERATION;
-: 2629:extern const int ERR_WIN;
-: 2630:extern const int ERR_BASE;
-: 2631:extern const int ERR_LOCKTYPE;
-: 2632:extern const int ERR_KEYVAL;
-: 2633:extern const int ERR_RMA_CONFLICT;
-: 2634:extern const int ERR_RMA_SYNC;
-: 2635:extern const int ERR_SIZE;
-: 2636:extern const int ERR_DISP;
-: 2637:extern const int ERR_ASSERT;
-: 2638:extern const int TYPECLASS_REAL;
-: 2639:extern const int TYPECLASS_INTEGER;
-: 2640:extern const int TYPECLASS_COMPLEX;
-: 2641:#if defined(MPI_SEEK_SET) && !defined(MPICH_IGNORE_CXX_SEEK) && !defined(SEEK_SET)
-: 2642:extern const int SEEK_SET;
-: 2643:extern const int SEEK_END;
-: 2644:extern const int SEEK_CUR;
-: 2645:#endif
-: 2646:extern const int DISTRIBUTE_BLOCK;
-: 2647:extern const int DISTRIBUTE_CYCLIC;
-: 2648:extern const int DISTRIBUTE_DFLT_DARG;
-: 2649:extern const int DISTRIBUTE_NONE;
-: 2650:extern const int ORDER_C;
-: 2651:extern const int ORDER_FORTRAN;
-: 2652:// Include these only if MPI-IO is available
-: 2653:#ifdef MPI_MODE_RDONLY
-: 2654:extern const int MAX_DATAREP_STRING;
-: 2655:extern const MPI_Offset DISPLACEMENT_CURRENT;
-: 2656:extern const int MODE_APPEND;
-: 2657:extern const int MODE_CREATE;
-: 2658:extern const int MODE_DELETE_ON_CLOSE;
-: 2659:extern const int MODE_EXCL;
-: 2660:extern const int MODE_RDONLY;
-: 2661:extern const int MODE_RDWR;
-: 2662:extern const int MODE_SEQUENTIAL;
-: 2663:extern const int MODE_UNIQUE_OPEN;
-: 2664:extern const int MODE_WRONLY;
-: 2665:#endif // IO
-: 2666:extern const int MODE_NOCHECK;
-: 2667:extern const int MODE_NOPRECEDE;
-: 2668:extern const int MODE_NOPUT;
-: 2669:extern const int MODE_NOSTORE;
-: 2670:extern const int MODE_NOSUCCEED;
-: 2671:extern const int COMBINER_CONTIGUOUS;
-: 2672:extern const int COMBINER_DARRAY;
-: 2673:extern const int COMBINER_DUP;
-: 2674:extern const int COMBINER_F90_COMPLEX;
-: 2675:extern const int COMBINER_F90_INTEGER;
-: 2676:extern const int COMBINER_F90_REAL;
-: 2677:extern const int COMBINER_HINDEXED_INTEGER;
-: 2678:extern const int COMBINER_HINDEXED;
-: 2679:extern const int COMBINER_HVECTOR_INTEGER;
-: 2680:extern const int COMBINER_HVECTOR;
-: 2681:extern const int COMBINER_INDEXED_BLOCK;
-: 2682:extern const int COMBINER_INDEXED;
-: 2683:extern const int COMBINER_NAMED;
-: 2684:extern const int COMBINER_RESIZED;
-: 2685:extern const int COMBINER_STRUCT_INTEGER;
-: 2686:extern const int COMBINER_STRUCT;
-: 2687:extern const int COMBINER_SUBARRAY;
-: 2688:extern const int COMBINER_VECTOR;
-: 2689:extern const int THREAD_FUNNELED;
-: 2690:extern const int THREAD_MULTIPLE;
-: 2691:extern const int THREAD_SERIALIZED;
-: 2692:extern const int THREAD_SINGLE;
-: 2693:extern const char ** const ARGV_NULL;
-: 2694:extern const char *** const ARGVS_NULL;
-: 2695:extern void * const BOTTOM;
-: 2696:extern void * const IN_PLACE;
-: 2697:extern void Init(void);
-: 2698:extern void Init(int &, char **& );
-: 2699:extern int Init_thread(int);
-: 2700:extern int Init_thread(int &, char **&, int );
-: 2701:extern void Finalize(void);
-: 2702:extern Aint Get_address( void * );
-: 2703:extern double Wtime(void);
-: 2704:extern double Wtick(void);
-: 2705:} // namespace MPI
|