Skip to content

Commit 80d9fca

Browse files
fix: update fmap for random module (#103)
* removed DPNP_FN_RANDOM fromm enum * using DPNP_FN_UNIFORM instead of DPNP_FN_RANDOM
1 parent ff875ab commit 80d9fca

File tree

4 files changed

+1
-5
lines changed

4 files changed

+1
-5
lines changed

dpnp/backend.pxd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ cdef extern from "backend/backend_iface_fptr.hpp" namespace "DPNPFuncName": # n
7575
DPNP_FN_PROD
7676
DPNP_FN_UNIFORM
7777
DPNP_FN_RADIANS
78-
DPNP_FN_RANDOM
7978
DPNP_FN_RECIP
8079
DPNP_FN_SIGN
8180
DPNP_FN_SIN

dpnp/backend/backend_iface_fptr.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,6 @@ static func_map_t func_map_init()
572572
fmap[DPNPFuncName::DPNP_FN_RADIANS][eft_FLT][eft_FLT] = {eft_FLT, (void*)custom_elemwise_radians_c<float, float>};
573573
fmap[DPNPFuncName::DPNP_FN_RADIANS][eft_DBL][eft_DBL] = {eft_DBL, (void*)custom_elemwise_radians_c<double, double>};
574574

575-
fmap[DPNPFuncName::DPNP_FN_RANDOM][eft_DBL][eft_DBL] = {eft_DBL, (void*)mkl_rng_uniform<double>};
576-
577575
fmap[DPNPFuncName::DPNP_FN_RECIP][eft_FLT][eft_FLT] = {eft_FLT, (void*)custom_elemwise_recip_c<float>};
578576
fmap[DPNPFuncName::DPNP_FN_RECIP][eft_DBL][eft_DBL] = {eft_DBL, (void*)custom_elemwise_recip_c<double>};
579577

dpnp/backend/backend_iface_fptr.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ enum class DPNPFuncName : size_t
104104
DPNP_FN_PROD, /**< Used in numpy.prod() implementation */
105105
DPNP_FN_UNIFORM, /**< Used in numpy.random.uniform() implementation */
106106
DPNP_FN_RADIANS, /**< Used in numpy.radians() implementation */
107-
DPNP_FN_RANDOM, /**< Used in numpy.random.random() implementation */
108107
DPNP_FN_RECIP, /**< Used in numpy.recip() implementation */
109108
DPNP_FN_SIGN, /**< Used in numpy.sign() implementation */
110109
DPNP_FN_SIN, /**< Used in numpy.sin() implementation */

dpnp/random/_random.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ cpdef dparray dpnp_random(dims):
8787
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(numpy.float64)
8888

8989
# get the FPTR data structure
90-
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RANDOM, param1_type, param1_type)
90+
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_UNIFORM, param1_type, param1_type)
9191

9292
result_type = dpnp_DPNPFuncType_to_dtype( < size_t > kernel_data.return_type)
9393
# ceate result array with type given by FPTR data

0 commit comments

Comments
 (0)