40 return *(
const GField *)field;
45 new (r_value)
GField(gfield);
52 void (*construct_from_value_)(
void *dst,
const void *value);
53 void (*construct_from_field_)(
void *dst,
GField field);
54 const void *(*get_value_ptr_)(
const void *value_or_field);
55 const GField *(*get_field_ptr_)(
const void *value_or_field);
56 bool (*is_field_)(
const void *value_or_field);
57 GField (*as_field_)(
const void *value_or_field);
65 construct_from_value_ = [](
void *dst,
const void *value_or_field) {
68 construct_from_field_ = [](
void *dst,
GField field) {
71 get_value_ptr_ = [](
const void *value_or_field) {
74 get_field_ptr_ = [](
const void *value_or_field) ->
const GField * {
77 is_field_ = [](
const void *value_or_field) {
80 as_field_ = [](
const void *value_or_field) ->
GField {
92 construct_from_value_(dst, value);
97 construct_from_field_(dst, field);
102 return get_value_ptr_(value_or_field);
108 return const_cast<void *
>(get_value_ptr_(value_or_field));
113 return get_field_ptr_(value_or_field);
118 return is_field_(value_or_field);
123 return as_field_(value_or_field);
129 #define MAKE_FIELD_CPP_TYPE(DEBUG_NAME, FIELD_TYPE) \
130 template<> const blender::CPPType &blender::CPPType::get_impl<blender::fn::Field<FIELD_TYPE>>() \
132 static blender::fn::FieldCPPType cpp_type{ \
133 blender::fn::FieldCPPTypeParam<blender::fn::Field<FIELD_TYPE>>(), STRINGIFY(DEBUG_NAME)}; \
137 const blender::CPPType &blender::CPPType::get_impl<blender::fn::ValueOrField<FIELD_TYPE>>() \
139 static blender::fn::ValueOrFieldCPPType cpp_type{ \
140 blender::fn::FieldCPPTypeParam<blender::fn::ValueOrField<FIELD_TYPE>>(), \
141 STRINGIFY(DEBUG_NAME##OrValue)}; \
static const CPPType & get()
const GField & get_gfield(const void *field) const
void construct_from_gfield(void *r_value, const GField &gfield) const
FieldCPPType(FieldCPPTypeParam< Field< T >>, StringRef debug_name)
const CPPType & base_type() const
void * get_value_ptr(void *value_or_field) const
const void * get_value_ptr(const void *value_or_field) const
ValueOrFieldCPPType(FieldCPPTypeParam< ValueOrField< T >>, StringRef debug_name)
void construct_from_field(void *dst, GField field) const
const CPPType & base_type() const
const GField * get_field_ptr(const void *value_or_field) const
GField as_field(const void *value_or_field) const
void construct_from_value(void *dst, const void *value) const
bool is_field(const void *value_or_field) const
SyclQueue void void size_t num_bytes void