33 #include <tests/myratest.h> 43 myra::out() << typestring<Number>() << std::endl;
46 auto A = gemm(G,G,
'H');
49 auto B = phemm(
'L',L,X);
52 auto options = Options::create().set_nthreads(4).set_blocksize(128);
56 potrf_inplace(L_serial);
57 trsm_inplace(
'L',
'N',L_serial,X_serial);
58 trsm_inplace(
'L',
'H',L_serial,X_serial);
59 Precision e_serial = frobenius(A*X_serial-B) / frobenius(B);
63 ppotrf_inplace(L_parallel,options);
64 ptrsm_inplace(
'L',
'N',L_parallel,X_parallel,
'N',one,options);
65 ptrsm_inplace(
'L',
'H',L_parallel,X_parallel,
'N',one,options);
66 Precision e_parallel = frobenius(A*X_parallel-B) / frobenius(B);
68 myra::out() <<
" |L*L'*X-B|, serial = " << e_serial << std::endl;
69 myra::out() <<
" |L*L'*X-B|, parallel = " << e_parallel << std::endl;
70 REQUIRE(e_serial < tolerance);
71 REQUIRE(e_parallel < tolerance);
76 ADD_TEST(
"ppotrf2",
"[pdense][parallel]")
80 test<NumberS>(I,J,1.0e-4f);
81 test<NumberD>(I,J,1.0e-8);
82 test<NumberC>(I,J,1.0e-4f);
83 test<NumberZ>(I,J,1.0e-8);
Cholesky factorization routines for positive definite matrices.
Thread-parallel version of dense/potrf.h, Cholesky decomposition of a symmetric positive Matrix...
Interface class for representing subranges of dense Matrix's.
Thread-parallel version of dense/phemm.h, hermitian Matrix * dense Matrix multiplication.
Routines for computing Frobenius norms of various algebraic containers.
Thread parallel version of dense/herk.h, hermitian rank-k updates.
static Matrix< Number > random(int I, int J)
Generates a random Matrix of specified size.
Definition: Matrix.cpp:353
Options pack for routines in /pdense.
Definition: Options.h:24
Thread-parallel version of dense/trsm.h, triangular Matrix \ dense Matrix backsolution.
Range construct for a lower triangular matrix stored in rectangular packed format.
Routines for backsolving by a triangular Matrix or LowerMatrix.
Specialized container for a lower triangular matrix, O(N^2/2) storage. Used by symmetry exploiting ma...
Various utility functions/classes related to scalar Number types.
General purpose dense matrix container, O(i*j) storage.
Options pack for routines in /pdense.
Reflects Precision trait for a Number, scalar Number types should specialize it.
Definition: Number.h:33
Returns a hermitian copy of a Matrix. The inplace version only works on a square operand.
Stores a lower triangular matrix in rectangular packed format.
Definition: conjugate.h:22
Variety of routines all for dense Matrix*Matrix multiplies. Delegates to the BLAS.
float
|L*L'*X-B|, serial = 3.05581e-07
|L*L'*X-B|, parallel = 2.92997e-07
double
|L*L'*X-B|, serial = 4.72538e-16
|L*L'*X-B|, parallel = 4.25729e-16
std::complex<float>
|L*L'*X-B|, serial = 3.13721e-07
|L*L'*X-B|, parallel = 3.03349e-07
std::complex<double>
|L*L'*X-B|, serial = 4.97572e-16
|L*L'*X-B|, parallel = 4.59068e-16