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

Function transform

include/hipSYCL/algorithms/algorithm.hpp:128–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126
127template <class ForwardIt1, class ForwardIt2, class UnaryOperation>
128sycl::event transform(sycl::queue &q, ForwardIt1 first1, ForwardIt1 last1,
129 ForwardIt2 d_first, UnaryOperation unary_op,
130 const std::vector<sycl::event> &deps = {}) {
131 if(first1 == last1)
132 return sycl::event{};
133 return q.parallel_for(sycl::range{std::distance(first1, last1)}, deps,
134 [=](sycl::id<1> id) {
135 auto input = first1;
136 auto output = d_first;
137 std::advance(input, id[0]);
138 std::advance(output, id[0]);
139 *output = unary_op(*input);
140 });
141}
142
143template <class ForwardIt1, class ForwardIt2, class ForwardIt3,
144 class BinaryOperation>

Callers 15

transform_reduceFunction · 0.70
findFunction · 0.70
find_ifFunction · 0.70
find_if_notFunction · 0.70
find_endFunction · 0.70
find_first_ofFunction · 0.70
is_sorted_untilFunction · 0.70
getEnvironmentVariableFunction · 0.50
fixSingleSubCfgValuesMethod · 0.50
formSubCfgsFunction · 0.50

Calls 1

parallel_forMethod · 0.45

Tested by 1

test_callFunction · 0.40