All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Functions | Variables
aligned.hpp File Reference
#include <rmm/detail/export.hpp>
#include <cassert>
#include <cstddef>
#include <cstdint>
Include dependency graph for aligned.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

constexpr bool rmm::is_pow2 (std::size_t value) noexcept
 Returns whether or not value is a power of 2. More...
 
constexpr bool rmm::is_supported_alignment (std::size_t alignment) noexcept
 Returns whether or not alignment is a valid memory alignment. More...
 
constexpr 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...
 
constexpr 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...
 
constexpr 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...
 

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.