1
1

Cast everything to make the microsoft C++ compiler happy.

This commit was SVN r11373.
Этот коммит содержится в:
George Bosilca 2006-08-23 16:35:16 +00:00
родитель f8f2dd8e03
Коммит d6b6f465b6
15 изменённых файлов: 32 добавлений и 36 удалений

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -48,7 +48,7 @@ int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag)
src/attribute/attribute.c for a lengthy comment explaining Open src/attribute/attribute.c for a lengthy comment explaining Open
MPI attribute behavior. */ MPI attribute behavior. */
ret = ompi_attr_get_c(comm->c_keyhash, keyval, attribute_val, flag); ret = ompi_attr_get_c(comm->c_keyhash, keyval, (void**)attribute_val, flag);
OMPI_ERRHANDLER_RETURN(ret, comm, ret, FUNC_NAME); OMPI_ERRHANDLER_RETURN(ret, comm, ret, FUNC_NAME);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -23,6 +23,7 @@
#include "mpi.h" #include "mpi.h"
#include "ompi/communicator/communicator.h" #include "ompi/communicator/communicator.h"
#include "ompi/datatype/datatype.h" #include "ompi/datatype/datatype.h"
#include "ompi/runtime/params.h"
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
extern "C" { extern "C" {
@ -34,11 +35,6 @@ extern "C" {
doesn't work to simply list all of the pragmas in a top-level doesn't work to simply list all of the pragmas in a top-level
header file. */ header file. */
/* This variable is actually in src/mpi/runtime/ompi_mpi_init.c, but it
is used by every MPI function. */
OMPI_DECLSPEC extern bool ompi_mpi_param_check;
/* These macros have to be used to check the corectness of the datatype depending on the /* These macros have to be used to check the corectness of the datatype depending on the
* operations that we have to do with them. They can be used on all functions, not only * operations that we have to do with them. They can be used on all functions, not only
* on the top level MPI functions, as they does not trigger the error handler. Is the user * on the top level MPI functions, as they does not trigger the error handler. Is the user

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -50,5 +50,5 @@ MPI_Comm MPI_Comm_f2c(MPI_Fint comm)
return NULL; return NULL;
} }
return ompi_pointer_array_get_item(&ompi_mpi_communicators, o_index); return (MPI_Comm)ompi_pointer_array_get_item(&ompi_mpi_communicators, o_index);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -49,6 +49,6 @@ int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval,
MPI attribute behavior. */ MPI attribute behavior. */
ret = ompi_attr_get_c(comm->c_keyhash, comm_keyval, ret = ompi_attr_get_c(comm->c_keyhash, comm_keyval,
attribute_val, flag); (void**)attribute_val, flag);
OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME); OMPI_ERRHANDLER_RETURN(ret, comm, MPI_ERR_OTHER, FUNC_NAME);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -53,6 +53,6 @@ MPI_Errhandler MPI_Errhandler_f2c(MPI_Fint errhandler_f)
return NULL; return NULL;
} }
return ompi_pointer_array_get_item(ompi_errhandler_f_to_c_table, return (MPI_Errhandler)ompi_pointer_array_get_item(ompi_errhandler_f_to_c_table,
eh_index); eh_index);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -52,5 +52,5 @@ MPI_File MPI_File_f2c(MPI_Fint file_f)
return NULL; return NULL;
} }
return ompi_pointer_array_get_item(&ompi_file_f_to_c_table, file_index); return (MPI_File)ompi_pointer_array_get_item(&ompi_file_f_to_c_table, file_index);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -52,5 +52,5 @@ MPI_Group MPI_Group_f2c(MPI_Fint group_f)
return NULL; return NULL;
} }
return ompi_pointer_array_get_item(ompi_group_f_to_c_table, group_index); return (MPI_Group)ompi_pointer_array_get_item(ompi_group_f_to_c_table, group_index);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -60,5 +60,5 @@ MPI_Info MPI_Info_f2c(MPI_Fint info)
return NULL; return NULL;
} }
return ompi_pointer_array_get_item(&ompi_info_f_to_c_table, info_index); return (MPI_Info)ompi_pointer_array_get_item(&ompi_info_f_to_c_table, info_index);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -50,7 +50,7 @@ int MPI_Op_create(MPI_User_function *function, int commute,
/* Create and cache the op. Sets a refcount of 1. */ /* Create and cache the op. Sets a refcount of 1. */
*op = ompi_op_create((bool) commute, *op = ompi_op_create((commute != 0 ? true : false),
(ompi_op_fortran_handler_fn_t*) function); (ompi_op_fortran_handler_fn_t*) function);
if (NULL == *op) { if (NULL == *op) {
err = MPI_ERR_INTERN; err = MPI_ERR_INTERN;

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -53,5 +53,5 @@ MPI_Op MPI_Op_f2c(MPI_Fint op_f)
return NULL; return NULL;
} }
return ompi_pointer_array_get_item(ompi_op_f_to_c_table, op_index); return (MPI_Op)ompi_pointer_array_get_item(ompi_op_f_to_c_table, op_index);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -51,6 +51,6 @@ MPI_Request MPI_Request_f2c(MPI_Fint request)
return NULL; return NULL;
} }
return ompi_pointer_array_get_item(&ompi_request_f_to_c_table, return (MPI_Request)ompi_pointer_array_get_item(&ompi_request_f_to_c_table,
request_index); request_index);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -51,6 +51,6 @@ MPI_Datatype MPI_Type_f2c(MPI_Fint datatype)
return NULL; return NULL;
} }
return ompi_pointer_array_get_item(ompi_datatype_f_to_c_table, datatype); return (MPI_Datatype)ompi_pointer_array_get_item(ompi_datatype_f_to_c_table, datatype);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -57,7 +57,7 @@ int MPI_Type_get_attr (MPI_Datatype type,
MPI attribute behavior. */ MPI attribute behavior. */
ret = ompi_attr_get_c(type->d_keyhash, type_keyval, ret = ompi_attr_get_c(type->d_keyhash, type_keyval,
attribute_val, flag); (void**)attribute_val, flag);
OMPI_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, OMPI_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD,
MPI_ERR_OTHER, FUNC_NAME); MPI_ERR_OTHER, FUNC_NAME);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -50,5 +50,5 @@ MPI_Win MPI_Win_f2c(MPI_Fint win)
return NULL; return NULL;
} }
return ompi_pointer_array_get_item(&ompi_mpi_windows, o_index); return (MPI_Win)ompi_pointer_array_get_item(&ompi_mpi_windows, o_index);
} }

Просмотреть файл

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -53,7 +53,7 @@ int MPI_Win_get_attr(MPI_Win win, int win_keyval,
MPI attribute behavior. */ MPI attribute behavior. */
ret = ompi_attr_get_c(win->w_keyhash, win_keyval, ret = ompi_attr_get_c(win->w_keyhash, win_keyval,
attribute_val, flag); (void**)attribute_val, flag);
/* MPI-2 Section 6.2.2 says that for MPI_WIN_BASE, base will be a /* MPI-2 Section 6.2.2 says that for MPI_WIN_BASE, base will be a
pointer to the window in C/C++ and an integer representation of pointer to the window in C/C++ and an integer representation of