MCPcopy Create free account
hub / github.com/AdaptiveCpp/AdaptiveCpp / all_of

Function all_of

include/hipSYCL/algorithms/algorithm.hpp:809–824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

807
808template <class ForwardIt, class UnaryPredicate>
809sycl::event all_of(sycl::queue &q,
810 ForwardIt first, ForwardIt last, detail::early_exit_flag_t* out,
811 UnaryPredicate p, const std::vector<sycl::event>& deps = {}) {
812 std::size_t problem_size = std::distance(first, last);
813 if(problem_size == 0)
814 return sycl::event{};
815 auto evt = detail::early_exit_for_each(q, problem_size, out,
816 [=](sycl::id<1> idx) -> bool {
817 auto it = first;
818 std::advance(it, idx[0]);
819 return !p(*it);
820 }, deps);
821 return q.single_task(evt, [=](){
822 *out = static_cast<detail::early_exit_flag_t>(!(*out));
823 });
824}
825
826template <class ForwardIt, class UnaryPredicate>
827sycl::event any_of(sycl::queue &q,

Callers 4

arrayifyAllocasFunction · 0.50
test_all_ofFunction · 0.50
compile_and_store_statsFunction · 0.50

Calls 2

early_exit_for_eachFunction · 0.85
single_taskMethod · 0.45

Tested by 1

test_all_ofFunction · 0.40