@@ -157,9 +157,8 @@ T *malloc_device(
157
157
size_t Count, const device &Dev, const context &Ctxt,
158
158
const property_list &PropList = {},
159
159
const detail::code_location CodeLoc = detail::code_location::current()) {
160
- return static_cast <T *>(
161
- aligned_alloc_device (std::max (alignof (T), alignof (std::max_align_t )),
162
- Count * sizeof (T), Dev, Ctxt, PropList, CodeLoc));
160
+ return static_cast <T *>(aligned_alloc_device (alignof (T), Count * sizeof (T),
161
+ Dev, Ctxt, PropList, CodeLoc));
163
162
}
164
163
165
164
template <typename T>
@@ -193,9 +192,8 @@ template <typename T>
193
192
T *malloc_host (
194
193
size_t Count, const context &Ctxt, const property_list &PropList = {},
195
194
const detail::code_location CodeLoc = detail::code_location::current()) {
196
- return static_cast <T *>(
197
- aligned_alloc_host (std::max (alignof (T), alignof (std::max_align_t )),
198
- Count * sizeof (T), Ctxt, PropList, CodeLoc));
195
+ return static_cast <T *>(aligned_alloc_host (alignof (T), Count * sizeof (T),
196
+ Ctxt, PropList, CodeLoc));
199
197
}
200
198
201
199
template <typename T>
@@ -210,9 +208,8 @@ T *malloc_shared(
210
208
size_t Count, const device &Dev, const context &Ctxt,
211
209
const property_list &PropList = {},
212
210
const detail::code_location CodeLoc = detail::code_location::current()) {
213
- return static_cast <T *>(
214
- aligned_alloc_shared (std::max (alignof (T), alignof (std::max_align_t )),
215
- Count * sizeof (T), Dev, Ctxt, PropList, CodeLoc));
211
+ return static_cast <T *>(aligned_alloc_shared (alignof (T), Count * sizeof (T),
212
+ Dev, Ctxt, PropList, CodeLoc));
216
213
}
217
214
218
215
template <typename T>
@@ -266,9 +263,8 @@ T *malloc(
266
263
size_t Count, const device &Dev, const context &Ctxt, usm::alloc Kind,
267
264
const property_list &PropList = {},
268
265
const detail::code_location CodeLoc = detail::code_location::current()) {
269
- return static_cast <T *>(
270
- aligned_alloc (std::max (alignof (T), alignof (std::max_align_t )),
271
- Count * sizeof (T), Dev, Ctxt, Kind, PropList, CodeLoc));
266
+ return static_cast <T *>(aligned_alloc (alignof (T), Count * sizeof (T), Dev,
267
+ Ctxt, Kind, PropList, CodeLoc));
272
268
}
273
269
274
270
template <typename T>
0 commit comments