@@ -35,7 +35,7 @@ template <typename _KernelNameSpecialization>
35
35
class custom_elemwise_absolute_c_kernel ;
36
36
37
37
template <typename _DataType>
38
- void custom_elemwise_absolute_c (void * array1_in, const std::vector< long >& input_shape, void * result1, size_t size)
38
+ void custom_elemwise_absolute_c (void * array1_in, void * result1, size_t size)
39
39
{
40
40
if (!size)
41
41
{
@@ -46,10 +46,6 @@ void custom_elemwise_absolute_c(void* array1_in, const std::vector<long>& input_
46
46
_DataType* array1 = reinterpret_cast <_DataType*>(array1_in);
47
47
_DataType* result = reinterpret_cast <_DataType*>(result1);
48
48
49
- const size_t input_shape_size = input_shape.size ();
50
- size_t * input_offset_shape = reinterpret_cast <size_t *>(dpnp_memory_alloc_c (input_shape_size * sizeof (long )));
51
- size_t * result_offset_shape = reinterpret_cast <size_t *>(dpnp_memory_alloc_c (input_shape_size * sizeof (long )));
52
-
53
49
if constexpr (std::is_same<_DataType, double >::value || std::is_same<_DataType, float >::value)
54
50
{
55
51
// https://docs.oneapi.com/versions/latest/onemkl/abs.html
@@ -79,20 +75,17 @@ void custom_elemwise_absolute_c(void* array1_in, const std::vector<long>& input_
79
75
}
80
76
81
77
event.wait ();
82
-
83
- free (input_offset_shape, DPNP_QUEUE);
84
- free (result_offset_shape, DPNP_QUEUE);
85
78
}
86
79
87
80
template void custom_elemwise_absolute_c<double >(void * array1_in,
88
- const std::vector<long >& input_shape,
89
81
void * result1,
90
82
size_t size);
91
83
template void custom_elemwise_absolute_c<float >(void * array1_in,
92
- const std::vector<long >& input_shape,
93
84
void * result1,
94
85
size_t size);
95
- template void
96
- custom_elemwise_absolute_c<long >(void * array1_in, const std::vector<long >& input_shape, void * result1, size_t size);
97
- template void
98
- custom_elemwise_absolute_c<int >(void * array1_in, const std::vector<long >& input_shape, void * result1, size_t size);
86
+ template void custom_elemwise_absolute_c<long >(void * array1_in,
87
+ void * result1,
88
+ size_t size);
89
+ template void custom_elemwise_absolute_c<int >(void * array1_in,
90
+ void * result1,
91
+ size_t size);
0 commit comments