MCPcopy Create free account
hub / github.com/boostorg/compute / set_range

Method set_range

include/boost/compute/algorithm/replace.hpp:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 void set_range(Iterator first, Iterator last)
34 {
35 m_count = detail::iterator_range_size(first, last);
36
37 *this <<
38 "const uint i = get_global_id(0);\n" <<
39 "if(" << first[var<cl_uint>("i")] << " == " << var<T>("old_value") << ")\n" <<
40 " " << first[var<cl_uint>("i")] << '=' << var<T>("new_value") << ";\n";
41 }
42
43 void set_old_value(const T &old_value)
44 {

Callers 1

replaceFunction · 0.45

Calls 1

iterator_range_sizeFunction · 0.85

Tested by

no test coverage detected