mirror of
https://github.com/CNugteren/CLBlast.git
synced 2024-07-15 19:05:44 +02:00
Fixes for compilation of the tests under Visual Studio 2015
This commit is contained in:
parent
c5730c8b43
commit
942912daeb
|
@ -145,8 +145,8 @@ void TestBlas<T,U>::TestRegular(std::vector<Arguments<U>> &test_vector, const st
|
||||||
if (!TestSimilarity(result1[index], result2[index])) {
|
if (!TestSimilarity(result1[index], result2[index])) {
|
||||||
errors++;
|
errors++;
|
||||||
if (verbose_) {
|
if (verbose_) {
|
||||||
if (get_id2_(args) == 1) { fprintf(stdout, "\n Error at index %lu: ", id1); }
|
if (get_id2_(args) == 1) { fprintf(stdout, "\n Error at index %zu: ", id1); }
|
||||||
else { fprintf(stdout, "\n Error at %lu,%lu: ", id1, id2); }
|
else { fprintf(stdout, "\n Error at %zu,%zu: ", id1, id2); }
|
||||||
std::cout << result1[index];
|
std::cout << result1[index];
|
||||||
fprintf(stdout, " (reference) versus ");
|
fprintf(stdout, " (reference) versus ");
|
||||||
std::cout << result2[index];
|
std::cout << result2[index];
|
||||||
|
|
|
@ -333,8 +333,8 @@ bool TestSimilarity(const T val1, const T val2) {
|
||||||
const auto difference = std::fabs(val1 - val2);
|
const auto difference = std::fabs(val1 - val2);
|
||||||
|
|
||||||
// Set the allowed error margin for floating-point comparisons
|
// Set the allowed error margin for floating-point comparisons
|
||||||
constexpr auto kErrorMarginRelative = T{0.025};
|
constexpr auto kErrorMarginRelative = T(0.025);
|
||||||
constexpr auto kErrorMarginAbsolute = T{1.0e-4};
|
constexpr auto kErrorMarginAbsolute = T(1.0e-4);
|
||||||
|
|
||||||
// Shortcut, handles infinities
|
// Shortcut, handles infinities
|
||||||
if (val1 == val2) {
|
if (val1 == val2) {
|
||||||
|
|
Loading…
Reference in a new issue