![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Boolean reduction algorithm for checking if all elements are non-zero. More...
Go to the source code of this file.
Namespaces | |
| namespace | shamalgs |
| namespace to contain everything implemented by shamalgs | |
| namespace | shamalgs::primitives |
| namespace for primitive algorithm (e.g. sort, scan, reductions, ...) | |
Functions | |
| template<class T> | |
| bool | shamalgs::primitives::is_all_true (sycl::buffer< T > &buf, u32 cnt) |
| Check if all elements in a sycl::buffer are non-zero. | |
| template<class T> | |
| bool | shamalgs::primitives::is_all_true (sham::DeviceBuffer< T > &buf, u32 cnt) |
| Check if all elements in a sham::DeviceBuffer are non-zero. | |
Boolean reduction algorithm for checking if all elements are non-zero.
This header provides parallel algorithms to check if all elements in a buffer are non-zero (logically true). The functions perform a boolean reduction operation across the entire buffer, returning true only if every element satisfies the non-zero condition.
The algorithms come in two variants:
Definition in file is_all_true.hpp.