32 #include <tests/myratest.h> 42 myra::out() << typestring<Number>() << std::endl;
46 Number alpha = random<Number>();
47 Number beta = random<Number>();
51 auto options = Options::create().set_nthreads(4).set_blocksize(128);
57 symm_inplace(
'L', C1, L, B, alpha, beta);
58 psymm_inplace(
'L', C2, L, B, alpha, beta, options);
59 Precision error = frobenius(C1-C2)/frobenius(C1);
60 myra::out() <<
" |symm('L')-psymm('L')| = " << error << std::endl;
61 REQUIRE(error < tolerance);
68 symm_inplace(
'R', C1, L, B, alpha, beta);
69 psymm_inplace(
'R', C2, L, B, alpha, beta, options);
70 Precision error = frobenius(C1-C2)/frobenius(C1);
71 myra::out() <<
" |symm('R')-psymm('R')| = " << error << std::endl;
72 REQUIRE(error < tolerance);
78 ADD_TEST(
"psymm2",
"[pdense][parallel]")
82 test<NumberS> (I,J,1.0e-4f);
83 test<NumberD> (I,J,1.0e-8);
84 test<NumberC> (I,J,1.0e-4f);
85 test<NumberZ> (I,J,1.0e-8);
Interface class for representing subranges of dense Matrix's.
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
Range construct for a lower triangular matrix stored in rectangular packed format.
Specialized container for a lower triangular matrix, O(N^2/2) storage. Used by symmetry exploiting ma...
Returns a transposed copy of a Matrix. The inplace version only works on a square operand...
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.
Stores a lower triangular matrix in rectangular packed format.
Definition: conjugate.h:22
Routines for symmetric Matrix * dense Matrix multiplication.
Thread-parallel symmetric Matrix * dense Matrix multiplication.
float
|symm('L')-psymm('L')| = 2.40123e-07
|symm('R')-psymm('R')| = 3.21969e-07
double
|symm('L')-psymm('L')| = 3.53979e-16
|symm('R')-psymm('R')| = 4.73187e-16
std::complex<float>
|symm('L')-psymm('L')| = 2.28176e-07
|symm('R')-psymm('R')| = 2.73029e-07
std::complex<double>
|symm('L')-psymm('L')| = 4.08115e-16
|symm('R')-psymm('R')| = 4.92408e-16