matrix_square_root.cpp File Reference
#include "matrix_functions.h"

Functions

template<typename MatrixType >
void testMatrixSqrt (const MatrixType &m)
 
 EIGEN_DECLARE_TEST (matrix_square_root)
 

Function Documentation

◆ EIGEN_DECLARE_TEST()

EIGEN_DECLARE_TEST ( matrix_square_root  )
20  {
21  for (int i = 0; i < g_repeat; i++) {
22  CALL_SUBTEST_1(testMatrixSqrt(Matrix3cf()));
23  CALL_SUBTEST_2(testMatrixSqrt(MatrixXcd(12, 12)));
24  CALL_SUBTEST_3(testMatrixSqrt(Matrix4f()));
27  CALL_SUBTEST_5(testMatrixSqrt(Matrix<std::complex<float>, 1, 1>()));
28  }
29 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
void testMatrixSqrt(const MatrixType &m)
Definition: matrix_square_root.cpp:13
static int g_repeat
Definition: main.h:191
#define CALL_SUBTEST_3(FUNC)
Definition: split_test_helper.h:16
#define CALL_SUBTEST_1(FUNC)
Definition: split_test_helper.h:4
#define CALL_SUBTEST_5(FUNC)
Definition: split_test_helper.h:28
#define CALL_SUBTEST_2(FUNC)
Definition: split_test_helper.h:10
#define CALL_SUBTEST_4(FUNC)
Definition: split_test_helper.h:22

References CALL_SUBTEST_1, CALL_SUBTEST_2, CALL_SUBTEST_3, CALL_SUBTEST_4, CALL_SUBTEST_5, Eigen::g_repeat, i, and testMatrixSqrt().

◆ testMatrixSqrt()

template<typename MatrixType >
void testMatrixSqrt ( const MatrixType m)
13  {
14  MatrixType A;
16  MatrixType sqrtA = A.sqrt();
18 }
MatrixXd sqrtA
Definition: SelfAdjointEigenSolver_operatorSqrt.cpp:6
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
#define VERIFY_IS_APPROX(a, b)
Definition: integer_types.cpp:13
int * m
Definition: level2_cplx_impl.h:294
void run(const string &dir_name, LinearSolver *linear_solver_pt, const unsigned nel_1d, bool mess_up_order)
Definition: two_d_poisson_compare_solvers.cc:317

References m, run(), sqrtA, and VERIFY_IS_APPROX.

Referenced by EIGEN_DECLARE_TEST().