Skip to content

Commit

Permalink
Update eigenvalues documentation to new style
Browse files Browse the repository at this point in the history
  • Loading branch information
msimberg committed Aug 30, 2023
1 parent 5549f94 commit 54b6a73
Showing 1 changed file with 44 additions and 27 deletions.
71 changes: 44 additions & 27 deletions include/dlaf/eigensolver/eigensolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,24 @@ namespace dlaf::eigensolver {
/// Implementation on local memory.
///
/// @param uplo specifies if upper or lower triangular part of @p mat will be referenced
/// @param mat contains the Hermitian matrix A
/// @param eigenvalues is a N x 1 matrix which on output contains the eigenvalues
/// @param eigenvectors is a N x N matrix which on output contains the eigenvectors
///
/// @param[in,out] mat contains the Hermitian matrix A
/// @pre mat is not distributed
/// @pre mat has a square size
/// @pre mat has a square blocksize
/// @pre mat has equal tile and block sizes
/// @pre mat has size (N x N)
/// @pre mat has blocksize (NB x NB)
/// @pre mat has tilesize (NB x NB)
///
/// @param[out] eigenvalues contains the eigenvalues
/// @pre eigenvalues is not distributed
/// @pre eigenvalues has equal tile and block sizes
/// @pre eigenvalues has size (N x 1)
/// @pre eigenvalues has blocksize (NB x 1)
/// @pre eigenvalues has tilesize (NB x 1)
///
/// @param[out] eigenvectors contains the eigenvectors
/// @pre eigenvectors is not distributed
/// @pre eigenvectors has a square blocksize
/// @pre eigenvectors has equal tile and block sizes
/// @pre eigenvectors has size (N x N)
/// @pre eigenvectors has blocksize (NB x NB)
/// @pre eigenvectors has tilesize (NB x NB)
template <Backend B, Device D, class T>
void eigensolver(blas::Uplo uplo, Matrix<T, D>& mat, Matrix<BaseType<T>, D>& eigenvalues,
Matrix<T, D>& eigenvectors) {
Expand Down Expand Up @@ -75,13 +81,15 @@ void eigensolver(blas::Uplo uplo, Matrix<T, D>& mat, Matrix<BaseType<T>, D>& eig
///
/// Implementation on local memory.
///
/// @return struct ReturnEigensolverType with eigenvalues, as a vector<T>, and eigenvectors as a Matrix
/// @return ReturnEigensolverType with eigenvalues and eigenvectors as a Matrix
///
/// @param uplo specifies if upper or lower triangular part of @p mat will be referenced
/// @param mat contains the Hermitian matrix A
///
/// @param[in,out] mat contains the Hermitian matrix A
/// @pre mat is not distributed
/// @pre mat has a square size
/// @pre mat has a square blocksize
/// @pre mat has equal tile and block sizes
/// @pre mat has size (N x N)
/// @pre mat has blocksize (NB x NB)
/// @pre mat has tilesize (NB x NB)
template <Backend B, Device D, class T>
EigensolverResult<T, D> eigensolver(blas::Uplo uplo, Matrix<T, D>& mat) {
const SizeType size = mat.size().rows();
Expand All @@ -103,20 +111,29 @@ EigensolverResult<T, D> eigensolver(blas::Uplo uplo, Matrix<T, D>& mat) {
///
/// Implementation on distributed memory.
///
/// @param grid is the communicator grid on which the matrix @p mat has been distributed,
/// @param grid is the communicator grid on which the matrix @p mat has been distributed
/// @pre grid is an (NG x MG) grid
///
/// @param uplo specifies if upper or lower triangular part of @p mat will be referenced
/// @param mat contains the Hermitian matrix A
/// @param eigenvalues is a N x 1 matrix which on output contains the eigenvalues
/// @param eigenvectors is a N x N matrix which on output contains the eigenvectors
/// @pre mat is distributed according to grid
/// @pre mat has a square size
/// @pre mat has a square blocksize
/// @pre mat has equal tile and block sizes
/// @pre eigenvalues is not distributed
/// @pre eigenvalues has equal tile and block sizes
/// @pre eigenvectors is distributed according to grid
/// @pre eigenvectors has a square blocksize
/// @pre eigenvectors has equal tile and block sizes
///
/// @param[in,out] mat contains the Hermitian matrix A
/// @pre mat is distributed on an (NG x MG) grid
/// @pre mat has size (N x N)
/// @pre mat has blocksize (NB x NB)
/// @pre mat has tilesize (NB x NB)
///
/// @param[out] eigenvalues contains the eigenvalues
/// @pre eigenvalues is distributed on an (NG x 1) grid ???
/// @pre eigenvalues is distributed on a (NG x MG) grid
/// @pre eigenvalues has size (N x 1)
/// @pre eigenvalues has blocksize (NB x 1)
/// @pre eigenvalues has tilesize (NB x 1)
///
/// @param[out] eigenvectors contains the eigenvectors
/// @pre eigenvectors is distributed on an (NG x MG) grid
/// @pre eigenvectors has size (N x N)
/// @pre eigenvectors has blocksize (NB x NB)
/// @pre eigenvectors has tilesize (NB x NB)
template <Backend B, Device D, class T>
void eigensolver(comm::CommunicatorGrid grid, blas::Uplo uplo, Matrix<T, D>& mat,
Matrix<BaseType<T>, D>& eigenvalues, Matrix<T, D>& eigenvectors) {
Expand Down

0 comments on commit 54b6a73

Please sign in to comment.