50 const IndT *ind =
nullptr;
52 char **chcs =
nullptr;
54 const IndOutIndexerT ind_out_indexer;
55 const ChoicesIndexerT chcs_indexer;
62 const IndOutIndexerT &ind_out_indexer_,
63 const ChoicesIndexerT &chcs_indexer_)
64 : ind(ind_), dst(dst_), chcs(chcs_), n_chcs(n_chcs_),
65 ind_out_indexer(ind_out_indexer_), chcs_indexer(chcs_indexer_)
69 void operator()(sycl::id<1>
id)
const
71 const ProjectorT proj{};
75 auto ind_dst_offsets = ind_out_indexer(i);
76 ssize_t ind_offset = ind_dst_offsets.get_first_offset();
77 ssize_t dst_offset = ind_dst_offsets.get_second_offset();
79 IndT chc_idx = ind[ind_offset];
81 ssize_t projected_idx = proj(n_chcs, chc_idx);
83 ssize_t chc_offset = chcs_indexer(i, projected_idx);
85 T *chc =
reinterpret_cast<T *
>(chcs[projected_idx]);
87 dst[dst_offset] = chc[chc_offset];
98 ssize_t
const *_offsets,
99 ssize_t
const *_shape,
100 ssize_t
const *_strides)
101 : _ind(common_nd), nd(common_nd), offsets(_offsets), shape(_shape),
106 template <
typename nT>
107 size_t operator()(ssize_t gid, nT n)
const
109 ssize_t relative_offset(0);
110 _ind.get_displacement<
const ssize_t *,
const ssize_t *>(
111 gid, shape, strides + (n * nd), relative_offset);
113 return relative_offset + offsets[n];
117 CIndexer_vector<ssize_t> _ind;
120 ssize_t
const *offsets;
121 ssize_t
const *shape;
122 ssize_t
const *strides;