75 ConstMemoryView buffer,
76 MutableMemoryView var_value)
override
78 RunQueue* q = (m_queue.isNull()) ? nullptr : &m_queue;
79 buffer.copyToIndexes(var_value, indexes, q);
83 MutableMemoryView buffer,
84 ConstMemoryView var_value)
override
86 RunQueue* q = (m_queue.isNull()) ? nullptr : &m_queue;
87 buffer.copyFromIndexes(var_value, indexes, q);
91 void setRunQueue(
const RunQueue& queue)
override { m_queue = queue; }
101class TableBufferCopier
111 ConstMemoryView buffer,
112 MutableMemoryView var_value)
override
115 _buildFinalIndexes(final_indexes, indexes);
116 m_base_copier.copyFromBufferAsync(final_indexes, buffer, var_value);
120 MutableMemoryView buffer,
121 ConstMemoryView var_value)
override
124 _buildFinalIndexes(final_indexes, indexes);
125 m_base_copier.copyToBufferAsync(final_indexes, buffer, var_value);
127 void barrier()
override { m_base_copier.barrier(); }
129 void setRunQueue(
const RunQueue& queue)
override { m_base_copier.setRunQueue(queue); }
133 GroupIndexTable* m_table;
134 DirectBufferCopier m_base_copier;
138 void _buildFinalIndexes(Array<Int32>& final_indexes, ConstArrayView<Int32> orig_indexes)
141 GroupIndexTable& table = *m_table;
142 Int32 n = orig_indexes.size();
143 final_indexes.resize(n);
144 for (Int32 i = 0; i < n; ++i)
145 final_indexes[i] = table[orig_indexes[i]];