[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
================
@@ -84,15 +135,20 @@ static aspect getAspectByAllocationKind(usm::alloc kind) {
}
}
-void *malloc(std::size_t numBytes, const device &syclDevice,
- const context &syclContext, usm::alloc kind,
- const property_list &propList) {
+void *aligned_alloc(std::size_t alignment, std::size_t numBytes,
+ const device &syclDevice, const context &syclContext,
+ usm::alloc kind, const property_list &propList) {
+
+ if (alignment == 0 || !detail::isPowerOf2(alignment))
----------------
sergey-semenov wrote:
```suggestion
if (!detail::isPowerOf2(alignment))
```
Assuming the comment for `detail::isPowerOf2()` is applied.
https://github.com/llvm/llvm-project/pull/213468
More information about the llvm-commits
mailing list