diff --git a/master/band__to__tridiag_8h.html b/master/band__to__tridiag_8h.html index 2582c828e4..3488d56c9e 100644 --- a/master/band__to__tridiag_8h.html +++ b/master/band__to__tridiag_8h.html @@ -145,15 +145,15 @@

Precondition
mat_a has a square size,
+
Precondition
mat_a is not distributed
-mat_a has a square block size,
+mat_a has size (N x N)
-band_size is a divisor of mat_a.blockSize().cols(), and band_size >= 2
+mat_a has blocksize (NB x NB)
-mat_a is not distributed,
+mat_a has tilesize (NB x NB)
-mat_a has equal tile and block sizes.
+band_size is a divisor of mat_a.blockSize().cols(), and band_size >= 2 @@ -217,15 +217,15 @@

Precondition
mat_a has a square size,
+
Precondition
mat_a is distributed according to grid
-mat_a has a square block size,
+mat_a has size (N x N)
-band_size is a divisor of mat_a.blockSize().cols() and band_size >= 2,
+mat_a has blocksize (NB x NB)
-mat_a is distributed according to grid,
+mat_a has tilesize (NB x NB)
-mat_a has equal tile and block sizes.
+band_size is a divisor of mat_a.blockSize().cols(), and band_size >= 2 diff --git a/master/band__to__tridiag_8h_source.html b/master/band__to__tridiag_8h_source.html index d774b74304..eafa399c31 100644 --- a/master/band__to__tridiag_8h_source.html +++ b/master/band__to__tridiag_8h_source.html @@ -92,61 +92,61 @@
22 
23 namespace dlaf::eigensolver::internal {
24 
-
73 template <Backend B, Device D, class T>
-
74 TridiagResult<T, Device::CPU> band_to_tridiagonal(blas::Uplo uplo, SizeType band_size,
-
75  Matrix<const T, D>& mat_a) {
-
76  DLAF_ASSERT(matrix::square_size(mat_a), mat_a);
-
77  DLAF_ASSERT(matrix::square_blocksize(mat_a), mat_a);
-
78  DLAF_ASSERT(mat_a.blockSize().rows() % band_size == 0, mat_a.blockSize().rows(), band_size);
-
79  DLAF_ASSERT(matrix::local_matrix(mat_a), mat_a);
-
80  DLAF_ASSERT(matrix::single_tile_per_block(mat_a), mat_a);
-
81  DLAF_ASSERT(band_size >= 2, band_size);
-
82 
-
83  switch (uplo) {
-
84  case blas::Uplo::Lower:
-
85  return BandToTridiag<B, D, T>::call_L(band_size, mat_a);
-
86  break;
-
87  case blas::Uplo::Upper:
-
88  DLAF_UNIMPLEMENTED(uplo);
-
89  break;
-
90  case blas::Uplo::General:
-
91  DLAF_UNIMPLEMENTED(uplo);
-
92  break;
-
93  }
-
94 
-
95  return DLAF_UNREACHABLE(TridiagResult<T, Device::CPU>);
-
96 }
-
97 
-
146 template <Backend backend, Device device, class T>
- -
148  SizeType band_size, Matrix<const T, device>& mat_a) {
-
149  DLAF_ASSERT(matrix::square_size(mat_a), mat_a);
-
150  DLAF_ASSERT(matrix::square_blocksize(mat_a), mat_a);
-
151  DLAF_ASSERT(matrix::equal_process_grid(mat_a, grid), mat_a, grid);
-
152  DLAF_ASSERT(matrix::single_tile_per_block(mat_a), mat_a);
-
153  DLAF_ASSERT(band_size >= 2, band_size);
-
154 
-
155  // If the grid contains only one rank force local implementation.
-
156  if (grid.size() == comm::Size2D(1, 1))
-
157  return band_to_tridiagonal<backend, device, T>(uplo, band_size, mat_a);
-
158 
-
159  switch (uplo) {
-
160  case blas::Uplo::Lower:
-
161  return BandToTridiag<backend, device, T>::call_L(grid, band_size, mat_a);
-
162  break;
-
163  case blas::Uplo::Upper:
-
164  DLAF_UNIMPLEMENTED(uplo);
-
165  break;
-
166  case blas::Uplo::General:
-
167  DLAF_UNIMPLEMENTED(uplo);
-
168  break;
-
169  }
-
170 
-
171  return DLAF_UNREACHABLE(TridiagResult<T, Device::CPU>);
-
172 }
-
173 
+
74 template <Backend B, Device D, class T>
+
75 TridiagResult<T, Device::CPU> band_to_tridiagonal(blas::Uplo uplo, SizeType band_size,
+
76  Matrix<const T, D>& mat_a) {
+
77  DLAF_ASSERT(matrix::square_size(mat_a), mat_a);
+
78  DLAF_ASSERT(matrix::square_blocksize(mat_a), mat_a);
+
79  DLAF_ASSERT(mat_a.blockSize().rows() % band_size == 0, mat_a.blockSize().rows(), band_size);
+
80  DLAF_ASSERT(matrix::local_matrix(mat_a), mat_a);
+
81  DLAF_ASSERT(matrix::single_tile_per_block(mat_a), mat_a);
+
82  DLAF_ASSERT(band_size >= 2, band_size);
+
83 
+
84  switch (uplo) {
+
85  case blas::Uplo::Lower:
+
86  return BandToTridiag<B, D, T>::call_L(band_size, mat_a);
+
87  break;
+
88  case blas::Uplo::Upper:
+
89  DLAF_UNIMPLEMENTED(uplo);
+
90  break;
+
91  case blas::Uplo::General:
+
92  DLAF_UNIMPLEMENTED(uplo);
+
93  break;
+
94  }
+
95 
+
96  return DLAF_UNREACHABLE(TridiagResult<T, Device::CPU>);
+
97 }
+
98 
+
148 template <Backend backend, Device device, class T>
+ +
150  SizeType band_size, Matrix<const T, device>& mat_a) {
+
151  DLAF_ASSERT(matrix::square_size(mat_a), mat_a);
+
152  DLAF_ASSERT(matrix::square_blocksize(mat_a), mat_a);
+
153  DLAF_ASSERT(matrix::equal_process_grid(mat_a, grid), mat_a, grid);
+
154  DLAF_ASSERT(matrix::single_tile_per_block(mat_a), mat_a);
+
155  DLAF_ASSERT(band_size >= 2, band_size);
+
156 
+
157  // If the grid contains only one rank force local implementation.
+
158  if (grid.size() == comm::Size2D(1, 1))
+
159  return band_to_tridiagonal<backend, device, T>(uplo, band_size, mat_a);
+
160 
+
161  switch (uplo) {
+
162  case blas::Uplo::Lower:
+
163  return BandToTridiag<backend, device, T>::call_L(grid, band_size, mat_a);
+
164  break;
+
165  case blas::Uplo::Upper:
+
166  DLAF_UNIMPLEMENTED(uplo);
+
167  break;
+
168  case blas::Uplo::General:
+
169  DLAF_UNIMPLEMENTED(uplo);
+
170  break;
+
171  }
+
172 
+
173  return DLAF_UNREACHABLE(TridiagResult<T, Device::CPU>);
174 }
-
TridiagResult< T, Device::CPU > band_to_tridiagonal(blas::Uplo uplo, SizeType band_size, Matrix< const T, D > &mat_a)
Definition: band_to_tridiag.h:74
+
175 
+
176 }
+
TridiagResult< T, Device::CPU > band_to_tridiagonal(blas::Uplo uplo, SizeType band_size, Matrix< const T, D > &mat_a)
Definition: band_to_tridiag.h:75
Definition: communicator_grid.h:42
Size2D size() const noexcept
Return the number of rows in the grid.
Definition: communicator_grid.h:68
diff --git a/master/bt__band__to__tridiag_8h.html b/master/bt__band__to__tridiag_8h.html index d181a03754..696114b1d1 100644 --- a/master/bt__band__to__tridiag_8h.html +++ b/master/bt__band__to__tridiag_8h.html @@ -80,15 +80,168 @@ - - + + - - + +

Functions

-template<Backend B, Device D, class T >
void dlaf::eigensolver::internal::bt_band_to_tridiagonal (const SizeType band_size, matrix::Matrix< T, D > &mat_e, matrix::Matrix< const T, Device::CPU > &mat_hh)
template<Backend B, Device D, class T >
void dlaf::eigensolver::internal::bt_band_to_tridiagonal (const SizeType band_size, matrix::Matrix< T, D > &mat_e, matrix::Matrix< const T, Device::CPU > &mat_hh)
 
-template<Backend B, Device D, class T >
void dlaf::eigensolver::internal::bt_band_to_tridiagonal (comm::CommunicatorGrid grid, const SizeType band_size, matrix::Matrix< T, D > &mat_e, matrix::Matrix< const T, Device::CPU > &mat_hh)
template<Backend B, Device D, class T >
void dlaf::eigensolver::internal::bt_band_to_tridiagonal (comm::CommunicatorGrid grid, const SizeType band_size, matrix::Matrix< T, D > &mat_e, matrix::Matrix< const T, Device::CPU > &mat_hh)
 
+

Function Documentation

+ +

◆ bt_band_to_tridiagonal() [1/2]

+ +
+
+
+template<Backend B, Device D, class T >
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void dlaf::eigensolver::internal::bt_band_to_tridiagonal (comm::CommunicatorGrid grid,
const SizeType band_size,
matrix::Matrix< T, D > & mat_e,
matrix::Matrix< const T, Device::CPU > & mat_hh 
)
+
+

Eigenvalue back-transformation implementation, which applies the inverse of the transformation used to get a tridiagonal matrix from a band one.

+

It computes E -= V T V* E, applying to a general matrix E the inverse of the transformation described by the reflectors in V (block-wise, so T represents the T factor which embeds the information about taus), which are the ones used to transform a band matrix to a tridiagonal matrix.

+

In particular, V and T are obtained using data about reflectors and taus passed via mat_hh where they are stored using following compact representation

+

compact extended AT BT CT DT 1 0 0 0 A1 B1 C1 D1 A1 1 0 0 A2 B2 C2 D2 A2 B1 1 0 A3 B3 C3 D3 A3 B2 C1 1 0 B3 C2 D1 0 0 C3 D2 0 0 0 D3

+

where A, B, C and D refers to distinct reflectors, with their components numbered and their taus identified by the letter T.

+
Parameters
+ + +
mat_hhmatrix containing reflectors together with taus (compact form see representation above)
+
+
+
Precondition
mat_hh is distributed according to grid
+
+mat_hh has size (N x N)
+
+mat_hh has blocksize (NB x NB)
+
+mat_hh has tilesize (NB x NB)
+
Parameters
+ + +
mat_ematrix to which the inverse transformation is applied to
+
+
+
Precondition
mat_e is distributed according to grid
+
+mat_e has size (N x M)
+
+mat_e has blocksize (NB x MB)
+
+mat_e has tilesize (NB x MB)
+
Parameters
+ + +
band_sizesize of the reflectors (normal one, not constrained by any matrix size limit)
+
+
+
Precondition
band_size is a divisor of mat_hh.blockSize().cols()
+ +
+
+ +

◆ bt_band_to_tridiagonal() [2/2]

+ +
+
+
+template<Backend B, Device D, class T >
+ + + + + + + + + + + + + + + + + + + + + + + + +
void dlaf::eigensolver::internal::bt_band_to_tridiagonal (const SizeType band_size,
matrix::Matrix< T, D > & mat_e,
matrix::Matrix< const T, Device::CPU > & mat_hh 
)
+
+

Eigenvalue back-transformation implementation on local memory, which applies the inverse of the transformation used to get a tridiagonal matrix from a band one.

+

It computes E -= V T V* E, applying to a general matrix E the inverse of the transformation described by the reflectors in V (block-wise, so T represents the T factor which embeds the information about taus), which are the ones used to transform a band matrix to a tridiagonal matrix.

+

In particular, V and T are obtained using data about reflectors and taus passed via mat_hh where they are stored using following compact representation

+

compact extended AT BT CT DT 1 0 0 0 A1 B1 C1 D1 A1 1 0 0 A2 B2 C2 D2 A2 B1 1 0 A3 B3 C3 D3 A3 B2 C1 1 0 B3 C2 D1 0 0 C3 D2 0 0 0 D3

+

where A, B, C and D refers to distinct reflectors, with their components numbered and their taus identified by the letter T.

+
Parameters
+ + +
mat_hhmatrix containing reflectors together with taus (compact form see representation above)
+
+
+
Precondition
mat_hh is not distributed
+
+mat_hh has size (N x N)
+
+mat_hh has blocksize (NB x NB)
+
+mat_hh has tilesize (NB x NB)
+
Parameters
+ + +
mat_ematrix to which the inverse transformation is applied to
+
+
+
Precondition
mat_e is not distributed
+
+mat_e has size (N x M)
+
+mat_e has blocksize (NB x MB)
+
+mat_e has tilesize (NB x MB)
+
Parameters
+ + +
band_sizesize of the reflectors (normal one, not constrained by any matrix size limit)
+
+
+
Precondition
band_size is a divisor of mat_hh.blockSize().cols()
+ +
+