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
Move all smpi colls to cpp.
[simgrid.git]
/
src
/
smpi
/
colls
/
reduce-rab.cpp
diff --git
a/src/smpi/colls/reduce-rab.c
b/src/smpi/colls/reduce-rab.cpp
similarity index 98%
rename from
src/smpi/colls/reduce-rab.c
rename to
src/smpi/colls/reduce-rab.cpp
index
61653b7
..
f529bd8
100644
(file)
--- a/
src/smpi/colls/reduce-rab.c
+++ b/
src/smpi/colls/reduce-rab.cpp
@@
-594,14
+594,14
@@
static int MPI_I_anyReduce(void* Sendbuf, void* Recvbuf, int count, MPI_Datatype
MPI_Type_extent(mpi_datatype, &typelng);
scrlng = typelng * count;
#ifdef NO_CACHE_OPTIMIZATION
MPI_Type_extent(mpi_datatype, &typelng);
scrlng = typelng * count;
#ifdef NO_CACHE_OPTIMIZATION
- scr1buf =
malloc(scrlng
);
- scr2buf =
malloc(scrlng
);
- scr3buf =
malloc(scrlng
);
+ scr1buf =
static_cast<char*>(xbt_malloc(scrlng)
);
+ scr2buf =
static_cast<char*>(xbt_malloc(scrlng)
);
+ scr3buf =
static_cast<char*>(xbt_malloc(scrlng)
);
#else
# ifdef SCR_LNG_OPTIM
scrlng = SCR_LNG_OPTIM(scrlng);
# endif
#else
# ifdef SCR_LNG_OPTIM
scrlng = SCR_LNG_OPTIM(scrlng);
# endif
- scr2buf =
malloc(3*scrlng
); /* To test cache problems. */
+ scr2buf =
static_cast<char*>(xbt_malloc(3*scrlng)
); /* To test cache problems. */
scr1buf = scr2buf + 1*scrlng; /* scr1buf and scr3buf must not*/
scr3buf = scr2buf + 2*scrlng; /* be used for malloc because */
/* they are interchanged below.*/
scr1buf = scr2buf + 1*scrlng; /* scr1buf and scr3buf must not*/
scr3buf = scr2buf + 2*scrlng; /* be used for malloc because */
/* they are interchanged below.*/
@@
-913,9
+913,9
@@
static int MPI_I_anyReduce(void* Sendbuf, void* Recvbuf, int count, MPI_Datatype
}
# ifdef NO_CACHE_TESTING
}
# ifdef NO_CACHE_TESTING
-
free(scr1buf); free(scr2buf);
free(scr3buf);
+
xbt_free(scr1buf); xbt_free(scr2buf); xbt_
free(scr3buf);
# else
# else
- free(scr2buf); /* scr1buf and scr3buf are part of scr2buf */
+
xbt_
free(scr2buf); /* scr1buf and scr3buf are part of scr2buf */
# endif
return(MPI_SUCCESS);
} /* new_prot */
# endif
return(MPI_SUCCESS);
} /* new_prot */