| 33 | {} |
| 34 | |
| 35 | void set_range(InputIterator first, |
| 36 | InputIterator last, |
| 37 | MapIterator map, |
| 38 | OutputIterator result) |
| 39 | { |
| 40 | m_count = iterator_range_size(first, last); |
| 41 | m_input_offset = first.get_index(); |
| 42 | m_output_offset = result.get_index(); |
| 43 | |
| 44 | m_input_offset_arg = add_arg<uint_>("input_offset"); |
| 45 | m_output_offset_arg = add_arg<uint_>("output_offset"); |
| 46 | |
| 47 | *this << |
| 48 | "const uint i = get_global_id(0);\n" << |
| 49 | "uint i1 = " << map[expr<uint_>("i")] << |
| 50 | " + output_offset;\n" << |
| 51 | "uint i2 = i + input_offset;\n" << |
| 52 | result[expr<uint_>("i1")] << "=" << |
| 53 | first[expr<uint_>("i2")] << ";\n"; |
| 54 | } |
| 55 | |
| 56 | event exec(command_queue &queue) |
| 57 | { |
no test coverage detected