Functions for memory management. More...
Functions | |
SIMD_API void * | SimdAllocate (size_t size, size_t align) |
Allocates aligned memory block. More... | |
SIMD_API void | SimdFree (void *ptr) |
Frees aligned memory block. More... | |
SIMD_API size_t | SimdAlign (size_t size, size_t align) |
Gets aligned size. More... | |
SIMD_API size_t | SimdAlignment () |
Gets alignment required for the most productive work of the Simd Library. More... | |
SIMD_API void | SimdRelease (void *context) |
Releases context created with using of Simd Library API. More... | |
Detailed Description
Functions for memory management.
Function Documentation
◆ SimdAllocate()
void * SimdAllocate | ( | size_t | size, |
size_t | align | ||
) |
Allocates aligned memory block.
- Note
- The memory allocated by this function is must be deleted by function SimdFree.
- Parameters
-
[in] size - a size of memory block. [in] align - a required alignment of memory block.
- Returns
- a pointer to allocated memory.
◆ SimdFree()
void SimdFree | ( | void * | ptr | ) |
Frees aligned memory block.
- Note
- This function frees a memory allocated by function SimdAllocate.
- Parameters
-
[in] ptr - a pointer to the memory to be deleted.
◆ SimdAlign()
size_t SimdAlign | ( | size_t | size, |
size_t | align | ||
) |
Gets aligned size.
- Parameters
-
[in] size - an original size. [in] align - a required alignment.
- Returns
- an aligned size.
◆ SimdAlignment()
size_t SimdAlignment | ( | ) |
Gets alignment required for the most productive work of the Simd Library.
- Returns
- a required alignment.
◆ SimdRelease()
void SimdRelease | ( | void * | context | ) |
Releases context created with using of Simd Library API.
- Note
- This function releases a context created by functions SimdDetectionLoadA and SimdDetectionInit.
- Parameters
-
[in] context - a context to be released.