Commit Graph

15 Commits

Author SHA1 Message Date
Marco Antognini
70b2492f30 Regroup vtbl definitions to one translation unit (#1167)
Move function declarations to a new header file, with relevant existing
documentation.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-02-18 10:06:37 +00:00
Marco Antognini
7181bcdbac Rename files for consistency (#1166)
Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-02-17 17:05:09 +00:00
Marco Antognini
5d2a4bc522 Reduce difference between files (#1155)
Moves `if (!gSkipCorrectnessTesting)` in binary_i.cpp to follow
structure of binary.cpp, unary.cpp, macro_unary.cpp and
macro_binary.cpp.

Other non-semantic changes include adding/removing new lines and
updating comments.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-02-17 09:17:34 +00:00
Marco Antognini
5d7be40e68 Remove undesired conversions from size_t to int (#1153)
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>
2021-02-11 11:37:38 +00:00
Marco Antognini
8ad1088af9 Reduce difference between files in math_brute_force (#1138)
* 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>
2021-02-10 10:38:31 +00:00
Marco Antognini
545e4d0309 Make functions local to translation unit (#1125)
Remove unnecessary declarations.

Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-01-29 14:20:39 +00:00
Marco Antognini
e5f89249fa Apply clang-format on math_brute_force (#1104)
Signed-off-by: Marco Antognini <marco.antognini@arm.com>
2021-01-14 13:27:18 +00:00
Jeremy Kemp
904fb419ee Restored the embedded reduction factor to bruteforce. (#1052)
* 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*.
2021-01-07 11:34:58 +00:00
alan-baker
b7adaa5c3b Add more relaxed math conformance tests (#1079)
* Add relaxed tests for functions (in an implementation that uses
  derived functions) that define an absolute ULP error requirement, but
  were not tested in the current conformance suite
  * acos
  * asin
  * atan
  * cospi
  * sinpi
  * log10
2020-12-09 16:12:19 +00:00
Sreelakshmi Haridas Maruthur
6b1e61f9de bruteforce: Fix out-of-domain input handling in bruteforce (#699)
Cast input array to floats before setting NANs which are also floats to
prevent large nonsensical numbers outside of the valid domains of
several math functions from being tested.

Khronos Bug: https://github.com/KhronosGroup/OpenCL-CTS/issues/491

Test Suite Affected: bruteforce Subtests: sin, cos, sincos, reciprocal

Change-Id: Ie029837f4f9dfc73d6a9c356b73158e2ad41b871
2020-09-06 08:57:27 +01:00
Jeremy Kemp
93001e99a4 Bruteforce - embedded, relaxed ulp requirements (#839)
* Add embedded profile ULP requiremnts for relaxed tests.

* Fixed exp relaxed ULP for embedded.

* Added a utility function, getAllowedUlpError, for determining FP32 ULP.

* Collection of requested changes from PR.

Re-named float_embedded_relaxed_ulps -> relaxed_embedded_error.

Re-ordered Func struct members.
2020-08-10 13:19:26 +01:00
Grzegorz Wawiorko
782fe2c83b Test bruteforce - fix relaxedMode in unary.cpp (#818) 2020-06-10 16:36:45 +01:00
Jack Frankland
ecee2c18d2 Remove gTestFastRelaxed Dependencies in Brute Force (#807)
* 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.
2020-06-04 10:44:39 +01:00
Ankit Goyal
4fbcd96e7f Remove "C" linkages (#781)
* Remove extern C linkages

* Update crc32 to cpp and remove extern C linkage
2020-05-20 14:16:19 +01:00
James Price
40f50d77a3 Rename test .c sources to .cpp where necessary (#604)
Remove hacks to force language from CMake files.

Closes KhronosGroup/OpenCL-CTS#25
2020-02-21 17:34:31 +00:00