From: Arnaud Giersch Date: Wed, 28 Mar 2018 15:04:53 +0000 (+0200) Subject: Remove extern "C" from cpp files (src/smpi/). X-Git-Tag: v3.20~603 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a821dea495f4a5d0087871302e4d21ee3ba9b61f Remove extern "C" from cpp files (src/smpi/). --- diff --git a/src/smpi/bindings/smpi_mpi.cpp b/src/smpi/bindings/smpi_mpi.cpp index bdcf2d51d5..b388f682f6 100644 --- a/src/smpi/bindings/smpi_mpi.cpp +++ b/src/smpi/bindings/smpi_mpi.cpp @@ -52,7 +52,6 @@ return P##name args2 ; \ /* MPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage WRAPPED_PMPI_CALL(double, MPI_Wtick,(void),()) WRAPPED_PMPI_CALL(double, MPI_Wtime,(void),()) @@ -397,5 +396,3 @@ UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(int,MPI_Win_set_errhandler,(MPI_Win win, UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Win_test,(MPI_Win win, int *flag),(win, flag)) UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(MPI_Errhandler, MPI_Errhandler_f2c,(MPI_Fint errhandler),(errhandler)) UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(MPI_Fint, MPI_Errhandler_c2f,(MPI_Errhandler errhandler),(errhandler)) - -} // extern "C" diff --git a/src/smpi/bindings/smpi_pmpi.cpp b/src/smpi/bindings/smpi_pmpi.cpp index 6e635fa594..7954c147f1 100644 --- a/src/smpi/bindings/smpi_pmpi.cpp +++ b/src/smpi/bindings/smpi_pmpi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -25,7 +25,6 @@ void TRACE_smpi_set_category(const char *category) } /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage int PMPI_Init(int *argc, char ***argv) { @@ -216,5 +215,3 @@ int PMPI_Keyval_create(MPI_Copy_function* copy_fn, MPI_Delete_function* delete_f int PMPI_Keyval_free(int* keyval) { return simgrid::smpi::Keyval::keyval_free(keyval); } - -} // extern "C" diff --git a/src/smpi/bindings/smpi_pmpi_coll.cpp b/src/smpi/bindings/smpi_pmpi_coll.cpp index 8904505a7c..745d9d93ff 100644 --- a/src/smpi/bindings/smpi_pmpi_coll.cpp +++ b/src/smpi/bindings/smpi_pmpi_coll.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -13,7 +13,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage int PMPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm) { @@ -665,5 +664,3 @@ int PMPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype smpi_bench_begin(); return retval; } - -} diff --git a/src/smpi/bindings/smpi_pmpi_comm.cpp b/src/smpi/bindings/smpi_pmpi_comm.cpp index f8869099cd..f0f2ed449a 100644 --- a/src/smpi/bindings/smpi_pmpi_comm.cpp +++ b/src/smpi/bindings/smpi_pmpi_comm.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -12,7 +12,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage int PMPI_Comm_rank(MPI_Comm comm, int *rank) { @@ -265,5 +264,3 @@ int PMPI_Attr_put(MPI_Comm comm, int keyval, void* attr_value) { else return comm->attr_put(keyval, attr_value); } - -} diff --git a/src/smpi/bindings/smpi_pmpi_group.cpp b/src/smpi/bindings/smpi_pmpi_group.cpp index 93f0cc6d2a..8d0bee588c 100644 --- a/src/smpi/bindings/smpi_pmpi_group.cpp +++ b/src/smpi/bindings/smpi_pmpi_group.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -14,7 +14,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage int PMPI_Group_free(MPI_Group * group) { @@ -190,6 +189,3 @@ MPI_Group PMPI_Group_f2c(MPI_Fint group){ MPI_Fint PMPI_Group_c2f(MPI_Group group){ return group->c2f(); } - - -} diff --git a/src/smpi/bindings/smpi_pmpi_info.cpp b/src/smpi/bindings/smpi_pmpi_info.cpp index ed0c2b3c56..89860685a6 100644 --- a/src/smpi/bindings/smpi_pmpi_info.cpp +++ b/src/smpi/bindings/smpi_pmpi_info.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -9,7 +9,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage int PMPI_Info_create( MPI_Info *info){ if (info == nullptr) @@ -81,5 +80,3 @@ MPI_Info PMPI_Info_f2c(MPI_Fint info){ MPI_Fint PMPI_Info_c2f(MPI_Info info){ return info->c2f(); } - -} diff --git a/src/smpi/bindings/smpi_pmpi_op.cpp b/src/smpi/bindings/smpi_pmpi_op.cpp index 4ca50ded06..9b4a2e8eee 100644 --- a/src/smpi/bindings/smpi_pmpi_op.cpp +++ b/src/smpi/bindings/smpi_pmpi_op.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -9,7 +9,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage int PMPI_Op_create(MPI_User_function * function, int commute, MPI_Op * op) { @@ -52,5 +51,3 @@ MPI_Op PMPI_Op_f2c(MPI_Fint op){ MPI_Fint PMPI_Op_c2f(MPI_Op op){ return op->c2f(); } - -} diff --git a/src/smpi/bindings/smpi_pmpi_request.cpp b/src/smpi/bindings/smpi_pmpi_request.cpp index 82d2642913..9f0d334e2a 100644 --- a/src/smpi/bindings/smpi_pmpi_request.cpp +++ b/src/smpi/bindings/smpi_pmpi_request.cpp @@ -19,7 +19,6 @@ static int getPid(MPI_Comm comm, int id) } /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage int PMPI_Send_init(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request * request) { @@ -688,5 +687,3 @@ MPI_Request PMPI_Request_f2c(MPI_Fint request){ MPI_Fint PMPI_Request_c2f(MPI_Request request) { return request->c2f(); } - -} diff --git a/src/smpi/bindings/smpi_pmpi_topo.cpp b/src/smpi/bindings/smpi_pmpi_topo.cpp index 0be7e5fe34..c428a8cdb9 100644 --- a/src/smpi/bindings/smpi_pmpi_topo.cpp +++ b/src/smpi/bindings/smpi_pmpi_topo.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -9,7 +9,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage /* The topo part of MPI_COMM_WORLD should always be nullptr. When other topologies will be implemented, not only should we * check if the topology is nullptr, but we should check if it is the good topology type (so we have to add a @@ -132,5 +131,3 @@ int PMPI_Cart_sub(MPI_Comm comm, int* remain_dims, MPI_Comm* comm_new) { return MPI_ERR_ARG; return MPI_SUCCESS; } - -} diff --git a/src/smpi/bindings/smpi_pmpi_type.cpp b/src/smpi/bindings/smpi_pmpi_type.cpp index 861394190c..ada61b8da9 100644 --- a/src/smpi/bindings/smpi_pmpi_type.cpp +++ b/src/smpi/bindings/smpi_pmpi_type.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -9,7 +9,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage int PMPI_Type_free(MPI_Datatype * datatype) { @@ -367,5 +366,3 @@ int PMPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int* size) return MPI_SUCCESS; } - -} diff --git a/src/smpi/bindings/smpi_pmpi_win.cpp b/src/smpi/bindings/smpi_pmpi_win.cpp index 4bb15533bd..2176dd4a8e 100644 --- a/src/smpi/bindings/smpi_pmpi_win.cpp +++ b/src/smpi/bindings/smpi_pmpi_win.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -14,7 +14,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage int PMPI_Win_create( void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win){ int retval = 0; @@ -812,5 +811,3 @@ MPI_Win PMPI_Win_f2c(MPI_Fint win){ MPI_Fint PMPI_Win_c2f(MPI_Win win){ return win->c2f(); } - -} diff --git a/src/smpi/internals/smpi_bench.cpp b/src/smpi/internals/smpi_bench.cpp index b71adc7edd..1a64671de0 100644 --- a/src/smpi/internals/smpi_bench.cpp +++ b/src/smpi/internals/smpi_bench.cpp @@ -396,7 +396,6 @@ void smpi_sample_3(int global, const char *file, int line) data.benching = false; } -extern "C" { /** These functions will be called from the user code **/ smpi_trace_call_location_t* smpi_trace_get_call_location() { return smpi_process()->call_location(); @@ -423,7 +422,6 @@ void smpi_trace_set_call_location__(const char* file, int* line) { smpi_trace_set_call_location(file, *line); } -} void smpi_bench_destroy() {