Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/unit/alp_gemm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

using namespace alp;

static double tol = 1.e-7;

/**
* Initializes matrix elements to random values between 0 and 1.
* Assumes the matrix uses full storage.
Expand Down Expand Up @@ -199,7 +201,7 @@ void alp_program( const size_t &unit, alp::RC &rc ) {
const auto calculated_value = alp::internal::access( C, alp::internal::getStorageIndex( C, i, j ) );

// Compare and report
if( expected_value != calculated_value ) {
if( std::abs( expected_value - calculated_value ) > tol ) {
#ifndef NDEBUG
std::cerr << "Numerically incorrect: "
"at (" << i << ", " << j << ") "
Expand Down