mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
mx::math::svdDeletionWorkspace< realT, abiT > Class Template Reference

template<typename realT, typename abiT>
class mx::math::svdDeletionWorkspace< realT, abiT >

Reusable, non-shared storage for SVD deletion operations.

Call prepare() before a hot loop to allocate and query LAPACK once. A later operation reuses the storage whenever its dimensions and backend fit the prepared capacity. The workspace is noncopyable but movable, allowing callers to own one independent workspace per worker without sharing in-flight numerical state.

Template Parameters
realTfloating-point type; supported explicit instantiations are float and double.
abiTtype-level ABI tag; callers use the default.

Definition at line 448 of file svdDowndate.hpp.

#include <math/svdDowndate.hpp>

Public Member Functions

 svdDeletionWorkspace ()
 Construct an empty workspace.
 ~svdDeletionWorkspace ()
 Release owned scratch storage.
 svdDeletionWorkspace (const svdDeletionWorkspace &other)=delete
 Workspaces cannot be copied.
svdDeletionWorkspaceoperator= (const svdDeletionWorkspace &other)=delete
 Workspaces cannot be copy-assigned.
 svdDeletionWorkspace (svdDeletionWorkspace &&other) noexcept
 Move owned storage and preparation state from another workspace.
svdDeletionWorkspaceoperator= (svdDeletionWorkspace &&other) noexcept
 Replace this workspace by moving owned storage and preparation state.
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus prepare (Eigen::Index baseRank, Eigen::Index maximumDeleted, svdDeletionBackend backend)
 Prepare reusable storage and LAPACK work arrays.
void clear () noexcept
 Release all prepared storage and reset dimensions.
bool prepared () const noexcept
 Report whether this workspace has completed preparation.
std::int64_t baseRank () const noexcept
 Return the prepared base rank.
std::int64_t maximumDeleted () const noexcept
 Return the prepared maximum deletion count.
svdDeletionBackend backend () const noexcept
 Return the prepared numerical backend.
MXLAPACK_INT lapackInfo () const noexcept
 Return the underlying LAPACK status from the most recent failed workspace query.

Constructor & Destructor Documentation

◆ svdDeletionWorkspace() [1/3]

template<typename realT, typename abiT>
mx::math::svdDeletionWorkspace< realT, abiT >::svdDeletionWorkspace ( )

Construct an empty workspace.

Definition at line 1842 of file svdDowndate.cpp.

◆ ~svdDeletionWorkspace()

template<typename realT, typename abiT>
mx::math::svdDeletionWorkspace< realT, abiT >::~svdDeletionWorkspace ( )

Release owned scratch storage.

Definition at line 1847 of file svdDowndate.cpp.

◆ svdDeletionWorkspace() [2/3]

template<typename realT, typename abiT>
mx::math::svdDeletionWorkspace< realT, abiT >::svdDeletionWorkspace ( const svdDeletionWorkspace< realT, abiT > & other)
delete

Workspaces cannot be copied.

Parameters
[in]otherworkspace that copying is forbidden from

◆ svdDeletionWorkspace() [3/3]

template<typename realT, typename abiT>
mx::math::svdDeletionWorkspace< realT, abiT >::svdDeletionWorkspace ( svdDeletionWorkspace< realT, abiT > && other)
defaultnoexcept

Move owned storage and preparation state from another workspace.

Parameters
[in,out]otherworkspace to move from

Member Function Documentation

◆ backend()

template<typename realT, typename abiT>
svdDeletionBackend mx::math::svdDeletionWorkspace< realT, abiT >::backend ( ) const
noexcept

Return the prepared numerical backend.

Definition at line 2181 of file svdDowndate.cpp.

References stableCore.

Referenced by unitTest::math_svdDowndate_test::TEST_CASE().

◆ baseRank()

template<typename realT, typename abiT>
std::int64_t mx::math::svdDeletionWorkspace< realT, abiT >::baseRank ( ) const
noexcept

Return the prepared base rank.

Definition at line 2169 of file svdDowndate.cpp.

Referenced by unitTest::math_svdDowndate_test::TEST_CASE().

◆ clear()

template<typename realT, typename abiT>
void mx::math::svdDeletionWorkspace< realT, abiT >::clear ( )
noexcept

Release all prepared storage and reset dimensions.

Definition at line 2121 of file svdDowndate.cpp.

References stableCore.

Referenced by unitTest::math_svdDowndate_test::TEST_CASE().

◆ lapackInfo()

template<typename realT, typename abiT>
MXLAPACK_INT mx::math::svdDeletionWorkspace< realT, abiT >::lapackInfo ( ) const
noexcept

Return the underlying LAPACK status from the most recent failed workspace query.

Definition at line 2187 of file svdDowndate.cpp.

Referenced by unitTest::math_svdDowndate_test::TEST_CASE(), and unitTest::math_svdDowndate_test::TEST_CASE().

◆ maximumDeleted()

template<typename realT, typename abiT>
std::int64_t mx::math::svdDeletionWorkspace< realT, abiT >::maximumDeleted ( ) const
noexcept

Return the prepared maximum deletion count.

Definition at line 2175 of file svdDowndate.cpp.

Referenced by unitTest::math_svdDowndate_test::TEST_CASE(), and unitTest::math_svdDowndate_test::TEST_CASE().

◆ operator=() [1/2]

template<typename realT, typename abiT>
svdDeletionWorkspace & mx::math::svdDeletionWorkspace< realT, abiT >::operator= ( const svdDeletionWorkspace< realT, abiT > & other)
delete

Workspaces cannot be copy-assigned.

Parameters
[in]otherworkspace that copy assignment is forbidden from

◆ operator=() [2/2]

template<typename realT, typename abiT>
svdDeletionWorkspace< realT, abiT > & mx::math::svdDeletionWorkspace< realT, abiT >::operator= ( svdDeletionWorkspace< realT, abiT > && other)
defaultnoexcept

Replace this workspace by moving owned storage and preparation state.

Parameters
[in,out]otherworkspace to move from

◆ prepare()

template<typename realT, typename abiT>
MXLIB_SVD_DELETION_HEADER_ADAPTER svdDeletionStatus mx::math::svdDeletionWorkspace< realT, abiT >::prepare ( Eigen::Index baseRank,
Eigen::Index maximumDeleted,
svdDeletionBackend backend )
inline

Prepare reusable storage and LAPACK work arrays.

Parameters
[in]baseRankmaximum supplied singular rank
[in]maximumDeletedmaximum rows of the deleted-side factor
[in]backendnumerical backend to prepare

Definition at line 476 of file svdDowndate.hpp.

Referenced by unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), and unitTest::math_svdDowndate_test::TEST_CASE().

◆ prepared()

template<typename realT, typename abiT>
bool mx::math::svdDeletionWorkspace< realT, abiT >::prepared ( ) const
noexcept

Report whether this workspace has completed preparation.

Definition at line 2163 of file svdDowndate.cpp.

Referenced by unitTest::math_svdDowndate_test::TEST_CASE(), unitTest::math_svdDowndate_test::TEST_CASE(), and unitTest::math_svdDowndate_test::TEST_CASE().


The documentation for this class was generated from the following files: