We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eacbbf9 commit 26baba9Copy full SHA for 26baba9
1 file changed
QuantExt/test/computeenvironment.cpp
@@ -337,10 +337,15 @@ BOOST_AUTO_TEST_CASE(testRngGenerationTmp) {
337
338
double tol = settings.useDoublePrecision ? 1E-7 : 1E-3;
339
340
+ Size noErrors = 0, errorThreshold = 10;
341
for (Size j = 0; j < 2; ++j) {
342
for (Size i = 0; i < n; ++i) {
343
Real ref = sg.nextSequence().value[0];
- BOOST_CHECK_SMALL(output[j][i] - ref, tol);
344
+ if(std::abs(output[j][i] - ref) > tol && noErrors < errorThreshold) {
345
+ BOOST_ERROR("gpu value (" << output[j][i] << ") at j=" << j << ", i=" << i
346
+ << " does not match cpu value (" << ref << ")");
347
+ noErrors++;
348
+ }
349
}
350
351
0 commit comments