26 #include <tests/myratest.h> 36 myra::out() << typestring<Number>() << std::endl;
39 Number alpha = random<Number>();
40 Number beta = random<Number>();
45 gemm_inplace(C1,A,
'N',A,
'T',alpha,beta);
46 syrk_inplace(C2,
'L',A,
'N',alpha,beta);
47 Precision error = frobenius(tril(C1-C2));
48 myra::out() <<
" |syrk('N')-gemm('N','T')| = " << error << std::endl;
49 REQUIRE(error < tolerance);
55 gemm_inplace(C1,A,
'T',A,
'N',alpha,beta);
56 syrk_inplace(C2,
'L',A,
'T',alpha,beta);
57 Precision error = frobenius(tril(C1-C2));
58 myra::out() <<
" |syrk('T')-gemm('T','N')| = " << error << std::endl;
59 REQUIRE(error < tolerance);
65 gemm_inplace(C1,A,
'C',A,
'H',alpha,beta);
66 syrk_inplace(C2,
'L',A,
'C',alpha,beta);
67 Precision error = frobenius(tril(C1-C2));
68 myra::out() <<
" |syrk('C')-gemm('C','H')| = " << error << std::endl;
69 REQUIRE(error < tolerance);
75 gemm_inplace(C1,A,
'H',A,
'C',alpha,beta);
76 syrk_inplace(C2,
'L',A,
'H',alpha,beta);
77 Precision error = frobenius(tril(C1-C2));
78 myra::out() <<
" |syrk('H')-gemm('H','C')| = " << error << std::endl;
79 REQUIRE(error < tolerance);
85 ADD_TEST(
"ssyrkL",
"[dense][blas]")
86 { test<NumberS>(57,24,1.0e-4f); }
88 ADD_TEST(
"dsyrkL",
"[dense][blas]")
89 { test<NumberD>(57,24,1.0e-8); }
91 ADD_TEST(
"csyrkL",
"[dense][blas]")
92 { test<NumberC>(57,24,1.0e-4f); }
94 ADD_TEST(
"zhsykL",
"[dense][blas]")
95 { test<NumberZ>(57,24,1.0e-8); }
Returns a conjugated copy of a Matrix or Vector. Or, conjugate one inplace.
Tabulates an IxJ matrix. Allows random access, has column major layout to be compatible with BLAS/LAP...
Definition: bdsqr.h:20
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
Returns a transposed copy of a Matrix. The inplace version only works on a square operand...
Returns the lower triangle of a dense Matrix.
Various utility functions/classes related to scalar Number types.
General purpose dense matrix container, O(i*j) storage.
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.
Simplistic random number functions.
Routines for symmetric rank-k updates, a specialized form of Matrix*Matrix multiplication.
Variety of routines all for dense Matrix*Matrix multiplies. Delegates to the BLAS.
std::complex<float>
|syrk('N')-gemm('N','T')| = 0
|syrk('T')-gemm('T','N')| = 0
|syrk('C')-gemm('C','H')| = 0
|syrk('H')-gemm('H','C')| = 0