31 #include <tests/myratest.h> 41 myra::out() << typestring<Number>() << std::endl;
47 auto options = Options::create().set_nthreads(4).set_blocksize(128);
51 auto P_serial = getrf_inplace(A_serial);
52 swap_rows(P_serial,X_serial);
53 trsm_inplace(
'L',
'L',
'N', A_serial, X_serial,
'U');
54 trsm_inplace(
'L',
'U',
'N', A_serial, X_serial,
'N');
55 Precision e_serial = frobenius(gemm(A,X_serial)-B) / frobenius(B);
60 swap_rows(P_parallel,X_parallel);
61 ptrsm_inplace(
'L',
'L',
'N', A_parallel, X_parallel,
'U', one, options);
62 ptrsm_inplace(
'L',
'U',
'N', A_parallel, X_parallel,
'N', one, options);
63 Precision e_parallel = frobenius(gemm(A,X_parallel)-B) / frobenius(B);
65 myra::out() <<
" |U\\(L\\B)-X|, serial = " << e_serial << std::endl;
66 myra::out() <<
" |U\\(L\\B)-X|, parallel = " << e_parallel << std::endl;
67 REQUIRE(e_serial < tolerance);
68 REQUIRE(e_parallel < tolerance);
73 ADD_TEST(
"pgetrf_panel",
"[pdense][parallel]")
77 test<NumberS> (I,J,1.0e-2f);
78 test<NumberD> (I,J,1.0e-8);
79 test<NumberC> (I,J,1.0e-2f);
80 test<NumberZ> (I,J,1.0e-8);
Interface class for representing subranges of dense Matrix's.
std::vector< int > pgetrf_panel(const MatrixRange< NumberS > &A, pdense::Options options=pdense::Options::create())
Overwrites A with its P'*L*U factorization, returns pivoting data P_swaps.
Definition: pgetrf_panel.cpp:234
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.
Routines for backsolving by a triangular Matrix or LowerMatrix.
Various utility functions/classes related to scalar Number types.
Routines related to swap sequences, often used during pivoting.
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
Thread-parallel version of dense/gemm.h, Matrix*Matrix multiplication.
Variety of routines all for dense Matrix*Matrix multiplies. Delegates to the BLAS.
General purpose A = P'*L*U decomposition for square Matrix's.
Thread-parallel versions of dense/getrf.h, LU decomposition of a Matrix.
Interface class for representing subranges of contiguous int's.
float
|U\(L\B)-X|, serial = 0.000130138
|U\(L\B)-X|, parallel = 0.00011818
double
|U\(L\B)-X|, serial = 1.33025e-12
|U\(L\B)-X|, parallel = 9.95725e-13
std::complex<float>
|U\(L\B)-X|, serial = 0.000420585
|U\(L\B)-X|, parallel = 0.000345114
std::complex<double>
|U\(L\B)-X|, serial = 3.17941e-13
|U\(L\B)-X|, parallel = 1.9939e-13