55 template<
typename ElementFuncT>
61 template<
typename ElementFuncT>
static FunctionT
create_function(ElementFuncT element_fn)
67 [&](
int i) {
new (
static_cast<void *
>(&out1[i])) Out1(element_fn(in1[i])); });
76 function_(
mask, in1, out1);
86 template<
typename In1,
typename In2,
typename Out1>
105 template<
typename ElementFuncT>
111 template<
typename ElementFuncT>
static FunctionT
create_function(ElementFuncT element_fn)
120 [&](
int i) {
new (
static_cast<void *
>(&out1[i])) Out1(element_fn(in1[i], in2[i])); });
130 function_(
mask, in1, in2, out1);
141 template<
typename In1,
typename In2,
typename In3,
typename Out1>
144 using FunctionT = std::function<void(
IndexMask,
164 template<
typename ElementFuncT>
170 template<
typename ElementFuncT>
static FunctionT
create_function(ElementFuncT element_fn)
177 mask.foreach_index([&](
int i) {
178 new (
static_cast<void *
>(&out1[i])) Out1(element_fn(in1[i], in2[i], in3[i]));
189 function_(
mask, in1, in2, in3, out1);
201 template<
typename In1,
typename In2,
typename In3,
typename In4,
typename Out1>
204 using FunctionT = std::function<void(
IndexMask,
226 template<
typename ElementFuncT>
232 template<
typename ElementFuncT>
static FunctionT
create_function(ElementFuncT element_fn)
240 mask.foreach_index([&](
int i) {
241 new (
static_cast<void *
>(&out1[i])) Out1(element_fn(in1[i], in2[i], in3[i], in4[i]));
253 function_(
mask, in1, in2, in3, in4, out1);
276 template<
typename ElementFuncT>
282 template<
typename ElementFuncT>
static FunctionT
create_function(ElementFuncT element_fn)
285 mask.foreach_index([&](
int i) { element_fn(mut1[i]); });
292 function_(
mask, mut1);
309 std::string
name = CPPType::get<From>().name() +
" to " + CPPType::get<To>().name();
372 std::stringstream ss;
382 mask.foreach_index([&](
int i) {
new (&
output[i])
T(value_); });
393 if (other1 !=
nullptr) {
394 return value_ == other1->value_;
398 if (other2 !=
nullptr) {
400 if (
type == other2->type_) {
401 return type.is_equal(
static_cast<const void *
>(&value_), other2->value_);
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
void call(IndexMask mask, MFParams params, MFContext UNUSED(context)) const override
CustomMF_Constant(U &&value)
uint64_t hash() const override
bool equals(const MultiFunction &other) const override
static MFSignature create_signature()
void call(IndexMask mask, MFParams params, MFContext UNUSED(context)) const override
CustomMF_DefaultOutput(StringRef name, Span< MFDataType > input_types, Span< MFDataType > output_types)
void call(IndexMask mask, MFParams params, MFContext context) const override
CustomMF_GenericConstantArray(GSpan array)
void call(IndexMask mask, MFParams params, MFContext context) const override
CustomMF_GenericConstant(const CPPType &type, const void *value)
void call(IndexMask mask, MFParams params, MFContext context) const override
uint64_t hash() const override
bool equals(const MultiFunction &other) const override
CustomMF_SI_SI_SI_SI_SO(StringRef name, FunctionT function)
static FunctionT create_function(ElementFuncT element_fn)
CustomMF_SI_SI_SI_SI_SO(StringRef name, ElementFuncT element_fn)
void call(IndexMask mask, MFParams params, MFContext UNUSED(context)) const override
CustomMF_SI_SI_SI_SO(StringRef name, FunctionT function)
CustomMF_SI_SI_SI_SO(StringRef name, ElementFuncT element_fn)
static FunctionT create_function(ElementFuncT element_fn)
void call(IndexMask mask, MFParams params, MFContext UNUSED(context)) const override
void call(IndexMask mask, MFParams params, MFContext UNUSED(context)) const override
CustomMF_SI_SI_SO(StringRef name, FunctionT function)
CustomMF_SI_SI_SO(StringRef name, ElementFuncT element_fn)
static FunctionT create_function(ElementFuncT element_fn)
static FunctionT create_function(ElementFuncT element_fn)
CustomMF_SI_SO(StringRef name, ElementFuncT element_fn)
CustomMF_SI_SO(StringRef name, FunctionT function)
void call(IndexMask mask, MFParams params, MFContext UNUSED(context)) const override
void call(IndexMask mask, MFParams params, MFContext UNUSED(context)) const override
CustomMF_SM(StringRef name, ElementFuncT element_fn)
static FunctionT create_function(ElementFuncT element_fn)
CustomMF_SM(StringRef name, FunctionT function)
StringRefNull name() const
void set_signature(const MFSignature *signature)
const MFSignature & signature() const
void devirtualize_varray(const VArray< T > &varray, const Func &func, bool enable=true)
void devirtualize_varray2(const VArray< T1 > &varray1, const VArray< T2 > &varray2, const Func &func, bool enable=true)
uint64_t get_default_hash(const T &v)
static bNodeSocketTemplate outputs[]
static bNodeSocketTemplate inputs[]
struct SELECTID_Context context
unsigned __int64 uint64_t
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)