Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions src/t8_data/t8_shmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ t8_shmem_array_init (t8_shmem_array_t *parray, size_t elem_size, size_t elem_cou

/** Enable writing mode for a shmem array. Only some processes may be allowed
* to write into the array, which is indicated by the return value being non-zero.
* The shared memory is managed via inter- and intranode communicators.
* Only rank 0 of the intranode communicator will be allowed to write into the array.
* \param [in,out] array Initialized array. Writing will be enabled on certain processes.
* \return True if the calling process can write into the array.
* \note This function is MPI collective.
Expand Down Expand Up @@ -152,31 +154,31 @@ t8_shmem_array_allgather (const void *sendbuf, int sendcount, sc_MPI_Datatype se
* Computes the recvcount-array and displacement-array for each rank of a node using the
* sendcount.
* The total number of items of each node is then used to compute the
* recvcount-array and displacement-array between nodes.
* Use t8_shmem_array_allgather if the sendcount is equal on all procs for better scaling.
*
* recvcount-array and displacement-array between nodes.
* Use t8_shmem_array_allgather if the sendcount is equal on all procs for better scaling.
*
* \param[in] sendbuf the source from this process
* \param[in] sendcount the number of items to gather on this proc
* \param[in] sendtype the type of items to gather
* \param[in, out] recvarray array of type recvtype where the data gets written to
* \param[in] recvtype the type of items to receive
* \param[in] comm the mpi communicator
*
*
*/
void
t8_shmem_array_allgatherv (void *sendbuf, const int sendcount, sc_MPI_Datatype sendtype, t8_shmem_array_t recvarray,
sc_MPI_Datatype recvtype, sc_MPI_Comm comm);

/**
* Fill a t8_shmem array with an Allgather of the prefix operation over all
* processes.
*
* Fill a t8_shmem array with an Allgather of the prefix operation over all
* processes.
*
* The receive array will be
* (0, send0, send0 op send1, send0 op send1 op send2, ...)
*
* \note the first entry of \a recvarray will be set to 0 using memset.
* The entry can be changed after calling t8_shmem_array_prefix
*
*
* \note the first entry of \a recvarray will be set to 0 using memset.
* The entry can be changed after calling t8_shmem_array_prefix
*
* \param[in] sendbuf The source from this process
* \param[in, out] recvarray The destination shmem array
* \param[in] count The number of items to gather
Expand Down Expand Up @@ -265,7 +267,7 @@ void *
t8_shmem_array_index_for_writing (t8_shmem_array_t array, size_t index);

/* TODO: implement and comment */
/* returns true if arrays are equal
/* returns true if arrays are equal
* \note Writing mode must be disabled for \a array_a and \a array_b.
*/
int
Expand Down