17 Commits

Author SHA1 Message Date
Marcin Hajder
6506421614 Added support for cl_ext_float_atomics in CBasicTestFetchMinSpecialFloats with atomic_float (#2391)
Related to #2142, according to the work plan, extending
CBasicTestFetchMinSpecialFloats with support for atomic_float.
2026-03-10 08:41:40 -07:00
Yilong Guo
119af24d54 c11_atomics: unify host half representation and conversion with wrapper class (#2503)
Introduce `HostHalf` wrapper class to eliminate explicit
`cl_half_from_float`
and `cl_half_to_float` conversions throughout the test code. The wrapper
provides semantic value constructors/operators and automatic
conversions,
simplifying half-precision arithmetic operations.

Key improvements:
- `HostHalf` class with operator overloading for arithmetic and
comparisons
- Type traits `is_host_atomic_fp_v` and `is_host_fp_v` for generic FP
handling
- Unified floating-point atomic operations (add/sub/min/max/exchange)
- Removed 300+ lines of half-specific conditional branches
- Consistent calculation for all FP types
2025-12-16 08:37:33 -08:00
Marcin Hajder
0cca0ee869 Added support for cl_ext_float_atomics in CBasicTestFetchSub with atomic_double (#2368)
Related to #2142, according to the work plan, extending
CBasicTestFetchSub with support for atomic_double.
2025-12-02 08:39:16 -08:00
Marcin Hajder
d0aa95be2f Added support for cl_ext_float_atomics in CBasicTestFetchSub with atomic_float (#2367)
Related to #2142, according to the work plan, extending
CBasicTestFetchSub with support for atomic_float.
2025-10-28 08:41:24 -07:00
Marcin Hajder
52ba127f79 Added support for cl_ext_float_atomics in CBasicTestFetchMin/Max with atomic_double (#2361)
Related to #2142, according to the work plan, extending
CBasicTestFetchMin/CBasicTestFetchMax with support for atomic_double.
2025-10-28 08:40:13 -07:00
Marcin Hajder
62972418c3 Added support for cl_ext_float_atomics in CBasicTestFetchAdd with atomic_half (#2350)
Related to https://github.com/KhronosGroup/OpenCL-CTS/issues/2142,
according to the work plan, extending CBasicTestFetchAdd with support
for atomic_half.

I wasn't able to test that PR completely due to missing
`CL_DEVICE_LOCAL_FP_ATOMIC_ADD_EXT`/`CL_DEVICE_GLOBAL_FP_ATOMIC_ADD_EXT`
capabilities for atomic_half. I appreciate reviewers' attention, thanks.
2025-10-22 07:01:48 -07:00
Marcin Hajder
940c8bb973 Added support for cl_ext_float_atomics in CBasicTestFetchMin/Max with atomic_half (#2357)
Related to #2142, according to the work plan, extending
CBasicTestFetchMin/CBasicTestFetchMax with support for atomic_half.
2025-10-21 08:43:05 -07:00
Marcin Hajder
51445f3743 Added support for cl_ext_float_atomics in CBaseTestFetchAdd with atomic_double (#2347)
Related to https://github.com/KhronosGroup/OpenCL-CTS/issues/2142,
according to the work plan, extending CBasicTestFetchAdd with support
for atomic_double.
2025-10-07 08:42:02 -07:00
Marcin Hajder
df61cad39f Added support for cl_ext_float_atomics in CBasicTestFetchMin/Max with atomic_float (#2353)
Related to #2142, according to the work plan, extending
`CBasicTestFetchMin`/`CBasicTestFetchMax` with support for atomic_float.
2025-09-09 08:45:35 -07:00
Marcin Hajder
1aeca1360b Added support for cl_ext_float_atomics in CBasicTestFetchSub with atomic_half (#2366)
Related to #2142, according to the work plan, extending
CBasicTestFetchSub with support for atomic_half.

I wasn't able to test that PR entirely due to missing
CL_DEVICE_LOCAL_FP_ATOMIC_ADD_EXT/CL_DEVICE_GLOBAL_FP_ATOMIC_ADD_EXT
capabilities for atomic_half. I appreciate reviewers' attention, thanks.
2025-09-09 08:40:50 -07:00
Marcin Hajder
fbba22770d Added support for cl_ext_float_atomics in CBasicTestFetchAdd with atomic_float (#2345)
Related to #2142, according to the work plan, extending
CBasicTestFetchAdd with support for atomic_float.
2025-09-02 08:38:56 -07:00
Marcin Hajder
b79a8a2f42 Added support for cl_ext_float_atomics in c11_atomics load test along with atomic_half type (#2297)
Related to #2142, according to the work plan, extending CBasicTestLoad
with support for atomic_half.
2025-06-10 08:43:02 -07:00
Marcin Hajder
dec5644112 Added support for cl_ext_float_atomics in c11_atomics store test along with atomic_half type (#2293)
Related to #2142, according to the work plan extended `CBasicTestStore`
with support for `atomic_half`.

Optimization remark: in tests related to `CBasicTestStore` kernel source
code is mostly composed with arguments following similar pattern:

`__kernel void test_atomic_kernel(uint threadCount, uint numDestItems,
__global int *finalDest, __global int *oldValues, volatile __local
atomic_int *destMemory)`

`oldValues` buffer is initialized with a host pointer, after kernel
execution it is read back to the host pointer but it is unused in
neither of the kernels I verified.
2025-05-27 08:51:36 -07:00
Sven van Haastregt
ea6e536ed3 c11_atomics: align signedness of host types (#1816)
Some `HOST_` types were declared with signedness different from the
`HOST_ATOMIC_` counterparts, leading to sign-compare warnings when
comparing between types.  Fix by aligning the signedness.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-11-14 09:09:45 -08:00
Sven van Haastregt
475a37abbf [NFC] Do not use reserved names for include guards (#1737)
Names that begin with an underscore followed by an uppercase letter
are reserved for the C++ implementation.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2023-06-09 11:25:20 +01:00
Kevin Petit
ef832c330c Stop using ../../test_common to include common headers
Fixes #395.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-01 18:41:12 +01:00
Kedar Patil
2821bf1323 Initial open source release of OpenCL 2.2 CTS. 2017-05-16 18:44:33 +05:30