summaryrefslogtreecommitdiffstats
path: root/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp
diff options
context:
space:
mode:
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.cpp12
1 files changed, 3 insertions, 9 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 17df3d21d0c..f272166fede 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
@@ -57,25 +57,19 @@ private:
tensor::Tensor::UP _rhsTensor;
const DenseTensor &_lhsDenseTensor;
const DenseTensor &_rhsDenseTensor;
- TensorValue _lhsValue;
- TensorValue _rhsValue;
public:
FunctionInput(size_t lhsNumCells, size_t rhsNumCells)
: _lhsTensor(makeTensor(lhsNumCells, 3.0)),
_rhsTensor(makeTensor(rhsNumCells, 5.0)),
_lhsDenseTensor(asDenseTensor(*_lhsTensor)),
- _rhsDenseTensor(asDenseTensor(*_rhsTensor)),
- _lhsValue(std::make_unique<DenseTensor>(_lhsDenseTensor.type(),
- _lhsDenseTensor.cells())),
- _rhsValue(std::make_unique<DenseTensor>(_rhsDenseTensor.type(),
- _rhsDenseTensor.cells()))
+ _rhsDenseTensor(asDenseTensor(*_rhsTensor))
{}
virtual const Value &get_tensor(size_t id) const override {
if (id == 0) {
- return _lhsValue;
+ return *_lhsTensor;
} else {
- return _rhsValue;
+ return *_rhsTensor;
}
}
double expectedDotProduct() const {