T-SIMD v31.1.0
A C++ template SIMD library
|
Functions and classes for aligned memory allocation.
Classes | |
class | simd::aligned_allocator< T, ALIGN > |
Aligned allocator. More... | |
Functions | |
void | simd::aligned_free (void *ptr) |
Aligned memory deallocation. | |
void * | simd::aligned_malloc (size_t alignment, size_t size) |
Aligned memory allocation. | |
void * | simd::aligned_malloc (size_t size) |
Aligned memory allocation aligned to NATIVE_SIMD_WIDTH . | |
class simd::aligned_allocator |
Aligned allocator.
This class is an allocator that allocates aligned memory blocks.
This class is meant to be used with std::vector for types that require aligned memory blocks.
T | type of the elements in the memory block |
ALIGN | alignment of the memory block in bytes, default is NATIVE_SIMD_WIDTH |
|
inline |
Aligned memory deallocation.
This function frees a block of memory that was allocated with aligned_malloc().
ptr | pointer to the memory block to be freed |
|
inline |
Aligned memory allocation.
This function allocates a block of memory of size bytes, aligned to the specified alignment.
The allocated memory must be freed with aligned_free().
alignment | alignment of the memory block in bytes |
size | size of the memory block in bytes |
|
inline |
Aligned memory allocation aligned to NATIVE_SIMD_WIDTH
.
This function allocates a block of memory of size bytes, aligned to NATIVE_SIMD_WIDTH
.
The allocated memory must be freed with aligned_free().
size | size of the memory block in bytes |