34 #include <tests/myratest.h> 44 myra::out() << typestring<Number>() << std::endl;
50 auto alpha = random<Number>();
52 auto options = Options::create().set_nthreads(4).set_blocksize(64);
54 std::vector<char> sides;
57 std::vector<char> ops;
62 for (
int s = 0; s < sides.size(); ++s)
63 for (
int o = 0; o < ops.size(); ++o)
69 auto B = (side ==
'L') ? (one/alpha)*pgemm(L.make_Matrix(),op,X) : (one/alpha)*pgemm(X,L.make_Matrix(),op);
73 trsm_inplace(side,op,L,B_serial,
'N',alpha);
74 ptrsm_inplace(side,op,L,B_parallel,
'N',alpha,options);
76 Precision e_serial = frobenius(B_serial-X) / frobenius(X);
77 Precision e_parallel = frobenius(B_parallel-X) / frobenius(X);
80 myra::out() <<
" |L^" << op <<
"\\B-X| serial = " << e_serial << std::endl;
81 myra::out() <<
" |L^" << op <<
"\\B-X| parallel = " << e_parallel << std::endl;
85 myra::out() <<
" |B/L^" << op <<
"-X| serial = " << e_serial << std::endl;
86 myra::out() <<
" |B/L^" << op <<
"-X| parallel = " << e_parallel << std::endl;
88 REQUIRE(e_serial < tolerance);
89 REQUIRE(e_parallel < tolerance);
95 ADD_TEST(
"ptrsm2",
"[pdense][parallel]")
99 test<NumberS>(I,J,1.0e-3f);
100 test<NumberD>(I,J,1.0e-8);
101 test<NumberC>(I,J,1.0e-3f);
102 test<NumberZ>(I,J,1.0e-8);
Cholesky factorization routines for positive definite matrices.
Interface class for representing subranges of dense Matrix's.
Tabulates an IxJ matrix. Allows random access, has column major layout to be compatible with BLAS/LAP...
Definition: bdsqr.h:20
Routines for hermitian rank-k updates, a specialized form of Matrix*Matrix multiplication.
Routines for computing Frobenius norms of various algebraic containers.
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...
Returns the lower triangle of a dense Matrix.
Returns the upper triangle of a dense Matrix.
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
Simplistic random number functions.
Thread-parallel version of dense/gemm.h, Matrix*Matrix multiplication.
Variety of routines all for dense Matrix*Matrix multiplies. Delegates to the BLAS.
float
|L^N\B-X| serial = 3.94981e-06
|L^N\B-X| parallel = 4.80008e-06
|L^T\B-X| serial = 4.89754e-07
|L^T\B-X| parallel = 4.88912e-07
|L^H\B-X| serial = 4.963e-07
|L^H\B-X| parallel = 4.93816e-07
|L^C\B-X| serial = 4.0229e-06
|L^C\B-X| parallel = 4.892e-06
|B/L^N-X| serial = 5.06035e-07
|B/L^N-X| parallel = 5.02461e-07
|B/L^T-X| serial = 4.07096e-06
|B/L^T-X| parallel = 4.73378e-06
|B/L^H-X| serial = 3.88497e-06
|B/L^H-X| parallel = 4.9363e-06
|B/L^C-X| serial = 4.99073e-07
|B/L^C-X| parallel = 4.95771e-07
double
|L^N\B-X| serial = 2.72498e-15
|L^N\B-X| parallel = 2.44478e-15
|L^T\B-X| serial = 7.87358e-16
|L^T\B-X| parallel = 7.74825e-16
|L^H\B-X| serial = 7.93018e-16
|L^H\B-X| parallel = 7.69663e-16
|L^C\B-X| serial = 2.78493e-15
|L^C\B-X| parallel = 2.52181e-15
|B/L^N-X| serial = 7.8958e-16
|B/L^N-X| parallel = 7.74487e-16
|B/L^T-X| serial = 2.65089e-15
|B/L^T-X| parallel = 2.62559e-15
|B/L^H-X| serial = 2.76936e-15
|B/L^H-X| parallel = 2.48116e-15
|B/L^C-X| serial = 7.87055e-16
|B/L^C-X| parallel = 7.61199e-16
std::complex<float>
|L^N\B-X| serial = 8.12812e-06
|L^N\B-X| parallel = 8.66505e-06
|L^T\B-X| serial = 5.7899e-07
|L^T\B-X| parallel = 5.76473e-07
|L^H\B-X| serial = 5.64767e-07
|L^H\B-X| parallel = 5.65431e-07
|L^C\B-X| serial = 7.98159e-06
|L^C\B-X| parallel = 8.82009e-06
|B/L^N-X| serial = 5.68528e-07
|B/L^N-X| parallel = 5.67803e-07
|B/L^T-X| serial = 8.22145e-06
|B/L^T-X| parallel = 8.25925e-06
|B/L^H-X| serial = 7.41446e-06
|B/L^H-X| parallel = 8.52447e-06
|B/L^C-X| serial = 5.75249e-07
|B/L^C-X| parallel = 5.74935e-07
std::complex<double>
|L^N\B-X| serial = 2.02922e-14
|L^N\B-X| parallel = 1.86986e-14
|L^T\B-X| serial = 9.27742e-16
|L^T\B-X| parallel = 9.30613e-16
|L^H\B-X| serial = 9.68563e-16
|L^H\B-X| parallel = 9.25248e-16
|L^C\B-X| serial = 2.06691e-14
|L^C\B-X| parallel = 1.98845e-14
|B/L^N-X| serial = 9.41747e-16
|B/L^N-X| parallel = 9.25751e-16
|B/L^T-X| serial = 1.85259e-14
|B/L^T-X| parallel = 1.79425e-14
|B/L^H-X| serial = 1.93315e-14
|B/L^H-X| parallel = 1.8566e-14
|B/L^C-X| serial = 9.44295e-16
|B/L^C-X| parallel = 9.02848e-16