Skip to content

Commit 8d06ad1

Browse files
authored
Merge pull request #1724 from DLR-AMR/improve_shmem_docu
Documentation: shmem_array_start_writing documentation
2 parents 2d2c4ef + 33b5bd4 commit 8d06ad1

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/t8_data/t8_shmem.h

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ t8_shmem_array_init (t8_shmem_array_t *parray, size_t elem_size, size_t elem_cou
100100

101101
/** Enable writing mode for a shmem array. Only some processes may be allowed
102102
* to write into the array, which is indicated by the return value being non-zero.
103+
* The shared memory is managed via inter- and intranode communicators.
104+
* Only rank 0 of the intranode communicator will be allowed to write into the array.
103105
* \param [in,out] array Initialized array. Writing will be enabled on certain processes.
104106
* \return True if the calling process can write into the array.
105107
* \note This function is MPI collective.
@@ -152,31 +154,31 @@ t8_shmem_array_allgather (const void *sendbuf, int sendcount, sc_MPI_Datatype se
152154
* Computes the recvcount-array and displacement-array for each rank of a node using the
153155
* sendcount.
154156
* The total number of items of each node is then used to compute the
155-
* recvcount-array and displacement-array between nodes.
156-
* Use t8_shmem_array_allgather if the sendcount is equal on all procs for better scaling.
157-
*
157+
* recvcount-array and displacement-array between nodes.
158+
* Use t8_shmem_array_allgather if the sendcount is equal on all procs for better scaling.
159+
*
158160
* \param[in] sendbuf the source from this process
159161
* \param[in] sendcount the number of items to gather on this proc
160162
* \param[in] sendtype the type of items to gather
161163
* \param[in, out] recvarray array of type recvtype where the data gets written to
162164
* \param[in] recvtype the type of items to receive
163165
* \param[in] comm the mpi communicator
164-
*
166+
*
165167
*/
166168
void
167169
t8_shmem_array_allgatherv (void *sendbuf, const int sendcount, sc_MPI_Datatype sendtype, t8_shmem_array_t recvarray,
168170
sc_MPI_Datatype recvtype, sc_MPI_Comm comm);
169171

170172
/**
171-
* Fill a t8_shmem array with an Allgather of the prefix operation over all
172-
* processes.
173-
*
173+
* Fill a t8_shmem array with an Allgather of the prefix operation over all
174+
* processes.
175+
*
174176
* The receive array will be
175177
* (0, send0, send0 op send1, send0 op send1 op send2, ...)
176-
*
177-
* \note the first entry of \a recvarray will be set to 0 using memset.
178-
* The entry can be changed after calling t8_shmem_array_prefix
179-
*
178+
*
179+
* \note the first entry of \a recvarray will be set to 0 using memset.
180+
* The entry can be changed after calling t8_shmem_array_prefix
181+
*
180182
* \param[in] sendbuf The source from this process
181183
* \param[in, out] recvarray The destination shmem array
182184
* \param[in] count The number of items to gather

0 commit comments

Comments
 (0)