Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sycl/include/CL/sycl/usm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ T *aligned_alloc_device(
size_t Alignment, size_t Count, const device &Dev, const context &Ctxt,
const property_list &PropList = {},
const detail::code_location CodeLoc = detail::code_location::current()) {
return static_cast<T *>(aligned_alloc_device(std::max(Alignment, alignof(T)),
return static_cast<T *>(aligned_alloc_device(max(Alignment, alignof(T)),
Count * sizeof(T), Dev, Ctxt,
PropList, CodeLoc));
}
Expand Down Expand Up @@ -244,7 +244,7 @@ T *aligned_alloc_shared(
size_t Alignment, size_t Count, const device &Dev, const context &Ctxt,
const property_list &PropList = {},
const detail::code_location CodeLoc = detail::code_location::current()) {
return static_cast<T *>(aligned_alloc_shared(std::max(Alignment, alignof(T)),
return static_cast<T *>(aligned_alloc_shared(max(Alignment, alignof(T)),
Count * sizeof(T), Dev, Ctxt,
PropList, CodeLoc));
}
Expand Down Expand Up @@ -281,7 +281,7 @@ T *aligned_alloc(
size_t Alignment, size_t Count, const device &Dev, const context &Ctxt,
usm::alloc Kind, const property_list &PropList = {},
const detail::code_location CodeLoc = detail::code_location::current()) {
return static_cast<T *>(aligned_alloc(std::max(Alignment, alignof(T)),
return static_cast<T *>(aligned_alloc(max(Alignment, alignof(T)),
Count * sizeof(T), Dev, Ctxt, Kind,
PropList, CodeLoc));
}
Expand Down
4 changes: 1 addition & 3 deletions sycl/include/CL/sycl/usm/usm_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ class usm_allocator {
}

private:
constexpr size_t getAlignment() const {
return std::max(alignof(T), Alignment);
}
constexpr size_t getAlignment() const { return max(alignof(T), Alignment); }

template <class U, usm::alloc AllocKindU, size_t AlignmentU>
friend class usm_allocator;
Expand Down