A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set default error handler to MPI_ERRORS_ARE_FATAL, as in a proper MPI implementation
[simgrid.git]
/
src
/
smpi
/
mpi
/
smpi_info.cpp
diff --git
a/src/smpi/mpi/smpi_info.cpp
b/src/smpi/mpi/smpi_info.cpp
index
160892e
..
73a323e
100644
(file)
--- a/
src/smpi/mpi/smpi_info.cpp
+++ b/
src/smpi/mpi/smpi_info.cpp
@@
-1,21
+1,16
@@
-/* Copyright (c) 2007-2017. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2007-2019. 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. */
#include "smpi_info.hpp"
/* 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. */
#include "smpi_info.hpp"
-#include "xbt/ex.hpp"
-#include "xbt/sysdep.h"
+#include "simgrid/Exception.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid
{
+namespace smpi
{
-
Info::Info(Info* info) : map_(info->map_
)
+
void Info::ref(
)
{
{
-}
-
-void Info::ref(){
refcount_++;
}
refcount_++;
}
@@
-26,11
+21,7
@@
void Info::unref(Info* info){
}
}
}
}
-void Info::set(char *key, char *value){
- map_[key] = value;
-}
-
-int Info::get(char *key, int valuelen, char *value, int *flag){
+int Info::get(const char *key, int valuelen, char *value, int *flag){
*flag=false;
auto val = map_.find(key);
if (val != map_.end()) {
*flag=false;
auto val = map_.find(key);
if (val != map_.end()) {
@@
-46,7
+37,7
@@
int Info::get(char *key, int valuelen, char *value, int *flag){
}
}
}
}
-int Info::remove(char *key){
+int Info::remove(c
onst c
har *key){
if (map_.erase(key) == 0)
return MPI_ERR_INFO_NOKEY;
else
if (map_.erase(key) == 0)
return MPI_ERR_INFO_NOKEY;
else
@@
-70,7
+61,7
@@
int Info::get_nthkey(int n, char *key){
return MPI_ERR_ARG;
}
return MPI_ERR_ARG;
}
-int Info::get_valuelen(char *key, int *valuelen, int *flag){
+int Info::get_valuelen(c
onst c
har *key, int *valuelen, int *flag){
*flag=false;
auto val = map_.find(key);
if (val != map_.end()) {
*flag=false;
auto val = map_.find(key);
if (val != map_.end()) {