Commit b463be7c authored by MIJIEUX Thomas's avatar MIJIEUX Thomas

Move orthogonalization notification to Orthogonalizer class

parent d1baf797
......@@ -127,9 +127,7 @@ private:
void do_ortho(Matrix &A, OrthoParam &orthoparm, Block<S> &W)
{
Orthogonalizer ortho{orthoparm};
_logger.notify_ortho_begin();
ortho.run(_hess, _base, W, A); // Ortho and filling of L (the (IB) Hessenberg)
_logger.notify_ortho_end();
ortho.run(_hess, _base, W, A, _logger); // Ortho and filling of L (the (IB) Hessenberg)
}
template<class Matrix, class Block>
......
......@@ -180,9 +180,7 @@ private:
void do_ortho(Matrix &A, OrthoParam &orthoparm)
{
Orthogonalizer ortho{orthoparm};
_logger.notify_ortho_begin();
ortho.run(_F, _base, _WP, A); // Ortho and filling of L (the (IB) Hessenberg)
_logger.notify_ortho_end();
ortho.run(_F, _base, _WP, A, _logger); // Ortho and filling of L (the (IB) Hessenberg)
}
template<class Matrix, class Epsilon>
......
......@@ -183,9 +183,7 @@ private:
void do_ortho(Matrix &A, OrthoParam &orthoparm)
{
Orthogonalizer ortho{orthoparm};
_logger.notify_ortho_begin();
ortho.run(_F, _base, _WP, A); // Ortho and filling of L (the (IB) Hessenberg)
_logger.notify_ortho_end();
ortho.run(_F, _base, _WP, A, _logger); // Ortho and filling of L (the (IB) Hessenberg)
}
template<class Matrix, class Block, class Epsilon, class Restarter>
......
......@@ -2,9 +2,7 @@
#define FABULOUS_BLOCK_HPP
#include <memory>
#include <cstdint>
#include <cassert>
#include <cstdio>
#include <limits>
#include <iostream>
#include <iomanip>
......
......@@ -63,9 +63,10 @@ public:
{
}
template< class HESS, class Base, class Block, class Matrix >
void run(HESS &H, Base &base, Block &W, Matrix &A)
template<class HESS, class Base, class Block, class Matrix, class Logger>
void run(HESS &H, Base &base, Block &W, Matrix &A, Logger logger)
{
logger.notify_ortho_begin();
switch (_param.get_type()) {
case OrthoType::RUHE: run_ruhe(H, base, W, A); break;
case OrthoType::BLOCK: run_block(H, base, W); break;
......@@ -75,6 +76,7 @@ public:
"Exiting\n"
); break;
}
logger.notify_ortho_end();
H.notify_orthogonalization_end();
}
......
......@@ -56,7 +56,10 @@ private:
{ //Compute Ortho against base
// H = V_m^{H} * W_k
A.DotProduct(nb_vect_in_base, 1, base.get_ptr(), ldv, W_k, ldw, h_k, ldh);
A.DotProduct(
nb_vect_in_base, 1, base.get_ptr(), ldv,
W_k, ldw, h_k, ldh
);
lapacke::gemm( // W_k = W_k - Vm * H
dim, 1, nb_vect_in_base,
base.get_ptr(), ldv,
......
......@@ -8,6 +8,7 @@
#include <sstream>
#include <complex>
#include <type_traits>
#include <cstdint>
#define FABULOUS_MAX(a, b) ((a) > (b) ? (a) : (b))
#define FABULOUS_MIN(a, b) ((a) < (b) ? (a) : (b))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment