Skip to content

Commit 281fc21

Browse files
Remove dpnp_init_val
1 parent 374fc96 commit 281fc21

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

dpnp/dpnp_algo/dpnp_algo.pxd

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ cdef extern from "dpnp_iface_fptr.hpp" namespace "DPNPFuncName": # need this na
128128
DPNP_FN_HYPOT_EXT
129129
DPNP_FN_IDENTITY
130130
DPNP_FN_IDENTITY_EXT
131-
DPNP_FN_INITVAL
132-
DPNP_FN_INITVAL_EXT
133131
DPNP_FN_INV
134132
DPNP_FN_INV_EXT
135133
DPNP_FN_KRON
@@ -405,7 +403,6 @@ cpdef dpnp_descriptor dpnp_matmul(dpnp_descriptor in_array1, dpnp_descriptor in_
405403
"""
406404
Array creation routines
407405
"""
408-
cpdef dpnp_descriptor dpnp_init_val(shape, dtype, value)
409406
cpdef dpnp_descriptor dpnp_copy(dpnp_descriptor x1)
410407

411408
"""

dpnp/dpnp_algo/dpnp_algo.pyx

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ import numpy
5656
__all__ = [
5757
"dpnp_astype",
5858
"dpnp_flatten",
59-
"dpnp_init_val",
6059
"dpnp_queue_initialize",
6160
]
6261

@@ -85,9 +84,6 @@ ctypedef c_dpctl.DPCTLSyclEventRef(*fptr_dpnp_flatten_t)(c_dpctl.DPCTLSyclQueueR
8584
const shape_elem_type * , const shape_elem_type * ,
8685
const long * ,
8786
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)
9187

9288

9389
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):
168164
return result
169165

170166

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-
204167
cpdef dpnp_queue_initialize():
205168
"""
206169
Initialize SYCL queue which will be used for any library operations.

0 commit comments

Comments
 (0)