/* * Copyright (C) 2024 Intel Corporation. All rights reserved. * Authors: * Gustavo A Espinoza * * * For conditions of distribution and use, see copyright notice in zlib.h */ #ifndef QATZPP_MEMORY_HPP #define QATZPP_MEMORY_HPP #include #include namespace qat { void *Alloc(size_t sizeBytes, uint32_t numa_node); template T *AllocBlock(int32_t numa_node) { return static_cast(Alloc(sizeof(T), numa_node)); } template T *AllocBlockArray(size_t count, int32_t numa_node) { if (count <= 0) { return nullptr; } return static_cast(Alloc(sizeof(T) * count, numa_node)); } void Free(void *ptr); } #endif