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
Update copyright lines.
[simgrid.git]
/
src
/
smpi
/
colls
/
allreduce
/
allreduce-ompi-ring-segmented.cpp
diff --git
a/src/smpi/colls/allreduce/allreduce-ompi-ring-segmented.cpp
b/src/smpi/colls/allreduce/allreduce-ompi-ring-segmented.cpp
index
dfa142a
..
eaab673
100644
(file)
--- a/
src/smpi/colls/allreduce/allreduce-ompi-ring-segmented.cpp
+++ b/
src/smpi/colls/allreduce/allreduce-ompi-ring-segmented.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2013-20
19
. The SimGrid Team.
+/* Copyright (c) 2013-20
21
. 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
@@
-88,7
+88,7
@@
* [02b] [12b] [22b]
*
* COMPUTATION PHASE 0 (a)
* [02b] [12b] [22b]
*
* COMPUTATION PHASE 0 (a)
- * Step 0: rank r sends block ra to rank (r+1) and receives bloc (r-1)a
+ * Step 0: rank r sends block ra to rank (r+1) and receives bloc
k
(r-1)a
* from rank (r-1) [with wraparound].
* # 0 1 2
* [00a] [00a+10a] [20a]
* from rank (r-1) [with wraparound].
* # 0 1 2
* [00a] [00a+10a] [20a]
@@
-98,7
+98,7
@@
* [22a+02a] [12a] [22a]
* [02b] [12b] [22b]
*
* [22a+02a] [12a] [22a]
* [02b] [12b] [22b]
*
- * Step 1: rank r sends block (r-1)a to rank (r+1) and receives bloc
+ * Step 1: rank r sends block (r-1)a to rank (r+1) and receives bloc
k
* (r-2)a from rank (r-1) [with wraparound].
* # 0 1 2
* [00a] [00a+10a] [00a+10a+20a]
* (r-2)a from rank (r-1) [with wraparound].
* # 0 1 2
* [00a] [00a+10a] [00a+10a+20a]
@@
-109,7
+109,7
@@
* [02b] [12b] [22b]
*
* COMPUTATION PHASE 1 (b)
* [02b] [12b] [22b]
*
* COMPUTATION PHASE 1 (b)
- * Step 0: rank r sends block rb to rank (r+1) and receives bloc (r-1)b
+ * Step 0: rank r sends block rb to rank (r+1) and receives bloc
k
(r-1)b
* from rank (r-1) [with wraparound].
* # 0 1 2
* [00a] [00a+10a] [20a]
* from rank (r-1) [with wraparound].
* # 0 1 2
* [00a] [00a+10a] [20a]
@@
-119,7
+119,7
@@
* [22a+02a] [12a] [22a]
* [22b+02b] [12b] [22b]
*
* [22a+02a] [12a] [22a]
* [22b+02b] [12b] [22b]
*
- * Step 1: rank r sends block (r-1)b to rank (r+1) and receives bloc
+ * Step 1: rank r sends block (r-1)b to rank (r+1) and receives bloc
k
* (r-2)b from rank (r-1) [with wraparound].
* # 0 1 2
* [00a] [00a+10a] [00a+10a+20a]
* (r-2)b from rank (r-1) [with wraparound].
* # 0 1 2
* [00a] [00a+10a] [00a+10a+20a]
@@
-171,11
+171,11
@@
int allreduce__ompi_ring_segmented(const void *sbuf, void *rbuf, int count,
int block_count;
unsigned int inbi;
size_t typelng;
int block_count;
unsigned int inbi;
size_t typelng;
- char *tmpsend =
NULL, *tmprecv = NULL
;
+ char *tmpsend =
nullptr, *tmprecv = nullptr
;
unsigned char* inbuf[2] = {nullptr, nullptr};
ptrdiff_t true_extent, extent;
ptrdiff_t block_offset, max_real_segsize;
unsigned char* inbuf[2] = {nullptr, nullptr};
ptrdiff_t true_extent, extent;
ptrdiff_t block_offset, max_real_segsize;
- MPI_Request reqs[2]
= {NULL, NULL
};
+ MPI_Request reqs[2]
= {nullptr, nullptr
};
const size_t segsize = 1 << 20; /* 1 MB */
int size = comm->size();
int rank = comm->rank();
const size_t segsize = 1 << 20; /* 1 MB */
int size = comm->size();
int rank = comm->rank();
@@
-231,7
+231,11
@@
int allreduce__ompi_ring_segmented(const void *sbuf, void *rbuf, int count,
/* Allocate and initialize temporary buffers */
inbuf[0] = smpi_get_tmp_sendbuffer(max_real_segsize);
/* Allocate and initialize temporary buffers */
inbuf[0] = smpi_get_tmp_sendbuffer(max_real_segsize);
- if (NULL == inbuf[0]) { ret = -1; line = __LINE__; goto error_hndl; }
+ if (nullptr == inbuf[0]) {
+ ret = -1;
+ line = __LINE__;
+ goto error_hndl;
+ }
if (size > 2) {
inbuf[1] = smpi_get_tmp_recvbuffer(max_real_segsize);
if (nullptr == inbuf[1]) {
if (size > 2) {
inbuf[1] = smpi_get_tmp_recvbuffer(max_real_segsize);
if (nullptr == inbuf[1]) {