Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
is_all_true.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
29#include "shambackends/sycl.hpp"
30
31namespace shamalgs::primitives {
32
66 template<class T>
67 bool is_all_true(sycl::buffer<T> &buf, u32 cnt);
68
100 template<class T>
101 bool is_all_true(sham::DeviceBuffer<T> &buf, u32 cnt);
102
104 namespace impl {
105
107 std::vector<shamalgs::impl_param> get_default_impl_list_is_all_true();
108
111
113 void set_impl_is_all_true(const std::string &impl, const std::string &param = "");
114
115 } // namespace impl
116
117} // namespace shamalgs::primitives
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
void set_impl_is_all_true(const std::string &impl, const std::string &param="")
Set the implementation for is_all_true.
std::vector< shamalgs::impl_param > get_default_impl_list_is_all_true()
Get list of available is_all_true implementations.
shamalgs::impl_param get_current_impl_is_all_true()
Get the current implementation for is_all_true.
namespace for primitive algorithm (e.g. sort, scan, reductions, ...)
bool is_all_true(sycl::buffer< T > &buf, u32 cnt)
Check if all elements in a sycl::buffer are non-zero.