@@ -56,7 +56,6 @@ import numpy
56
56
__all__ = [
57
57
" dpnp_astype" ,
58
58
" dpnp_flatten" ,
59
- " dpnp_init_val" ,
60
59
" dpnp_queue_initialize" ,
61
60
]
62
61
@@ -85,9 +84,6 @@ ctypedef c_dpctl.DPCTLSyclEventRef(*fptr_dpnp_flatten_t)(c_dpctl.DPCTLSyclQueueR
85
84
const shape_elem_type * , const shape_elem_type * ,
86
85
const long * ,
87
86
const c_dpctl.DPCTLEventVectorRef)
88
- ctypedef c_dpctl.DPCTLSyclEventRef(* fptr_dpnp_initval_t)(c_dpctl.DPCTLSyclQueueRef,
89
- void * , void * , size_t,
90
- const c_dpctl.DPCTLEventVectorRef)
91
87
92
88
93
89
cpdef utils.dpnp_descriptor dpnp_astype(utils.dpnp_descriptor x1, dtype):
@@ -168,39 +164,6 @@ cpdef utils.dpnp_descriptor dpnp_flatten(utils.dpnp_descriptor x1):
168
164
return result
169
165
170
166
171
- cpdef utils.dpnp_descriptor dpnp_init_val(shape, dtype, value):
172
- """
173
- same as dpnp_full(). TODO remove code duplication
174
- """
175
- cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(dtype)
176
-
177
- cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_INITVAL_EXT, param1_type, param1_type)
178
-
179
- cdef utils.dpnp_descriptor result = utils_py.create_output_descriptor_py(shape, dtype, None )
180
-
181
- result_obj = result.get_array()
182
-
183
- # TODO: find better way to pass single value with type conversion
184
- cdef utils.dpnp_descriptor val_arr = utils_py.create_output_descriptor_py((1 , ),
185
- dtype,
186
- None ,
187
- device = result_obj.sycl_device,
188
- usm_type = result_obj.usm_type,
189
- sycl_queue = result_obj.sycl_queue)
190
- val_arr.get_pyobj()[0 ] = value
191
-
192
- cdef c_dpctl.SyclQueue q = < c_dpctl.SyclQueue> result_obj.sycl_queue
193
- cdef c_dpctl.DPCTLSyclQueueRef q_ref = q.get_queue_ref()
194
-
195
- cdef fptr_dpnp_initval_t func = < fptr_dpnp_initval_t > kernel_data.ptr
196
- cdef c_dpctl.DPCTLSyclEventRef event_ref = func(q_ref, result.get_data(), val_arr.get_data(), result.size, NULL )
197
-
198
- with nogil: c_dpctl.DPCTLEvent_WaitAndThrow(event_ref)
199
- c_dpctl.DPCTLEvent_Delete(event_ref)
200
-
201
- return result
202
-
203
-
204
167
cpdef dpnp_queue_initialize():
205
168
"""
206
169
Initialize SYCL queue which will be used for any library operations.
0 commit comments