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
26
29#include "shambackends/sycl.hpp"
30#include <string>
31#include <vector>
32
33namespace shamalgs::primitives {
34
68 template<class T>
69 bool is_all_true(sycl::buffer<T> &buf, u32 cnt);
70
102 template<class T>
103 bool is_all_true(sham::DeviceBuffer<T> &buf, u32 cnt);
104
106 namespace impl {
107
109 std::vector<std::string> get_default_impl_list_is_all_true();
110
112 std::string get_current_impl_is_all_true();
113
116
118 void set_impl_is_all_true(const std::string &impl);
119
121 void autoselect_impl_is_all_true(const sham::DeviceScheduler_ptr &dev_sched);
122
123 } // namespace impl
124
125} // namespace shamalgs::primitives
std::uint32_t u32
32 bit unsigned integer
namespace to control implementation behavior
bool is_impl_set_is_all_true()
Check if an implementation has been selected for is_all_true.
void autoselect_impl_is_all_true(const sham::DeviceScheduler_ptr &dev_sched)
Select the default implementation for is_all_true.
void set_impl_is_all_true(const std::string &impl)
Set the implementation for is_all_true, from a config json string.
std::string get_current_impl_is_all_true()
Get the current implementation for is_all_true, as a config json string.
std::vector< std::string > get_default_impl_list_is_all_true()
Get list of available is_all_true implementations, as config json strings.
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.