Skip to content

Commit 7aea574

Browse files
using ptr_adapter in dpnp_fill_diagonal_c (#949)
1 parent 51e25ae commit 7aea574

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dpnp/backend/kernels/dpnp_krnl_indexing.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,9 @@ void dpnp_fill_diagonal_c(void* array1_in, void* val_in, size_t* shape, const si
214214
}
215215

216216
DPNPC_ptr_adapter<_DataType> result_ptr(array1_in, result_size, true, true);
217+
DPNPC_ptr_adapter<_DataType> val_ptr(val_in, 1, true);
217218
_DataType* array_1 = result_ptr.get_ptr();
218-
_DataType* val_arr = reinterpret_cast<_DataType*>(val_in);
219+
_DataType* val_arr = val_ptr.get_ptr();
219220

220221
size_t min_shape = shape[0];
221222
for (size_t i = 0; i < ndim; ++i)

0 commit comments

Comments
 (0)