Go to the source code of this file.
|
void | sc_shmem_set_type (sc_MPI_Comm comm, sc_shmem_type_t type) |
| Set the type of shared memory arrays to use on this mpi communicator. More...
|
|
sc_shmem_type_t | sc_shmem_get_type (sc_MPI_Comm comm) |
| Get the type of shared memory arrays to use on this mpi communicator. More...
|
|
void * | sc_shmem_malloc (int package, size_t elem_size, size_t elem_count, sc_MPI_Comm comm) |
| Allocate a shmem array: an array that is redundant on every process. More...
|
|
void | sc_shmem_free (int package, void *array, sc_MPI_Comm comm) |
| Destroy a shmem array created with sc_shmem_alloc() More...
|
|
int | sc_shmem_write_start (void *array, sc_MPI_Comm comm) |
| Start a write window for a shared array. More...
|
|
void | sc_shmem_write_end (void *array, sc_MPI_Comm comm) |
| End a write window for a shared array. More...
|
|
void | sc_shmem_memcpy (void *destarray, void *srcarray, size_t bytes, sc_MPI_Comm comm) |
| Copy a shmem array. More...
|
|
void | sc_shmem_allgather (void *sendbuf, int sendcount, sc_MPI_Datatype sendtype, void *recvbuf, int recvcount, sc_MPI_Datatype recvtype, sc_MPI_Comm comm) |
| Fill a shmem array with an allgather. More...
|
|
void | sc_shmem_prefix (void *sendbuf, void *recvbuf, int count, sc_MPI_Datatype type, sc_MPI_Op op, sc_MPI_Comm comm) |
| Fill a shmem array with an allgather of the prefix op over all processes. More...
|
|
|
const char * | sc_shmem_type_to_string [SC_SHMEM_NUM_TYPES] |
|
sc_shmem_type_t | sc_shmem_default_type |
|
◆ sc_shmem_type_t
Enumerator |
---|
SC_SHMEM_BASIC | use allgathers, then sum to simulate scan
|
SC_SHMEM_PRESCAN | mpi_scan, then allgather
|
◆ sc_shmem_allgather()
Fill a shmem array with an allgather.
- Parameters
-
[in] | sendbuf | the source from this process |
[in] | sendcount | the number of items to allgather |
[in] | sendtype | the type of items to allgather |
[in,out] | recvbuf | the destination shmem array |
[in] | recvcount | the number of items to allgather |
[in] | recvtype | the type of items to allgather |
[in] | comm | the mpi communicator |
◆ sc_shmem_free()
void sc_shmem_free |
( |
int |
package, |
|
|
void * |
array, |
|
|
sc_MPI_Comm |
comm |
|
) |
| |
Destroy a shmem array created with sc_shmem_alloc()
- Parameters
-
[in] | package | package freeing memory |
[in] | array | array to be freed |
[in] | comm | the mpi communicator |
◆ sc_shmem_get_type()
Get the type of shared memory arrays to use on this mpi communicator.
- Parameters
-
[in] | comm | the mpi communicator |
- Returns
- the type of shmem array used on this communicator.
◆ sc_shmem_malloc()
void* sc_shmem_malloc |
( |
int |
package, |
|
|
size_t |
elem_size, |
|
|
size_t |
elem_count, |
|
|
sc_MPI_Comm |
comm |
|
) |
| |
Allocate a shmem array: an array that is redundant on every process.
- Parameters
-
[in] | package | package requesting memory |
[in] | elem_size | the size of each element in the array |
[in] | elem_count | the number of elements in the array |
[in] | comm | the mpi communicator |
- Returns
- a shared memory array
◆ sc_shmem_memcpy()
void sc_shmem_memcpy |
( |
void * |
destarray, |
|
|
void * |
srcarray, |
|
|
size_t |
bytes, |
|
|
sc_MPI_Comm |
comm |
|
) |
| |
Copy a shmem array.
- Parameters
-
[out] | destarray | array to write to |
[in] | srcarray | array to write from |
[in] | bytes | number of bytes to write |
[in] | comm | the mpi communicator |
◆ sc_shmem_prefix()
Fill a shmem array with an allgather of the prefix op over all processes.
The return array will be (0, send0, send0 op send1, send0 op send1 op send2, ...)
Note that the first entry of recvbuf will be set to 0 using memset: if this is not the desired value for the first entry of the array, the user can change it after calling sc_shmem_prefix.
- Parameters
-
[in] | sendbuf | the source from this process |
[in,out] | recvbuf | the destination shmem array |
[in] | count | the number of items to allgather |
[in] | type | the type of items to allgather |
[in] | op | the operation to prefix (e.g., sc_MPI_SUM) |
[in] | comm | the mpi communicator |
◆ sc_shmem_set_type()
Set the type of shared memory arrays to use on this mpi communicator.
- Parameters
-
[in,out] | comm | the mpi communicator |
[in] | type | the type of shmem array behavior. |
◆ sc_shmem_write_end()
void sc_shmem_write_end |
( |
void * |
array, |
|
|
sc_MPI_Comm |
comm |
|
) |
| |
End a write window for a shared array.
- Parameters
-
[in] | array | array that has changed |
[in] | comm | the mpi communicator |
◆ sc_shmem_write_start()
int sc_shmem_write_start |
( |
void * |
array, |
|
|
sc_MPI_Comm |
comm |
|
) |
| |
Start a write window for a shared array.
- Parameters
-
[in] | array | array that will be changed. |
[in] | comm | the mpi communicator |
- Returns
- 1 if I have write access, 0 if my proc should not change the array.