2
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3
* University Research and Technology
4
* Corporation. All rights reserved.
5
* Copyright (c) 2004-2005 The University of Tennessee and The University
6
* of Tennessee Research Foundation. All rights
8
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9
* University of Stuttgart. All rights reserved.
10
* Copyright (c) 2004-2005 The Regents of the University of California.
11
* All rights reserved.
12
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
15
* Additional copyrights may follow
19
#include "ompi_config.h"
21
#include "ompi/mpi/c/bindings.h"
22
#include "ompi/mpi/f77/fint_2_int.h"
23
#include "ompi/op/op.h"
25
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
26
#pragma weak MPI_Op_f2c = PMPI_Op_f2c
29
#if OMPI_PROFILING_DEFINES
30
#include "ompi/mpi/c/profile/defines.h"
33
static const char FUNC_NAME[] = "MPI_Op_f2c";
36
MPI_Op MPI_Op_f2c(MPI_Fint op_f)
38
int op_index = OMPI_FINT_2_INT(op_f);
42
if (MPI_PARAM_CHECK) {
43
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
46
/* Per MPI-2:4.12.4, do not invoke an error handler if we get an
47
invalid fortran handle. If we get an invalid fortran handle,
48
return an invalid C handle. */
52
ompi_pointer_array_get_size(ompi_op_f_to_c_table)) {
56
return ompi_pointer_array_get_item(ompi_op_f_to_c_table, op_index);