48 const IndT *ind =
nullptr;
50 char **chcs =
nullptr;
52 const IndOutIndexerT ind_out_indexer;
53 const ChoicesIndexerT chcs_indexer;
60 const IndOutIndexerT &ind_out_indexer_,
61 const ChoicesIndexerT &chcs_indexer_)
62 : ind(ind_), dst(dst_), chcs(chcs_), n_chcs(n_chcs_),
63 ind_out_indexer(ind_out_indexer_), chcs_indexer(chcs_indexer_)
67 void operator()(sycl::id<1>
id)
const
69 const ProjectorT proj{};
73 auto ind_dst_offsets = ind_out_indexer(i);
74 ssize_t ind_offset = ind_dst_offsets.get_first_offset();
75 ssize_t dst_offset = ind_dst_offsets.get_second_offset();
77 IndT chc_idx = ind[ind_offset];
79 ssize_t projected_idx = proj(n_chcs, chc_idx);
81 ssize_t chc_offset = chcs_indexer(i, projected_idx);
83 T *chc =
reinterpret_cast<T *
>(chcs[projected_idx]);
85 dst[dst_offset] = chc[chc_offset];
96 ssize_t
const *_offsets,
97 ssize_t
const *_shape,
98 ssize_t
const *_strides)
99 : _ind(common_nd), nd(common_nd), offsets(_offsets), shape(_shape),
104 template <
typename nT>
105 size_t operator()(ssize_t gid, nT n)
const
107 ssize_t relative_offset(0);
108 _ind.get_displacement<
const ssize_t *,
const ssize_t *>(
109 gid, shape, strides + (n * nd), relative_offset);
111 return relative_offset + offsets[n];
115 CIndexer_vector<ssize_t> _ind;
118 ssize_t
const *offsets;
119 ssize_t
const *shape;
120 ssize_t
const *strides;