Skip to content

Commit

Permalink
steqr: Replace ScaLAPACK Fortran steqr2 with C++ steqr.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgates3 committed Jul 14, 2024
1 parent ba8f29c commit 0e6f2d7
Show file tree
Hide file tree
Showing 17 changed files with 916 additions and 2,537 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ file(
GLOB slate_src
CONFIGURE_DEPENDS # glob at build time
src/*.cc
src/*.f
src/auxiliary/*.cc
src/core/*.cc
src/internal/*.cc
Expand Down
18 changes: 3 additions & 15 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,8 @@ ifneq (${only_unit},1)
src/stedc_solve.cc \
src/stedc_sort.cc \
src/stedc_z_vector.cc \
src/steqr2.cc \
src/steqr.cc \
src/steqr_impl.cc \
src/sterf.cc \
src/svd.cc \
src/symm.cc \
Expand All @@ -675,19 +676,6 @@ ifneq (${only_unit},1)
# End. Add alphabetically.
endif

ifneq (${have_fortran},)
slate_src += \
src/ssteqr2.f \
src/dsteqr2.f \
src/csteqr2.f \
src/zsteqr2.f \
# End. Add alphabetically, by base name after precision.
else
${error ERROR: Fortran compiler FC='${FC}' not found. Set FC to a \
Fortran compiler (mpif90, gfortran, ifort, xlf, ftn, ...}. \
We hope to eventually remove this requirement.)
endif

# C API
ifeq (${c_api},1)
slate_src += \
Expand Down Expand Up @@ -748,7 +736,7 @@ tester_src += \
test/test_stedc_secular.cc \
test/test_stedc_sort.cc \
test/test_stedc_z_vector.cc \
test/test_steqr2.cc \
test/test_steqr.cc \
test/test_sterf.cc \
test/test_svd.cc \
test/test_symm.cc \
Expand Down
26 changes: 24 additions & 2 deletions include/slate/slate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1281,15 +1281,37 @@ void sterf(
Options const& opts = Options());

//-----------------------------------------
// steqr2()
// steqr()
template <typename scalar_t>
void steqr2(
void steqr(
Job jobz,
std::vector< blas::real_type<scalar_t> >& D,
std::vector< blas::real_type<scalar_t> >& E,
Matrix<scalar_t>& Z,
Options const& opts = Options());

template <typename scalar_t>
[[deprecated( "Use steqr. Will be removed 2025-06." )]]
void steqr2(
Job jobz,
std::vector< blas::real_type<scalar_t> >& D,
std::vector< blas::real_type<scalar_t> >& E,
Matrix<scalar_t>& Z,
Options const& opts = Options())
{
steqr( jobz, D, E, Z, opts );
}

// low-level implementation
template <typename scalar_t>
int64_t steqr(
int64_t n,
blas::real_type<scalar_t>* D,
blas::real_type<scalar_t>* E,
scalar_t* Z, int64_t ldz,
int64_t nrows,
blas::real_type<scalar_t>* work, int64_t lwork );

//------------------------------------------------------------------------------
// Condition number estimate

Expand Down
Loading

0 comments on commit 0e6f2d7

Please sign in to comment.