Files | |
| file | aligned.hpp |
| file | prefetch.hpp |
Functions | |
| bool | rmm::is_pow2 (std::size_t value) noexcept |
Returns whether or not value is a power of 2. More... | |
| bool | rmm::is_supported_alignment (std::size_t alignment) noexcept |
Returns whether or not alignment is a valid memory alignment. More... | |
| std::size_t | rmm::align_up (std::size_t value, std::size_t alignment) noexcept |
| Align up to nearest multiple of specified power of 2. More... | |
| std::size_t | rmm::align_down (std::size_t value, std::size_t alignment) noexcept |
| Align down to the nearest multiple of specified power of 2. More... | |
| bool | rmm::is_aligned (std::size_t value, std::size_t alignment) noexcept |
| Checks whether a value is aligned to a multiple of a specified power of 2. More... | |
| bool | rmm::is_pointer_aligned (void *ptr, std::size_t alignment=CUDA_ALLOCATION_ALIGNMENT) noexcept |
Checks whether the provided pointer is aligned to a specified alignment. More... | |
| void | rmm::prefetch (void const *ptr, std::size_t size, rmm::cuda_device_id device, rmm::cuda_stream_view stream) |
| Prefetch memory to the specified device on the specified stream. More... | |
| template<typename T > | |
| void | rmm::prefetch (cuda::std::span< T const > data, rmm::cuda_device_id device, rmm::cuda_stream_view stream) |
| Prefetch a span of memory to the specified device on the specified stream. More... | |
Variables | |
| static constexpr std::size_t | rmm::RMM_DEFAULT_HOST_ALIGNMENT {alignof(std::max_align_t)} |
| Default alignment used for host memory allocated by RMM. | |
| static constexpr std::size_t | rmm::CUDA_ALLOCATION_ALIGNMENT {256} |
| Default alignment used for CUDA memory allocation. | |
|
noexcept |
Align down to the nearest multiple of specified power of 2.
| [in] | value | value to align |
| [in] | alignment | amount, in bytes, must be a power of 2 |
|
noexcept |
Align up to nearest multiple of specified power of 2.
| [in] | value | value to align |
| [in] | alignment | amount, in bytes, must be a power of 2 |
|
noexcept |
Checks whether a value is aligned to a multiple of a specified power of 2.
| [in] | value | value to check for alignment |
| [in] | alignment | amount, in bytes, must be a power of 2 |
|
noexcept |
Checks whether the provided pointer is aligned to a specified alignment.
| [in] | ptr | pointer to check for alignment |
| [in] | alignment | required alignment in bytes, must be a power of 2 |
|
noexcept |
Returns whether or not value is a power of 2.
| [in] | value | value to check. |
|
noexcept |
Returns whether or not alignment is a valid memory alignment.
| [in] | alignment | to check |
| void rmm::prefetch | ( | cuda::std::span< T const > | data, |
| rmm::cuda_device_id | device, | ||
| rmm::cuda_stream_view | stream | ||
| ) |
Prefetch a span of memory to the specified device on the specified stream.
This function is a no-op if the buffer is not backed by CUDA managed memory.
| rmm::cuda_error | if the prefetch fails. |
| data | The span to prefetch |
| device | The device to prefetch to |
| stream | The stream to use for the prefetch |
| void rmm::prefetch | ( | void const * | ptr, |
| std::size_t | size, | ||
| rmm::cuda_device_id | device, | ||
| rmm::cuda_stream_view | stream | ||
| ) |
Prefetch memory to the specified device on the specified stream.
This function is a no-op if the pointer is not to CUDA managed memory.
| rmm::cuda_error | if the prefetch fails. |
| ptr | The pointer to the memory to prefetch |
| size | The number of bytes to prefetch |
| device | The device to prefetch to |
| stream | The stream to use for the prefetch |