Skip to content

Commit 6673b80

Browse files
committed
Obtain a proper result type on device without fp64 (#1429)
* Obtain a proper result type on device without fp64 * remove excess defenitions
1 parent b6cba98 commit 6673b80

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

dpnp/dpnp_algo/dpnp_algo.pxd

-2
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,6 @@ cdef extern from "dpnp_iface_fptr.hpp":
370370
struct DPNPFuncData:
371371
DPNPFuncType return_type
372372
void * ptr
373-
DPNPFuncType return_type_no_fp64
374-
void *ptr_no_fp64
375373

376374
DPNPFuncData get_dpnp_function_ptr(DPNPFuncName name, DPNPFuncType first_type, DPNPFuncType second_type) except +
377375

dpnp/dpnp_algo/dpnp_algo.pyx

+2-8
Original file line numberDiff line numberDiff line change
@@ -497,14 +497,8 @@ cdef utils.dpnp_descriptor call_fptr_2in_1out_strides(DPNPFuncName fptr_name,
497497
result_sycl_device, result_usm_type, result_sycl_queue = utils.get_common_usm_allocation(x1_obj, x2_obj)
498498

499499
# get FPTR function and return type
500-
cdef fptr_2in_1out_strides_t func = NULL
501-
cdef DPNPFuncType return_type = DPNP_FT_NONE
502-
if result_sycl_device.has_aspect_fp64:
503-
return_type = kernel_data.return_type
504-
func = < fptr_2in_1out_strides_t > kernel_data.ptr
505-
else:
506-
return_type = kernel_data.return_type_no_fp64
507-
func = < fptr_2in_1out_strides_t > kernel_data.ptr_no_fp64
500+
cdef fptr_2in_1out_strides_t func = < fptr_2in_1out_strides_t > kernel_data.ptr
501+
cdef DPNPFuncType return_type = kernel_data.return_type
508502

509503
# check 'out' parameter data
510504
if out is not None:

0 commit comments

Comments
 (0)