Skip to content

Commit 7ab929f

Browse files
Minor optimization of using vector::size instead of recomputing it again
1 parent 46d8a8d commit 7ab929f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dpctl/tensor/libtensor/source/tensor_py.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,9 @@ copy_usm_ndarray_into_usm_ndarray(dpctl::tensor::usm_ndarray src,
707707
shp_host_shape_strides->begin() + nd);
708708
}
709709

710-
sycl::event copy_shape_ev = exec_q.copy<py::ssize_t>(
711-
shp_host_shape_strides->data(), shape_strides, 3 * nd);
710+
sycl::event copy_shape_ev =
711+
exec_q.copy<py::ssize_t>(shp_host_shape_strides->data(), shape_strides,
712+
shp_host_shape_strides->size());
712713

713714
exec_q.submit([&](sycl::handler &cgh) {
714715
cgh.depends_on(copy_shape_ev);

0 commit comments

Comments
 (0)