Skip to content

Commit 4026ca2

Browse files
authored
ABSOLUTE support output as ndarray (#906)
1 parent a28e86a commit 4026ca2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dpnp/backend/kernels/dpnp_krnl_mathematical.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ void dpnp_elemwise_absolute_c(const void* input1_in, void* result1, size_t size)
9191
cl::sycl::event event;
9292
DPNPC_ptr_adapter<_DataType> input1_ptr(input1_in, size);
9393
_DataType* array1 = input1_ptr.get_ptr();
94-
_DataType* result = reinterpret_cast<_DataType*>(result1);
94+
DPNPC_ptr_adapter<_DataType> result1_ptr(result1, size, false, true);
95+
_DataType* result = result1_ptr.get_ptr();
9596

9697
if constexpr (std::is_same<_DataType, double>::value || std::is_same<_DataType, float>::value)
9798
{

0 commit comments

Comments
 (0)