xo-interpreter2 stack: use xo-numeric/ to support op*
This commit is contained in:
parent
e75af5bb4f
commit
02f96d2e95
3 changed files with 11 additions and 0 deletions
|
|
@ -15,12 +15,14 @@ namespace xo {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct Primitives {
|
struct Primitives {
|
||||||
|
#ifdef OBSOLETE // see xo-numeric/src/numeric/NumericPrimitives.cpp
|
||||||
/** polymorphic multiply
|
/** polymorphic multiply
|
||||||
*
|
*
|
||||||
* TODO: this will want to move to xo-numeric/
|
* TODO: this will want to move to xo-numeric/
|
||||||
* so we can dispatch on vector, matrix, function types
|
* so we can dispatch on vector, matrix, function types
|
||||||
**/
|
**/
|
||||||
static DPrimitive_gco_2_gco_gco s_mul_gco_gco_pm;
|
static DPrimitive_gco_2_gco_gco s_mul_gco_gco_pm;
|
||||||
|
#endif
|
||||||
|
|
||||||
/** polymorphic subtract
|
/** polymorphic subtract
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ namespace xo {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef OBSOLETE // see xo-numeric/xo/numeric/NumericPrimitives.cpp
|
||||||
obj<AGCObject>
|
obj<AGCObject>
|
||||||
mul_gco_gco(obj<ARuntimeContext> rcx,
|
mul_gco_gco(obj<ARuntimeContext> rcx,
|
||||||
obj<AGCObject> x_gco,
|
obj<AGCObject> x_gco,
|
||||||
|
|
@ -98,6 +99,7 @@ namespace xo {
|
||||||
xtag("y.tseq", y_tseq)));
|
xtag("y.tseq", y_tseq)));
|
||||||
return obj<AGCObject>();
|
return obj<AGCObject>();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
obj<AGCObject>
|
obj<AGCObject>
|
||||||
sub_gco_gco(obj<ARuntimeContext> rcx,
|
sub_gco_gco(obj<ARuntimeContext> rcx,
|
||||||
|
|
@ -255,8 +257,10 @@ namespace xo {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef OSOLETE
|
||||||
DPrimitive_gco_2_gco_gco
|
DPrimitive_gco_2_gco_gco
|
||||||
Primitives::s_mul_gco_gco_pm("_mul", &mul_gco_gco);
|
Primitives::s_mul_gco_gco_pm("_mul", &mul_gco_gco);
|
||||||
|
#endif
|
||||||
|
|
||||||
DPrimitive_gco_2_gco_gco
|
DPrimitive_gco_2_gco_gco
|
||||||
Primitives::s_sub_gco_gco_pm("_sub", &sub_gco_gco);
|
Primitives::s_sub_gco_gco_pm("_sub", &sub_gco_gco);
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,10 @@ namespace xo {
|
||||||
REQUIRE(s_init.evidence());
|
REQUIRE(s_init.evidence());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MOVE THESE TO xo-numeric/
|
||||||
|
// Should work using NumericPrimitives::s_mul_gco_gco
|
||||||
|
|
||||||
|
#ifdef OBSOLETE
|
||||||
TEST_CASE("DPrimitive-n_args", "[procedure2][DPrimitive]")
|
TEST_CASE("DPrimitive-n_args", "[procedure2][DPrimitive]")
|
||||||
{
|
{
|
||||||
// s_mul_gco_gco_pm takes 2 AGCObject args
|
// s_mul_gco_gco_pm takes 2 AGCObject args
|
||||||
|
|
@ -137,6 +141,7 @@ namespace xo {
|
||||||
|
|
||||||
CHECK(output.find("_mul") != std::string::npos);
|
CHECK(output.find("_mul") != std::string::npos);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} /*namespace ut*/
|
} /*namespace ut*/
|
||||||
} /*namespace xo*/
|
} /*namespace xo*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue