aboutsummaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2018-01-31 16:12:00 +0000
committerHåvard Pettersen <havardpe@oath.com>2018-01-31 16:12:00 +0000
commit96ccd4a170dabe11bfe27e4fde7d1a1eafacdebc (patch)
treea411dcb106a70412004ef7d12cdfd4336ef196bf /eval
parentfb104cc2c07bd134703aca801488849d27c34a80 (diff)
use interpreted function to evaluate tensor function
Diffstat (limited to 'eval')
-rw-r--r--eval/src/tests/tensor/dense_xw_product_function/dense_xw_product_function_test.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/eval/src/tests/tensor/dense_xw_product_function/dense_xw_product_function_test.cpp b/eval/src/tests/tensor/dense_xw_product_function/dense_xw_product_function_test.cpp
index b45ccd5ceba..ffd0f17be75 100644
--- a/eval/src/tests/tensor/dense_xw_product_function/dense_xw_product_function_test.cpp
+++ b/eval/src/tests/tensor/dense_xw_product_function/dense_xw_product_function_test.cpp
@@ -56,7 +56,9 @@ void verify_result(const TensorSpec &v, const TensorSpec &m, bool happy) {
prod_vec->type().dimensions()[0].size,
expect.type().dimensions()[0].size,
happy);
- const Value &actual1 = fun1.eval(prod_engine, wrap({*prod_vec, *prod_mat}), stash);
+ InterpretedFunction ifun1(prod_engine, fun1);
+ InterpretedFunction::Context ictx1(ifun1);
+ const Value &actual1 = ifun1.eval(ictx1, wrap({*prod_vec, *prod_mat}));
TEST_DO(verify_equal(expect, actual1));
Inject vec_last(prod_vec->type(), 1);
@@ -66,7 +68,9 @@ void verify_result(const TensorSpec &v, const TensorSpec &m, bool happy) {
prod_vec->type().dimensions()[0].size,
expect.type().dimensions()[0].size,
happy);
- const Value &actual2 = fun2.eval(prod_engine, wrap({*prod_mat, *prod_vec}), stash);
+ InterpretedFunction ifun2(prod_engine, fun2);
+ InterpretedFunction::Context ictx2(ifun2);
+ const Value &actual2 = ifun2.eval(ictx2, wrap({*prod_mat, *prod_vec}));
TEST_DO(verify_equal(expect, actual2));
}