Function Pennylane::Util::alignedAlloc¶
Defined in File Memory.hpp
Function Documentation¶
-
inline auto Pennylane::Util::alignedAlloc(uint32_t alignment, size_t bytes, bool zero_init = false) -> void*¶
Custom aligned allocate function.
Note that alignment must be larger than max_align_t. Otherwise, the behavior is undefined.
- Parameters
alignment – Alignment value we want for the data pointer
bytes – Number of bytes to allocate
- Returns
Pointer to the allocated memory
api/function_Memory_8hpp_1a274863495ba2e438e85371774b7bcab3
Download Python script
Download Notebook
View on GitHub