forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 145
Labels
InterfacesInterfaces with other packagesInterfaces with other packagesRefactorRefactor ABACUS codesRefactor ABACUS codesUseful InformationUseful information for others to learn/studyUseful information for others to learn/study
Description
Describe the Code Quality Issue
We now have 3 sets of LAPACK interfaces.
namespace container::lapackConnectorinsource/source_base/module_container/base/third_party/lapack.hclass LapackWrapperinsource/source_base/module_external/lapack_wrapper.h, with only two useful routines that can be merged to 1.class LapackConnectorinsource/source_base/module_external/lapack_connector.h
These can be divided into two categories:
-
Column Major (Fortran Style)
- This interface is directly consistent with the original FORTRAN LAPACK
- Except that the real and complex version have the same function parameter list for overloading, and some parameters are not referenced actually in real version.
- Includes:
namespace container::lapackConnectorclass LapackWrapper
-
Row Major (used with C++ custom data type)
- This set of interfaces employs some techniques to apply the column-major fortran LAPACK interface to the row-major C++ data structure, like
ModuleBase::ComplexMatrix. - Includes:
class LapackConnector
- This set of interfaces employs some techniques to apply the column-major fortran LAPACK interface to the row-major C++ data structure, like
It is very confusing to have these three interfaces at the same time.
Proposed Solution
We should only have at most two different interfaces, one Column-Major, and one Row-Major.
It's better to use the unified one and expand new LAPACK routines there.
The duplicate one in class LapackWrapper in source/source_base/module_external/lapack_wrapper.h should be deprecated, and somehow merged into 1. namespace container::lapackConnector in source/source_base/module_container/base/third_party/lapack.h.
Metadata
Metadata
Assignees
Labels
InterfacesInterfaces with other packagesInterfaces with other packagesRefactorRefactor ABACUS codesRefactor ABACUS codesUseful InformationUseful information for others to learn/studyUseful information for others to learn/study