From 96ccd4a170dabe11bfe27e4fde7d1a1eafacdebc Mon Sep 17 00:00:00 2001 From: HÃ¥vard Pettersen Date: Wed, 31 Jan 2018 16:12:00 +0000 Subject: use interpreted function to evaluate tensor function --- .../dense_xw_product_function/dense_xw_product_function_test.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'eval/src/tests') 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)); } -- cgit v1.2.3