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
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git]
/
src
/
smpi
/
colls
/
reduce-binomial.c
diff --git
a/src/smpi/colls/reduce-binomial.c
b/src/smpi/colls/reduce-binomial.c
index
c3b4067
..
180a07d
100644
(file)
--- a/
src/smpi/colls/reduce-binomial.c
+++ b/
src/smpi/colls/reduce-binomial.c
@@
-1,3
+1,9
@@
+/* Copyright (c) 2013-2014. 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 "colls_private.h"
//#include <star-reduction.c>
#include "colls_private.h"
//#include <star-reduction.c>
@@
-21,7
+27,7
@@
int smpi_coll_tuned_reduce_binomial(void *sendbuf, void *recvbuf, int count,
extent = smpi_datatype_get_extent(datatype);
extent = smpi_datatype_get_extent(datatype);
- tmp_buf = (void *)
xbt_malloc
(count * extent);
+ tmp_buf = (void *)
smpi_get_tmp_sendbuffer
(count * extent);
int is_commutative = smpi_op_is_commute(op);
mask = 1;
int is_commutative = smpi_op_is_commute(op);
mask = 1;
@@
-40,7
+46,7
@@
int smpi_coll_tuned_reduce_binomial(void *sendbuf, void *recvbuf, int count,
/* If I'm not the root, then my recvbuf may not be valid, therefore
I have to allocate a temporary one */
if (rank != root) {
/* If I'm not the root, then my recvbuf may not be valid, therefore
I have to allocate a temporary one */
if (rank != root) {
- recvbuf = (void *)
malloc(count*(max
(extent,true_extent)));
+ recvbuf = (void *)
smpi_get_tmp_recvbuffer(count*(MAX
(extent,true_extent)));
recvbuf = (void *)((char*)recvbuf - true_lb);
}
if ((rank != root) || (sendbuf != MPI_IN_PLACE)) {
recvbuf = (void *)((char*)recvbuf - true_lb);
}
if ((rank != root) || (sendbuf != MPI_IN_PLACE)) {
@@
-79,9
+85,9
@@
int smpi_coll_tuned_reduce_binomial(void *sendbuf, void *recvbuf, int count,
}
if (rank != root) {
}
if (rank != root) {
-
xbt_free
(recvbuf);
+
smpi_free_tmp_buffer
(recvbuf);
}
}
-
free
(tmp_buf);
+
smpi_free_tmp_buffer
(tmp_buf);
return 0;
}
return 0;
}