Skip to content

Commit a44fb2f

Browse files
committed
Minor comment on how memory is allocated for scalar in py_divide_by_scalar
1 parent 92367ad commit a44fb2f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dpctl/tensor/libtensor/source/elementwise_functions/true_divide.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ py_divide_by_scalar(const dpctl::tensor::usm_ndarray &src,
306306
alignas(double) char scalar_alloc[sizeof(double)] = {0};
307307

308308
divide_by_scalar_fn_ptr_t fn;
309+
// placement new into stack memory means no call to delete is necessary
309310
switch (src_typeid) {
310311
case float16_typeid:
311312
{

0 commit comments

Comments
 (0)