Improve math_brute_force kernels by consistently using size_t to store
the result of get_global_id().
Signed-off-by: Marco Antognini <marco.antognini@arm.com>
* Reduce differences between files
This will help reduce code duplication is future commits.
Some code is moved around, some variables are renamed and some
statements are slightly altered to reduce differences between files in
math_brute_force, yet the semantics remains the same.
The differences were identified using n-way diffs. Many differences
remain however.
Signed-off-by: Marco Antognini <marco.antognini@arm.com>
* Workaround clang-format limitation
Introduces some insignificant spaces to force clang-format to reduce the
indentation and reduce differences between files.
Signed-off-by: Marco Antognini <marco.antognini@arm.com>
* Restored the embedded reduction factor to bruteforce.
This change was present on the GitLab branch but missed out during the transition to GitHub.
This change is intentionally as close as possible to the patch on GitLab.
Fixes#1045
* Added helper functions for bruteforce step and scale.
* Added missing files from 1e4d19b.
* Renamed getTestScale and getTestStep to set*.
* The global variable `gTestFastRelaxed` has state which is used to
control the behaviour of the compiler flag `-cl-fast-relaxed-math` and
the precision testing of relaxed, fp32 and fp64 types. This is confusing
since the global variable is being set and read in different translation
units, making it very difficult to reason about the logic of the brute
force framework. It is particular difficult to follow since the global
variables is cached and then turned off in the case of fp32 and f64 in
order to use the same code path as relaxed testing, after it is then
turned back on.
* Remove uses of the global variable outside of `main.cpp` (the global
variable remains in use within `main.cpp` since it is a command line
option and used to turn of relaxed testing completely). Replace all uses
of the global variable with boolean `relaxedMode` which is passed as a
function paramter but replaces `gTestFastRelaxed` semantically.