31 #include <tests/myratest.h>    38 template<
class Precision> 
void test(
int I, 
int J, Precision tolerance)
    40   typedef std::complex<Precision> Number;
    41   myra::out() << typestring<Number>() << std::endl;
    45   Number alpha = random<Number>();
    46   Number beta  = random<Number>();
    50   auto options = Options::create().set_nthreads(4).set_blocksize(128);
    56     hemm_inplace(
'L', C1, L, B, alpha, beta);
    57     phemm_inplace(
'L', C2, L, B, alpha, beta, options);
    58     Precision error = frobenius(C1-C2)/frobenius(C1);
    59     myra::out() << 
"  |hemm('L')-phemm('L')| = " << error << std::endl;
    60     REQUIRE(error < tolerance);
    67     hemm_inplace(
'R', C1, L, B, alpha, beta);
    68     phemm_inplace(
'R', C2, L, B, alpha, beta, options);
    69     Precision error = frobenius(C1-C2)/frobenius(C1);
    70     myra::out() << 
"  |hemm('R')-phemm('R')| = " << error << std::endl;
    71     REQUIRE(error < tolerance);
    77 ADD_TEST(
"phemm2",
"[pdense][parallel]")
    81   test<float > (I,J,1.0e-4f);
    82   test<double> (I,J,1.0e-8);
 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. 
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
Routines for hermitian Matrix * dense Matrix multiplication. 
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 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. 
Returns a hermitian copy of a Matrix. The inplace version only works on a square operand. 
Simplistic random number functions. 
Stores a lower triangular matrix in rectangular packed format. 
Definition: conjugate.h:22
std::complex<float>
  |hemm('L')-phemm('L')| = 2.26573e-07
  |hemm('R')-phemm('R')| = 2.72961e-07
std::complex<double>
  |hemm('L')-phemm('L')| = 4.0634e-16
  |hemm('R')-phemm('R')| = 4.94636e-16