307 static auto exec_preset_all = mf::build::exec_presets::AllSpanOrSingle();
308 static auto exec_preset_first_two = mf::build::exec_presets::SomeSpanOrSingle<0, 1>();
312 switch (
data->operation) {
314 static auto fn = mf::build::SI2_SO<float, float, bool>(
315 "Less Than", [](
float a,
float b) {
return a <
b; }, exec_preset_all);
319 static auto fn = mf::build::SI2_SO<float, float, bool>(
320 "Less Equal", [](
float a,
float b) {
return a <=
b; }, exec_preset_all);
324 static auto fn = mf::build::SI2_SO<float, float, bool>(
325 "Greater Than", [](
float a,
float b) {
return a >
b; }, exec_preset_all);
329 static auto fn = mf::build::SI2_SO<float, float, bool>(
330 "Greater Equal", [](
float a,
float b) {
return a >=
b; }, exec_preset_all);
334 static auto fn = mf::build::SI3_SO<float, float, float, bool>(
336 [](
float a,
float b,
float epsilon) {
return std::abs(a -
b) <= epsilon; },
337 exec_preset_first_two);
341 static auto fn = mf::build::SI3_SO<float, float, float, bool>(
343 [](
float a,
float b,
float epsilon) {
return std::abs(a -
b) > epsilon; },
344 exec_preset_first_two);
353 switch (
data->operation) {
355 static auto fn = mf::build::SI2_SO<int, int, bool>(
356 "Less Than", [](
int a,
int b) {
return a <
b; }, exec_preset_all);
360 static auto fn = mf::build::SI2_SO<int, int, bool>(
361 "Less Equal", [](
int a,
int b) {
return a <=
b; }, exec_preset_all);
365 static auto fn = mf::build::SI2_SO<int, int, bool>(
366 "Greater Than", [](
int a,
int b) {
return a >
b; }, exec_preset_all);
370 static auto fn = mf::build::SI2_SO<int, int, bool>(
371 "Greater Equal", [](
int a,
int b) {
return a >=
b; }, exec_preset_all);
375 static auto fn = mf::build::SI2_SO<int, int, bool>(
376 "Equal", [](
int a,
int b) {
return a ==
b; }, exec_preset_all);
380 static auto fn = mf::build::SI2_SO<int, int, bool>(
381 "Not Equal", [](
int a,
int b) {
return a !=
b; }, exec_preset_all);
390 switch (
data->operation) {
392 switch (
data->mode) {
394 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
395 "Less Than - Average",
401 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
402 "Less Than - Dot Product",
404 exec_preset_first_two);
408 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
409 "Less Than - Direction",
411 exec_preset_first_two);
415 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
416 "Less Than - Element-wise",
422 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
423 "Less Than - Length",
431 switch (
data->mode) {
433 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
434 "Less Equal - Average",
440 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
441 "Less Equal - Dot Product",
443 exec_preset_first_two);
447 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
448 "Less Equal - Direction",
450 exec_preset_first_two);
454 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
455 "Less Equal - Element-wise",
461 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
462 "Less Equal - Length",
470 switch (
data->mode) {
472 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
473 "Greater Than - Average",
479 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
480 "Greater Than - Dot Product",
482 exec_preset_first_two);
486 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
487 "Greater Than - Direction",
489 exec_preset_first_two);
493 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
494 "Greater Than - Element-wise",
500 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
501 "Greater Than - Length",
509 switch (
data->mode) {
511 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
512 "Greater Equal - Average",
518 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
519 "Greater Equal - Dot Product",
521 exec_preset_first_two);
525 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
526 "Greater Equal - Direction",
528 exec_preset_first_two);
532 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
533 "Greater Equal - Element-wise",
539 static auto fn = mf::build::SI2_SO<float3, float3, bool>(
540 "Greater Equal - Length",
548 switch (
data->mode) {
550 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
555 exec_preset_first_two);
559 static auto fn = mf::build::SI4_SO<float3, float3, float, float, bool>(
560 "Equal - Dot Product",
564 exec_preset_first_two);
568 static auto fn = mf::build::SI4_SO<float3, float3, float, float, bool>(
573 exec_preset_first_two);
577 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
578 "Equal - Element-wise",
580 return abs(a.x -
b.x) <= epsilon &&
abs(a.y -
b.y) <= epsilon &&
581 abs(a.z -
b.z) <= epsilon;
583 exec_preset_first_two);
587 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
592 exec_preset_first_two);
598 switch (
data->mode) {
600 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
601 "Not Equal - Average",
605 exec_preset_first_two);
609 static auto fn = mf::build::SI4_SO<float3, float3, float, float, bool>(
610 "Not Equal - Dot Product",
614 exec_preset_first_two);
618 static auto fn = mf::build::SI4_SO<float3, float3, float, float, bool>(
619 "Not Equal - Direction",
623 exec_preset_first_two);
627 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
628 "Not Equal - Element-wise",
630 return abs(a.x -
b.x) > epsilon ||
abs(a.y -
b.y) > epsilon ||
631 abs(a.z -
b.z) > epsilon;
633 exec_preset_first_two);
637 static auto fn = mf::build::SI3_SO<float3, float3, float, bool>(
638 "Not Equal - Length",
642 exec_preset_first_two);
653 switch (
data->operation) {
655 static auto fn = mf::build::SI3_SO<ColorGeometry4f, ColorGeometry4f, float, bool>(
658 return abs(a.
r -
b.r) <= epsilon &&
abs(a.
g -
b.g) <= epsilon &&
659 abs(a.
b -
b.b) <= epsilon;
661 exec_preset_first_two);
665 static auto fn = mf::build::SI3_SO<ColorGeometry4f, ColorGeometry4f, float, bool>(
668 return abs(a.
r -
b.r) > epsilon ||
abs(a.
g -
b.g) > epsilon ||
669 abs(a.
b -
b.b) > epsilon;
671 exec_preset_first_two);
675 static auto fn = mf::build::SI2_SO<ColorGeometry4f, ColorGeometry4f, bool>(
684 static auto fn = mf::build::SI2_SO<ColorGeometry4f, ColorGeometry4f, bool>(
700 switch (
data->operation) {
702 static auto fn = mf::build::SI2_SO<std::string, std::string, bool>(
703 "Equal", [](std::string a, std::string
b) {
return a ==
b; });
707 static auto fn = mf::build::SI2_SO<std::string, std::string, bool>(
708 "Not Equal", [](std::string a, std::string
b) {
return a !=
b; });
723 data_type, [&]<
typename T>() ->
const mf::MultiFunction * {
724 switch (
data->operation) {
726 static auto fn = mf::build::SI2_SO<T *, T *, bool>(
728 [](
const T *a,
const T *
b) {
730 id_cast<const ID *>(
b));
732 mf::build::exec_presets::Simple{});
736 static auto fn = mf::build::SI2_SO<T *, T *, bool>(
738 [](
const T *a,
const T *
b) {
740 id_cast<const ID *>(
b));
742 mf::build::exec_presets::Simple{});