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
Use C++17 features: std::scoped_lock and structured bindings.
[simgrid.git]
/
contrib
/
benchmarking_code_block
/
inject.h
diff --git
a/contrib/benchmarking_code_block/inject.h
b/contrib/benchmarking_code_block/inject.h
index 507e8dbb1a3017b133747f5c7855383006d1bf8c..12083cca90cd67f0569b0d53879ccd2a11735185 100644
(file)
--- a/
contrib/benchmarking_code_block/inject.h
+++ b/
contrib/benchmarking_code_block/inject.h
@@
-1,4
+1,4
@@
-/* Copyright (c) 2013-20
19
. The SimGrid Team.
+/* Copyright (c) 2013-20
23
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-56,8
+56,7
@@
static inline void xbt_inject_init(char *inputfile)
{
xbt_dict_t mydict = get_dict();
FILE* fpInput = fopen(inputfile, "r");
{
xbt_dict_t mydict = get_dict();
FILE* fpInput = fopen(inputfile, "r");
- if (fpInput == NULL)
- printf("Error while opening the inputfile");
+ xbt_assert(fpInput != NULL, "Error while opening the inputfile");
fseek(fpInput, 0, 0);
char line[200];
fseek(fpInput, 0, 0);
char line[200];
@@
-87,7
+86,7
@@
static inline void xbt_inject_init(char *inputfile)
for (int i = 0; i < (data->n - 1); i++)
data->percentage[i] = atof(strtok_r(NULL, "\t", &saveptr));
for (int i = 0; i < (data->n - 1); i++)
data->percentage[i] = atof(strtok_r(NULL, "\t", &saveptr));
- xbt_dict_set(mydict, key, data
, NULL
);
+ xbt_dict_set(mydict, key, data);
}
fclose(fpInput);
}
}
fclose(fpInput);
}
@@
-140,7
+139,7
@@
static inline void inject_init_starpu(char *inputfile, xbt_dict_t *dict, RngStre
data->percentage[i] = atof(strtok_r(NULL, "\t", &saveptr));
}
data->percentage[i] = atof(strtok_r(NULL, "\t", &saveptr));
}
- xbt_dict_set(mydict, key, data
, NULL
);
+ xbt_dict_set(mydict, key, data);
}
fclose(fpInput);
}
}
fclose(fpInput);
}