Normalise sum result to mitigate errors with large iteration counts
This commit is contained in:
parent
210cfb7520
commit
579247dc06
@ -25,6 +25,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Clang compiler OpenMP flags corrected for NVIDIA target.
|
||||
- Reorder OpenCL objects in class so destructors are called in safe order.
|
||||
- Ensure all OpenCL kernels are present in destructor.
|
||||
- Normalise sum result by expected value to help false negative errors.
|
||||
|
||||
### Removed
|
||||
- Pre-building of kernels in SYCL version to ensure compatibility with SYCL 1.2.1.
|
||||
|
||||
2
main.cpp
2
main.cpp
@ -496,7 +496,7 @@ void check_solution(const unsigned int ntimes, std::vector<T>& a, std::vector<T>
|
||||
errB /= b.size();
|
||||
double errC = std::accumulate(c.begin(), c.end(), 0.0, [&](double sum, const T val){ return sum + fabs(val - goldC); });
|
||||
errC /= c.size();
|
||||
double errSum = fabs(sum - goldSum);
|
||||
double errSum = fabs((sum - goldSum)/goldSum);
|
||||
|
||||
double epsi = std::numeric_limits<T>::epsilon() * 100.0;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user