File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 27
27
28
28
#include " dpnp_fptr.hpp"
29
29
#include " dpnp_iface.hpp"
30
+ #include " dpnpc_memory_adapter.hpp"
30
31
#include " queue_sycl.hpp"
31
32
32
33
template <typename _KernelNameSpecialization>
@@ -36,7 +37,8 @@ template <typename _DataType>
36
37
void dpnp_invert_c (void * array1_in, void * result1, size_t size)
37
38
{
38
39
cl::sycl::event event;
39
- _DataType* array1 = reinterpret_cast <_DataType*>(array1_in);
40
+ DPNPC_ptr_adapter<_DataType> input1_ptr (array1_in, size);
41
+ _DataType* array1 = input1_ptr.get_ptr ();
40
42
_DataType* result = reinterpret_cast <_DataType*>(result1);
41
43
42
44
cl::sycl::range<1 > gws (size);
@@ -94,8 +96,10 @@ static void func_map_init_bitwise_1arg_1type(func_map_t& fmap)
94
96
} \
95
97
\
96
98
cl::sycl::event event; \
97
- const _DataType* input1 = reinterpret_cast <const _DataType*>(input1_in); \
98
- const _DataType* input2 = reinterpret_cast <const _DataType*>(input2_in); \
99
+ DPNPC_ptr_adapter<_DataType> input1_ptr (input1_in, input1_size); \
100
+ DPNPC_ptr_adapter<_DataType> input2_ptr (input2_in, input2_size); \
101
+ const _DataType* input1 = input1_ptr.get_ptr (); \
102
+ const _DataType* input2 = input2_ptr.get_ptr (); \
99
103
_DataType* result = reinterpret_cast <_DataType*>(result_out); \
100
104
\
101
105
const size_t gws_size = std::max (input1_size, input2_size); \
You can’t perform that action at this time.
0 commit comments