11 #ifndef __GA_AIFMath__
12 #define __GA_AIFMath__
103 #define GA_MATH_SPEC_BINARY_PURE(NAME) \
104 virtual bool NAME(GA_Attribute &d, GA_Offset di, \
105 const GA_Attribute &a, GA_Offset ai, \
106 fpreal b, int component=-1) const = 0; \
107 virtual bool NAME(GA_Attribute &d, GA_Offset di, \
108 const GA_Attribute &a, GA_Offset ai, \
109 const fpreal32 *b, int tuple_size, \
110 int component=-1) const = 0; \
111 virtual bool NAME(GA_Attribute &d, GA_Offset di, \
112 const GA_Attribute &a, GA_Offset ai, \
113 const fpreal64 *b, int tuple_size, \
114 int component=-1) const = 0; \
115 virtual bool NAME(GA_Attribute &d, GA_Offset di, \
116 const GA_Attribute &a, GA_Offset ai, \
117 const GA_Attribute &b, GA_Offset bi, \
118 int component=-1) const = 0;
121 #define GA_MATH_SPEC_BINARY(NAME) \
122 bool NAME(GA_Attribute &d, GA_Offset di, \
123 const GA_Attribute &a, GA_Offset ai, \
124 fpreal b, int component=-1) const override; \
125 bool NAME(GA_Attribute &d, GA_Offset di, \
126 const GA_Attribute &a, GA_Offset ai, \
127 const fpreal32 *b, int tuple_size, \
128 int component=-1) const override; \
129 bool NAME(GA_Attribute &d, GA_Offset di, \
130 const GA_Attribute &a, GA_Offset ai, \
131 const fpreal64 *b, int tuple_size, \
132 int component=-1) const override; \
133 bool NAME(GA_Attribute &d, GA_Offset di, \
134 const GA_Attribute &a, GA_Offset ai, \
135 const GA_Attribute &b, GA_Offset bi, \
136 int component=-1) const override;
147 #define GA_MATH_SPEC_TRANSFORM_PURE(DTYPE, FTYPE, NAME) \
148 virtual bool NAME(const DTYPE &xform, \
149 GA_Attribute &d, GA_Offset di, \
150 const GA_Attribute &s, GA_Offset si) const=0; \
151 virtual bool NAME(const FTYPE &xform, \
152 GA_Attribute &d, GA_Offset di, \
153 const GA_Attribute &s, GA_Offset si) const=0;
155 #define GA_MATH_SPEC_TRANSFORM(DTYPE, FTYPE, NAME) \
156 bool NAME(const DTYPE &xform, \
157 GA_Attribute &d, GA_Offset di, \
158 const GA_Attribute &s, \
159 GA_Offset si) const override; \
160 bool NAME(const FTYPE &xform, \
161 GA_Attribute &d, GA_Offset di, \
162 const GA_Attribute &s, GA_Offset si) const override;
UT_Vector3T< T > rowVecMult(const UT_Vector3T< T > &v, const UT_Matrix3T< S > &m)
Definition of a geometry attribute.
#define GA_MATH_SPEC_TRANSFORM_PURE(DTYPE, FTYPE, NAME)
Attribute Interface class to perform numeric operations on attributes.
ImageBuf OIIO_API sub(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
OIIO_FORCEINLINE OIIO_HOSTDEVICE float madd(float a, float b, float c)
Fused multiply and add: (a*b + c)
UT_Vector3T< T > colVecMult3(const UT_Matrix4T< S > &m, const UT_Vector3T< T > &v)
#define GA_MATH_SPEC_BINARY_PURE(NAME)
UT_Vector3T< T > rowVecMult3(const UT_Vector3T< T > &v, const UT_Matrix4T< S > &m)
UT_Vector3T< T > colVecMult(const UT_Matrix3T< S > &m, const UT_Vector3T< T > &v)
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
ImageBuf OIIO_API mul(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)