22 struct OutputPointerInfo {
36 bool is_evaluated_ =
false;
38 std::optional<Field<bool>> selection_field_;
44 : context_(context), mask_(*
mask)
50 : context_(context), mask_(scope_.construct<
IndexMask>(size))
70 selection_field_ = std::move(selection);
114 const int field_index = fields_to_evaluate_.append_and_get_index(std::move(field));
115 dst_varrays_.append({});
116 output_pointer_infos_.append(OutputPointerInfo{
118 *
static_cast<VArray<T> *
>(dst) = varray.typed<
T>();
125 const int field_index = fields_to_evaluate_.append_and_get_index(std::move(field));
126 dst_varrays_.append({});
127 output_pointer_infos_.append(OutputPointerInfo{
147 return evaluated_varrays_[field_index];
VArray< T > typed() const
static VMutableArray from_span(MutableSpan< T > values)
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
int add(Field< T > field, VArraySpan< T > *varray_span_ptr)
FieldEvaluator(const FieldContext &context, const int64_t size)
FieldEvaluator(const FieldContext &context, const IndexMask *mask)
void set_selection(Field< bool > selection)
int add(GField field, GVArray *varray_ptr)
IndexMask get_evaluated_as_mask(int field_index)
int add(Field< T > field, VArray< T > *varray_ptr)
IndexMask get_evaluated_selection_as_mask() const
int add_with_destination(Field< T > field, MutableSpan< T > dst)
VArray< T > get_evaluated(const int field_index) const
int add_with_destination(GField field, GVMutableArray dst)
const GVArray & get_evaluated(const int field_index) const
const IndexMask & evaluation_mask() const
int add_with_destination(Field< T > field, VMutableArray< T > dst)
Vector< GVArray > evaluate_fields(ResourceScope &scope, Span< GFieldRef > fields_to_evaluate, const IndexMask &mask, const FieldContext &context, Span< GVMutableArray > dst_varrays={})
GField make_field_constant_if_possible(GField field)
void evaluate_constant_field(const GField &field, void *r_value)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)