The Kokkos class that manages memory pool for dynamically-sized temporary arrays in Kokkos parallel functions.
More...
#include <KokkosMemoryPool.h>
|
| | MemoryPool (dof_id_type size, unsigned int ways) |
| | Constructor.
|
| |
| template<typename T > |
| KOKKOS_FUNCTION MemoryChunk< T > | allocate (dof_id_type idx, unsigned int size) const |
| | Allocate a memory chunk The returned object should be alive while the memory chunk is used.
|
| |
The Kokkos class that manages memory pool for dynamically-sized temporary arrays in Kokkos parallel functions.
Definition at line 75 of file KokkosMemoryPool.h.
◆ MemoryPool()
| Moose::Kokkos::MemoryPool::MemoryPool |
( |
dof_id_type |
size, |
|
|
unsigned int |
ways |
|
) |
| |
Constructor.
- Parameters
-
| size | The memory pool size in the number of bytes |
| ways | The number of parallel ways |
◆ allocate()
template<typename T >
| KOKKOS_FUNCTION MemoryChunk< T > Moose::Kokkos::MemoryPool::allocate |
( |
dof_id_type |
idx, |
|
|
unsigned int |
size |
|
) |
| const |
|
inline |
Allocate a memory chunk The returned object should be alive while the memory chunk is used.
- Parameters
-
| indx | The index to select pool |
| size | The memory chunk size in the number of elements |
- Returns
- The memory chunk object containing the pointer to the memory chunk
Definition at line 93 of file KokkosMemoryPool.h.
94 {
96
97 return MemoryChunk<T>(
_pools[pool], size *
sizeof(T));
98 }
KOKKOS_FUNCTION index_type size() const
Get the total array size.
Array<::Kokkos::MemoryPool< MemSpace > > _pools
Kokkos memory pools.
Referenced by Moose::Kokkos::MemoryChunk< T >::MemoryChunk().
◆ _pools
| Array<::Kokkos::MemoryPool<MemSpace> > Moose::Kokkos::MemoryPool::_pools |
|
private |
The documentation for this class was generated from the following file: