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

📄 type_match_size_f.c

📁 MPI stands for the Message Passing Interface. Written by the MPI Forum (a large committee comprising
💻 C
字号:
/* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana *                         University Research and Technology *                         Corporation.  All rights reserved. * Copyright (c) 2004-2005 The University of Tennessee and The University *                         of Tennessee Research Foundation.  All rights *                         reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,  *                         University of Stuttgart.  All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. *                         All rights reserved. * $COPYRIGHT$ *  * Additional copyrights may follow *  * $HEADER$ */#include "ompi_config.h"#include "ompi/mpi/f77/bindings.h"#include "ompi/mpi/f77/constants.h"#include "ompi/datatype/datatype.h"#include "ompi/errhandler/errhandler.h"#include "ompi/communicator/communicator.h"#include "ompi/runtime/params.h"#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER#pragma weak PMPI_TYPE_MATCH_SIZE = mpi_type_match_size_f#pragma weak pmpi_type_match_size = mpi_type_match_size_f#pragma weak pmpi_type_match_size_ = mpi_type_match_size_f#pragma weak pmpi_type_match_size__ = mpi_type_match_size_f#elif OMPI_PROFILE_LAYEROMPI_GENERATE_F77_BINDINGS (PMPI_TYPE_MATCH_SIZE,                           pmpi_type_match_size,                           pmpi_type_match_size_,                           pmpi_type_match_size__,                           pmpi_type_match_size_f,                           (MPI_Fint *typeclass, MPI_Fint *size, MPI_Fint *type, MPI_Fint *ierr),                           (typeclass, size, type, ierr) )#endif#if OMPI_HAVE_WEAK_SYMBOLS#pragma weak MPI_TYPE_MATCH_SIZE = mpi_type_match_size_f#pragma weak mpi_type_match_size = mpi_type_match_size_f#pragma weak mpi_type_match_size_ = mpi_type_match_size_f#pragma weak mpi_type_match_size__ = mpi_type_match_size_f#endif#if ! OMPI_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYEROMPI_GENERATE_F77_BINDINGS (MPI_TYPE_MATCH_SIZE,                           mpi_type_match_size,                           mpi_type_match_size_,                           mpi_type_match_size__,                           mpi_type_match_size_f,                           (MPI_Fint *typeclass, MPI_Fint *size, MPI_Fint *type, MPI_Fint *ierr),                           (typeclass, size, type, ierr) )#endif#if OMPI_PROFILE_LAYER && ! OMPI_HAVE_WEAK_SYMBOLS#include "ompi/mpi/f77/profile/defines.h"#endifstatic const char FUNC_NAME[] = "MPI_Type_match_size_f";/*  We cannot use the C function as from Fortran we should check for Fortran types. The only * difference is the type of predefined datatypes we are looking for. */void mpi_type_match_size_f(MPI_Fint *typeclass, MPI_Fint *size, MPI_Fint *type, MPI_Fint *ierr){    MPI_Datatype c_type;    int c_size = OMPI_FINT_2_INT( *size );    if (MPI_PARAM_CHECK) {        OMPI_ERR_INIT_FINALIZE(FUNC_NAME);    }    switch( OMPI_FINT_2_INT(*typeclass) ) {    case MPI_TYPECLASS_REAL:        c_type = (MPI_Datatype)ompi_ddt_match_size( c_size, DT_FLAG_DATA_FLOAT, DT_FLAG_DATA_FORTRAN );        break;    case MPI_TYPECLASS_INTEGER:        c_type = (MPI_Datatype)ompi_ddt_match_size( c_size, DT_FLAG_DATA_INT, DT_FLAG_DATA_FORTRAN );        break;    case MPI_TYPECLASS_COMPLEX:        c_type = (MPI_Datatype)ompi_ddt_match_size( c_size, DT_FLAG_DATA_COMPLEX, DT_FLAG_DATA_FORTRAN );        break;    default:        c_type = &ompi_mpi_datatype_null;    }    *type = MPI_Type_c2f( c_type );    if ( c_type != &ompi_mpi_datatype_null ) {        *ierr = OMPI_INT_2_FINT( MPI_SUCCESS );    } else {        *ierr = OMPI_INT_2_FINT( MPI_ERR_ARG );        (void)OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME);    }}

⌨️ 快捷键说明

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