Fixes for compilation of the tests under Visual Studio 2015

This commit is contained in:
CNugteren 2016-05-08 21:11:37 +02:00
parent c5730c8b43
commit 942912daeb
2 changed files with 4 additions and 4 deletions

View file

@ -145,8 +145,8 @@ void TestBlas<T,U>::TestRegular(std::vector<Arguments<U>> &test_vector, const st
if (!TestSimilarity(result1[index], result2[index])) {
errors++;
if (verbose_) {
if (get_id2_(args) == 1) { fprintf(stdout, "\n Error at index %lu: ", id1); }
else { fprintf(stdout, "\n Error at %lu,%lu: ", id1, id2); }
if (get_id2_(args) == 1) { fprintf(stdout, "\n Error at index %zu: ", id1); }
else { fprintf(stdout, "\n Error at %zu,%zu: ", id1, id2); }
std::cout << result1[index];
fprintf(stdout, " (reference) versus ");
std::cout << result2[index];

View file

@ -333,8 +333,8 @@ bool TestSimilarity(const T val1, const T val2) {
const auto difference = std::fabs(val1 - val2);
// Set the allowed error margin for floating-point comparisons
constexpr auto kErrorMarginRelative = T{0.025};
constexpr auto kErrorMarginAbsolute = T{1.0e-4};
constexpr auto kErrorMarginRelative = T(0.025);
constexpr auto kErrorMarginAbsolute = T(1.0e-4);
// Shortcut, handles infinities
if (val1 == val2) {