Skip to content

Commit afb4b2c

Browse files
committed
Update docs for LAPACK connector API files
1 parent ecb0aad commit afb4b2c

File tree

3 files changed

+42
-6
lines changed

3 files changed

+42
-6
lines changed

source/source_base/module_container/base/third_party/lapack.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/**
2+
* @file lapack.h
3+
* @brief This is a direct wrapper of some LAPACK routines.
4+
* Direct wrapping of standard LAPACK routines. (column major, fortran style)
5+
*
6+
* @note
7+
* Some slight modification are made to fit the C++ style for overloading purpose.
8+
* You can find some function with different parameter list than the original LAPACK routine.
9+
* And some of these parameters are not referred in the function body. They are included just to
10+
* ensure the same parameter list for overloaded functions with a uniform name.
11+
*/
12+
113
#ifndef BASE_THIRD_PARTY_LAPACK_H_
214
#define BASE_THIRD_PARTY_LAPACK_H_
315

@@ -10,6 +22,10 @@
1022
#include <base/third_party/hipsolver.h>
1123
#endif
1224

25+
/// This is a wrapper of some LAPACK routines.
26+
/// Direct wrapping of standard LAPACK routines. (column major, fortran style)
27+
/// with some slight modification to fit the C++ style for overloading purpose.
28+
1329
//Naming convention of lapack subroutines : ammxxx, where
1430
//"a" specifies the data type:
1531
// - d stands for double

source/source_base/module_external/lapack_connector.h

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1-
#ifndef LAPACKCONNECTOR_HPP
2-
#define LAPACKCONNECTOR_HPP
1+
/**
2+
* @file lapack_connector.h
3+
*
4+
* @brief This is a wrapper of some LAPACK routines.
5+
*
6+
* @warning MAY BE DEPRECATED IN THE FUTURE.
7+
*
8+
* @note
9+
* !!! Note that
10+
* This wrapper is a <b>C++ style</b> wrapper of LAPACK routines,
11+
* i.e., assuming that the input matrices are in \b row-major order.
12+
* The data layout in C++ is row-major, C style,
13+
* while the original LAPACK is column-major, fortran style.
14+
* (ModuleBase::ComplexMatrix is in row-major order)
15+
* The wrapper will do the data transformation between
16+
* row-major and column-major order automatically.
17+
*
18+
*/
19+
20+
#ifndef LAPACK_CONNECTOR_HPP
21+
#define LAPACK_CONNECTOR_HPP
322

423
#include <new>
524
#include <stdexcept>
@@ -11,8 +30,10 @@
1130

1231
//Naming convention of lapack subroutines : ammxxx, where
1332
//"a" specifies the data type:
14-
// - d stands for double
15-
// - z stands for complex double
33+
// - s stands for float
34+
// - d stands for double
35+
// - c stands for complex float
36+
// - z stands for complex double
1637
//"mm" specifies the type of matrix, for example:
1738
// - he stands for hermitian
1839
// - sy stands for symmetric
@@ -468,4 +489,4 @@ class LapackConnector
468489
cherk_(&uplo_changed, &trans_changed, &n, &k, &alpha, A, &lda, &beta, C, &ldc);
469490
}
470491
};
471-
#endif // LAPACKCONNECTOR_HPP
492+
#endif // LAPACK_CONNECTOR_HPP

source/source_hsolver/kernels/hegvd_op.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "source_hsolver/kernels/hegvd_op.h"
2-
// #include "source_base/module_external/lapack_wrapper.h"
32
#include "source_base/module_container/base/third_party/lapack.h"
43

54
#include <algorithm>

0 commit comments

Comments
 (0)