Skip to content

Commit 51e0fbb

Browse files
Initialize packed shape+strides data with zeros
1 parent fc46303 commit 51e0fbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpctl/tensor/libtensor/source/integer_advanced_indexing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ std::vector<sycl::event> _populate_packed_shapes_strides_for_indexing(
9797

9898
usm_host_allocatorT allocator(exec_q);
9999
std::shared_ptr<shT> packed_host_shapes_strides_shp =
100-
std::make_shared<shT>(3 * orthog_sh_elems, allocator);
100+
std::make_shared<shT>(3 * orthog_sh_elems, 0, allocator);
101101

102102
std::shared_ptr<shT> packed_host_axes_shapes_strides_shp =
103-
std::make_shared<shT>(2 * k + along_sh_elems, allocator);
103+
std::make_shared<shT>(2 * k + along_sh_elems, 0, allocator);
104104

105105
if (inp_nd > 0) {
106106
std::copy(inp_shape, inp_shape + axis_start,

0 commit comments

Comments
 (0)