summaryrefslogtreecommitdiffstats
path: root/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2018-01-16 10:53:41 +0000
committerHåvard Pettersen <havardpe@oath.com>2018-01-16 10:53:41 +0000
commit8852988ac1f0c391d9a3b603bd9f0e5af6c5e310 (patch)
tree3decf47e4e4971e8570dd51900d2c0cabcdd199b /eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp
parent772fc30ac5acc00dd8122969ceb0dff0770e23f5 (diff)
Use lazy parameters in tensor functions.
Diffstat (limited to 'eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp')
-rw-r--r--eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp b/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp
index 0b8b98fc617..3463bee3447 100644
--- a/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp
+++ b/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp
@@ -63,7 +63,8 @@ public:
_params.emplace_back(_lhsDenseTensor);
_params.emplace_back(_rhsDenseTensor);
}
- ConstArrayRef<Value::CREF> get() const { return _params; }
+ SimpleObjectParams get() const { return SimpleObjectParams(_params); }
+ const Value &param(size_t idx) const { return _params[idx]; }
double expectedDotProduct() const {
return calcDotProduct(_lhsDenseTensor, _rhsDenseTensor);
}
@@ -80,8 +81,8 @@ struct Fixture
const Value &result = function.eval(input.get(), stash);
ASSERT_TRUE(result.is_double());
LOG(info, "eval(): (%s) * (%s) = %f",
- input.get()[0].get().type().to_spec().c_str(),
- input.get()[1].get().type().to_spec().c_str(),
+ input.param(0).type().to_spec().c_str(),
+ input.param(1).type().to_spec().c_str(),
result.as_double());
return result.as_double();
}