![]() |
Block-Structured AMR Software Framework
|
Configuration options for constructing an Arena. More...
#include <AMReX_Arena.H>
Public Member Functions | |
| ArenaInfo & | SetReleaseThreshold (Long rt) noexcept |
| Set the usage threshold that triggers release of cached unused blocks before growing. | |
| ArenaInfo & | SetDeviceMemory () noexcept |
| Configure the arena to use non-managed GPU device memory. | |
| ArenaInfo & | SetReadOnly () noexcept |
| Advise the runtime that the managed memory will be read-only on the device. | |
| ArenaInfo & | SetPreferred () noexcept |
| Advise the runtime to prefer device residence for the managed memory. | |
| ArenaInfo & | SetHostAlloc () noexcept |
| Configure the arena to use host-pinned memory. | |
| ArenaInfo & | SetCpuMemory () noexcept |
| Configure the arena to use CPU (host) memory. | |
| ArenaInfo & | SetDefragmentation (bool b) noexcept |
| Enable or disable defragmentation in the arena. | |
Public Attributes | |
| Long | release_threshold = std::numeric_limits<Long>::max() |
| When usage would exceed this, cached unused blocks are released first. | |
| bool | use_cpu_memory = false |
| Allocate CPU (host) memory instead of GPU memory. | |
| bool | device_use_managed_memory = true |
| Use CUDA/HIP managed (unified) memory for GPU allocations. | |
| bool | device_set_readonly = false |
| Advise the runtime that the managed memory is read-only on the device. | |
| bool | device_set_preferred = false |
| Advise the runtime to prefer the device for managed memory. | |
| bool | device_use_hostalloc = false |
| Use host-pinned memory (cudaMallocHost/hipHostMalloc). | |
| bool | defragmentation = false |
Configuration options for constructing an Arena.
Uses a builder pattern: each setter returns *this to allow chaining.
|
inlinenoexcept |
Configure the arena to use CPU (host) memory.
|
inlinenoexcept |
Enable or disable defragmentation in the arena.
|
inlinenoexcept |
Configure the arena to use non-managed GPU device memory.
|
inlinenoexcept |
Configure the arena to use host-pinned memory.
|
inlinenoexcept |
Advise the runtime to prefer device residence for the managed memory.
|
inlinenoexcept |
Advise the runtime that the managed memory will be read-only on the device.
Set the usage threshold that triggers release of cached unused blocks before growing.
| bool amrex::ArenaInfo::defragmentation = false |
Enable defragmentation in the arena.
| bool amrex::ArenaInfo::device_set_preferred = false |
Advise the runtime to prefer the device for managed memory.
| bool amrex::ArenaInfo::device_set_readonly = false |
Advise the runtime that the managed memory is read-only on the device.
| bool amrex::ArenaInfo::device_use_hostalloc = false |
Use host-pinned memory (cudaMallocHost/hipHostMalloc).
| bool amrex::ArenaInfo::device_use_managed_memory = true |
Use CUDA/HIP managed (unified) memory for GPU allocations.
When usage would exceed this, cached unused blocks are released first.
| bool amrex::ArenaInfo::use_cpu_memory = false |
Allocate CPU (host) memory instead of GPU memory.