Source: tests/iterative/DifferenceAction.cpp
23 #include <tests/myratest.h> 35 auto C2 = make_GemmAction(A) - make_GemmAction(B);
36 Precision error = frobenius(C1-C2.make_Matrix());
37 myra::out() <<
"|(A-B)[dense] - (A-B)[action]| = " << error << std::endl;
38 REQUIRE(error < tolerance);
43 ADD_TEST(
"DifferenceAction",
"[iterative]")
45 test<NumberS>(1.0e-4f);
46 test<NumberD>(1.0e-12);
47 test<NumberC>(1.0e-4f);
48 test<NumberZ>(1.0e-12);
Interface class for representing subranges of dense Matrix's.
Composes two Action's A and B, yielding an Action that applies (A-B)*X.
Applies the "Action" of a linear operator, b := A*x, used in iterative solution algorithms.
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
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
An Action for multiplying by a dense Matrix or SparseMatrix using gemm().
Results: [PASS]
|(A-B)[dense] - (A-B)[action]| = 0
|(A-B)[dense] - (A-B)[action]| = 0
|(A-B)[dense] - (A-B)[action]| = 0
|(A-B)[dense] - (A-B)[action]| = 0
Go back to Summary of /test programs.