![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Boolean reduction algorithm for checking if all elements are non-zero. More...
#include "shamalgs/impl_utils.hpp"#include "shambackends/DeviceBuffer.hpp"#include "shambackends/sycl.hpp"
Include dependency graph for is_all_true.hpp:
This graph shows which files directly or indirectly include this file: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, ...) | |
| namespace | shamalgs::primitives::impl |
| namespace to control implementation behavior | |
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. | |
| std::vector< shamalgs::impl_param > | shamalgs::primitives::impl::get_default_impl_list_is_all_true () |
| Get list of available is_all_true implementations. | |
| shamalgs::impl_param | shamalgs::primitives::impl::get_current_impl_is_all_true () |
| Get the current implementation for is_all_true. | |
| void | shamalgs::primitives::impl::set_impl_is_all_true (const std::string &impl, const std::string ¶m="") |
| Set the implementation for is_all_true. | |
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:
is_all_true for sycl::buffer: Direct buffer-based processingis_all_true for sham::DeviceBuffer: USM-based processing Definition in file is_all_true.hpp.