Skip to content

Update dpnp.linalg.eig/eigvals #1780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion dpnp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,4 @@ add_subdirectory(backend/extensions/sycl_ext)
add_subdirectory(dpnp_algo)
add_subdirectory(dpnp_utils)
add_subdirectory(fft)
add_subdirectory(linalg)
add_subdirectory(random)
4 changes: 0 additions & 4 deletions dpnp/backend/include/dpnp_iface_fptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,7 @@ enum class DPNPFuncName : size_t
DPNP_FN_EDIFF1D_EXT, /**< Used in numpy.ediff1d() impl, requires extra
parameters */
DPNP_FN_EIG, /**< Used in numpy.linalg.eig() impl */
DPNP_FN_EIG_EXT, /**< Used in numpy.linalg.eig() impl, requires extra
parameters */
DPNP_FN_EIGVALS, /**< Used in numpy.linalg.eigvals() impl */
DPNP_FN_EIGVALS_EXT, /**< Used in numpy.linalg.eigvals() impl, requires
extra parameters */
DPNP_FN_ERF, /**< Used in scipy.special.erf impl */
DPNP_FN_ERF_EXT, /**< Used in scipy.special.erf impl, requires extra
parameters */
Expand Down
59 changes: 0 additions & 59 deletions dpnp/backend/kernels/dpnp_krnl_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,15 +630,6 @@ template <typename _DataType, typename _ResultType>
void (*dpnp_eig_default_c)(const void *, void *, void *, size_t) =
dpnp_eig_c<_DataType, _ResultType>;

template <typename _DataType, typename _ResultType>
DPCTLSyclEventRef (*dpnp_eig_ext_c)(DPCTLSyclQueueRef,
const void *,
void *,
void *,
size_t,
const DPCTLEventVectorRef) =
dpnp_eig_c<_DataType, _ResultType>;

template <typename _DataType, typename _ResultType>
DPCTLSyclEventRef dpnp_eigvals_c(DPCTLSyclQueueRef q_ref,
const void *array_in,
Expand Down Expand Up @@ -724,14 +715,6 @@ void (*dpnp_eigvals_default_c)(const void *,
void *,
size_t) = dpnp_eigvals_c<_DataType, _ResultType>;

template <typename _DataType, typename _ResultType>
DPCTLSyclEventRef (*dpnp_eigvals_ext_c)(DPCTLSyclQueueRef,
const void *,
void *,
size_t,
const DPCTLEventVectorRef) =
dpnp_eigvals_c<_DataType, _ResultType>;

template <typename _DataType>
class dpnp_initval_c_kernel;

Expand Down Expand Up @@ -1083,27 +1066,6 @@ void func_map_init_linalg(func_map_t &fmap)
fmap[DPNPFuncName::DPNP_FN_EIG][eft_DBL][eft_DBL] = {
eft_DBL, (void *)dpnp_eig_default_c<double, double>};

fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_INT][eft_INT] = {
get_default_floating_type(),
(void *)dpnp_eig_ext_c<
int32_t, func_type_map_t::find_type<get_default_floating_type()>>,
get_default_floating_type<std::false_type>(),
(void *)dpnp_eig_ext_c<
int32_t, func_type_map_t::find_type<
get_default_floating_type<std::false_type>()>>};
fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_LNG][eft_LNG] = {
get_default_floating_type(),
(void *)dpnp_eig_ext_c<
int64_t, func_type_map_t::find_type<get_default_floating_type()>>,
get_default_floating_type<std::false_type>(),
(void *)dpnp_eig_ext_c<
int64_t, func_type_map_t::find_type<
get_default_floating_type<std::false_type>()>>};
fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_FLT][eft_FLT] = {
eft_FLT, (void *)dpnp_eig_ext_c<float, float>};
fmap[DPNPFuncName::DPNP_FN_EIG_EXT][eft_DBL][eft_DBL] = {
eft_DBL, (void *)dpnp_eig_ext_c<double, double>};

fmap[DPNPFuncName::DPNP_FN_EIGVALS][eft_INT][eft_INT] = {
eft_DBL, (void *)dpnp_eigvals_default_c<int32_t, double>};
fmap[DPNPFuncName::DPNP_FN_EIGVALS][eft_LNG][eft_LNG] = {
Expand All @@ -1113,27 +1075,6 @@ void func_map_init_linalg(func_map_t &fmap)
fmap[DPNPFuncName::DPNP_FN_EIGVALS][eft_DBL][eft_DBL] = {
eft_DBL, (void *)dpnp_eigvals_default_c<double, double>};

fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_INT][eft_INT] = {
get_default_floating_type(),
(void *)dpnp_eigvals_ext_c<
int32_t, func_type_map_t::find_type<get_default_floating_type()>>,
get_default_floating_type<std::false_type>(),
(void *)dpnp_eigvals_ext_c<
int32_t, func_type_map_t::find_type<
get_default_floating_type<std::false_type>()>>};
fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_LNG][eft_LNG] = {
get_default_floating_type(),
(void *)dpnp_eigvals_ext_c<
int64_t, func_type_map_t::find_type<get_default_floating_type()>>,
get_default_floating_type<std::false_type>(),
(void *)dpnp_eigvals_ext_c<
int64_t, func_type_map_t::find_type<
get_default_floating_type<std::false_type>()>>};
fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_FLT][eft_FLT] = {
eft_FLT, (void *)dpnp_eigvals_ext_c<float, float>};
fmap[DPNPFuncName::DPNP_FN_EIGVALS_EXT][eft_DBL][eft_DBL] = {
eft_DBL, (void *)dpnp_eigvals_ext_c<double, double>};

fmap[DPNPFuncName::DPNP_FN_INITVAL][eft_BLN][eft_BLN] = {
eft_BLN, (void *)dpnp_initval_default_c<bool>};
fmap[DPNPFuncName::DPNP_FN_INITVAL][eft_INT][eft_INT] = {
Expand Down
2 changes: 0 additions & 2 deletions dpnp/dpnp_algo/dpnp_algo.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ cdef extern from "dpnp_iface_fptr.hpp" namespace "DPNPFuncName": # need this na
DPNP_FN_DIAG_INDICES_EXT
DPNP_FN_DIAGONAL_EXT
DPNP_FN_EDIFF1D_EXT
DPNP_FN_EIG_EXT
DPNP_FN_EIGVALS_EXT
DPNP_FN_ERF_EXT
DPNP_FN_FABS_EXT
DPNP_FN_FFT_FFT_EXT
Expand Down
7 changes: 0 additions & 7 deletions dpnp/linalg/CMakeLists.txt

This file was deleted.

147 changes: 0 additions & 147 deletions dpnp/linalg/dpnp_algo_linalg.pyx

This file was deleted.

Loading