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
Function smpi_process_papi_counters() was renamed (untested).
[simgrid.git]
/
src
/
smpi
/
colls
/
coll_tuned_topo.cpp
diff --git
a/src/smpi/colls/coll_tuned_topo.cpp
b/src/smpi/colls/coll_tuned_topo.cpp
index
db88a99
..
7138c7e
100644
(file)
--- a/
src/smpi/colls/coll_tuned_topo.cpp
+++ b/
src/smpi/colls/coll_tuned_topo.cpp
@@
-19,8
+19,8
@@
* Additional copyrights may follow
*/
* Additional copyrights may follow
*/
-#include "coll
s_private.h
"
-#include "coll
_tuned_topo.h
"
+#include "coll
_tuned_topo.hpp
"
+#include "coll
s_private.hpp
"
/*
* Some static helpers.
*/
/*
* Some static helpers.
*/
@@
-101,7
+101,7
@@
ompi_coll_tuned_topo_build_tree( int fanout,
size = comm->size();
rank = comm->rank();
size = comm->size();
rank = comm->rank();
- tree =
(ompi_coll_tree_t*)malloc(sizeof(ompi_coll_tree_t))
;
+ tree =
new ompi_coll_tree_t
;
if (not tree) {
XBT_DEBUG("coll:tuned:topo_build_tree PANIC::out of memory");
return NULL;
if (not tree) {
XBT_DEBUG("coll:tuned:topo_build_tree PANIC::out of memory");
return NULL;
@@
-201,7
+201,7
@@
ompi_coll_tuned_topo_build_in_order_bintree( MPI_Comm comm )
size = comm->size();
rank = comm->rank();
size = comm->size();
rank = comm->rank();
- tree =
(ompi_coll_tree_t*)malloc(sizeof(ompi_coll_tree_t))
;
+ tree =
new ompi_coll_tree_t
;
if (not tree) {
XBT_DEBUG("coll:tuned:topo_build_tree PANIC::out of memory");
return NULL;
if (not tree) {
XBT_DEBUG("coll:tuned:topo_build_tree PANIC::out of memory");
return NULL;
@@
-304,7
+304,7
@@
int ompi_coll_tuned_topo_destroy_tree( ompi_coll_tree_t** tree )
ptr = *tree;
ptr = *tree;
-
free (ptr)
;
+
delete ptr
;
*tree = NULL; /* mark tree as gone */
return MPI_SUCCESS;
*tree = NULL; /* mark tree as gone */
return MPI_SUCCESS;
@@
-345,7
+345,7
@@
ompi_coll_tuned_topo_build_bmtree( MPI_Comm comm,
index = rank -root;
index = rank -root;
- bmtree =
(ompi_coll_tree_t*)malloc(sizeof(ompi_coll_tree_t))
;
+ bmtree =
new ompi_coll_tree_t
;
if (not bmtree) {
XBT_DEBUG("coll:tuned:topo:build_bmtree PANIC out of memory");
return NULL;
if (not bmtree) {
XBT_DEBUG("coll:tuned:topo:build_bmtree PANIC out of memory");
return NULL;
@@
-424,7
+424,7
@@
ompi_coll_tree_t* ompi_coll_tuned_topo_build_in_order_bmtree(MPI_Comm comm, int
vrank = (rank - root + size) % size;
vrank = (rank - root + size) % size;
- bmtree =
(ompi_coll_tree_t*)xbt_malloc(sizeof(ompi_coll_tree_t))
;
+ bmtree =
new ompi_coll_tree_t
;
if (not bmtree) {
XBT_DEBUG("coll:tuned:topo:build_bmtree PANIC out of memory");
return NULL;
if (not bmtree) {
XBT_DEBUG("coll:tuned:topo:build_bmtree PANIC out of memory");
return NULL;
@@
-494,7
+494,7
@@
ompi_coll_tuned_topo_build_chain( int fanout,
/*
* Allocate space for topology arrays if needed
*/
/*
* Allocate space for topology arrays if needed
*/
- chain =
(ompi_coll_tree_t*)malloc( sizeof(ompi_coll_tree_t) )
;
+ chain =
new ompi_coll_tree_t
;
if (not chain) {
XBT_DEBUG("coll:tuned:topo:build_chain PANIC out of memory");
fflush(stdout);
if (not chain) {
XBT_DEBUG("coll:tuned:topo:build_chain PANIC out of memory");
fflush(stdout);