[llvm] [libsycl] USM Aligned allocation functions (PR #213468)
Sergey Semenov via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 06:06:32 PDT 2026
================
@@ -31,18 +32,34 @@ void *malloc_device(std::size_t numBytes, const queue &syclQueue,
syclQueue.get_context(), propList);
}
+void *aligned_alloc_device(size_t alignment, size_t numBytes,
+ const device &syclDevice, const context &syclContext,
+ const property_list &propList) {
+ return aligned_alloc(alignment, numBytes, syclDevice, syclContext,
+ usm::alloc::device, propList);
+}
+
+void *aligned_alloc_device(size_t alignment, size_t numBytes,
+ const queue &syclQueue,
+ const property_list &propList) {
+ return aligned_alloc_device(alignment, numBytes, syclQueue.get_device(),
+ syclQueue.get_context(), propList);
+}
+
// SYCL 2020 4.8.3.3. Host allocation functions.
void *malloc_host(std::size_t numBytes, const context &syclContext,
----------------
sergey-semenov wrote:
Should be applied to the other allocation types as well.
https://github.com/llvm/llvm-project/pull/213468
More information about the llvm-commits
mailing list