28 src.materialize_to_uninitialized(range, dst);
41 dst.slice(range).copy_from(src.slice(range));
62 const int64_t grain_size = 4096)
66 [&](
const int64_t i) { dst[i] = src[i]; });
72template<
typename T,
typename IndexT>
76 const int64_t grain_size = 4096)
80 for (const int64_t i : range) {
81 dst[indices[i]] = src[i];
90 const int64_t grain_size = 4096)
94 indices.foreach_index_optimized<
int64_t>(
119 const int64_t grain_size = 4096)
122 threading::parallel_for(indices.index_range(), grain_size, [&](
const IndexRange range) {
123 src.materialize_compressed_to_uninitialized(indices.slice(range), dst.slice(range));
130template<
typename T,
typename IndexT>
134 const int64_t grain_size = 4096)
137 indices.foreach_segment(
GrainSize(grain_size),
139 for (
const int64_t i : segment.index_range()) {
140 dst[segment_pos + i] = src[segment[i]];
148template<
typename T,
typename IndexT>
152 const int64_t grain_size = 4096)
155 threading::parallel_for(indices.index_range(), grain_size, [&](
const IndexRange range) {
156 for (const int64_t i : range) {
157 dst[i] = src[indices[i]];
165template<
typename T,
typename IndexT>
169 const int64_t grain_size = 4096)
173 threading::parallel_for(indices.index_range(), grain_size, [&](
const IndexRange range) {
174 for (const int64_t i : range) {
175 dst[i] = src[indices[i]];
189 dst.
slice(dst_offsets[dst_i]).copy_from(src.
slice(src_offsets[src_i]));
212 dst.
slice(dst_offsets[dst_i]).fill(src[src_i]);
275 if (span[i - 1] == value && span[i] != value) {
276 ranges.append(IndexRange::from_end_size(i, length));
279 else if (span[i] == value) {
284 ranges.append(IndexRange::from_end_size(span.
size(), length));
295 std::iota(span.
begin(), span.
end(), start);
301 for (
const int i : indices.index_range()) {
302 if (all_values[indices[i]] != values[i]) {
constexpr IndexRange drop_front(int64_t n) const
constexpr int64_t size() const
constexpr MutableSpan slice(const int64_t start, const int64_t size) const
constexpr T * end() const
constexpr T * begin() const
constexpr Span slice(int64_t start, int64_t size) const
constexpr const T & first() const
constexpr int64_t size() const
constexpr IndexRange index_range() const
constexpr bool is_empty() const
IndexRange index_range() const
void materialize_compressed(const IndexMask &mask, MutableSpan< T > r_span) const
void foreach_index(Fn &&fn) const
void copy(const GVArray &src, GMutableSpan dst, int64_t grain_size=4096)
void scatter(const Span< T > src, const Span< IndexT > indices, MutableSpan< T > dst, const int64_t grain_size=4096)
void copy_group_to_group(OffsetIndices< int > src_offsets, OffsetIndices< int > dst_offsets, const IndexMask &selection, GSpan src, GMutableSpan dst)
Vector< IndexRange > find_all_ranges(const Span< T > span, const T &value)
bool indexed_data_equal(const Span< T > all_values, const Span< int > indices, const Span< T > values)
BooleanMix booleans_mix_calc(const VArray< bool > &varray, IndexRange range_to_check)
void fill_index_range(MutableSpan< T > span, const T start=0)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
void devirtualize_varray(const VArray< T > &varray, const Func &func, bool enable=true)