summaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2017-11-28 14:05:45 +0000
committerHåvard Pettersen <havardpe@oath.com>2017-11-28 14:05:45 +0000
commit361caf80d6e35fb1e4d23afcea97fe64dc56a3f4 (patch)
treec50fe91ccc7bba741f03d97b66d34777be1812da /eval
parent0fc312dd2f13d290385f2bf6109132db05b6476a (diff)
remove unused tensor functions (add,sub,min,max)
Diffstat (limited to 'eval')
-rw-r--r--eval/src/vespa/eval/tensor/dense/dense_tensor_view.cpp32
-rw-r--r--eval/src/vespa/eval/tensor/dense/dense_tensor_view.h4
-rw-r--r--eval/src/vespa/eval/tensor/sparse/sparse_tensor.cpp44
-rw-r--r--eval/src/vespa/eval/tensor/sparse/sparse_tensor.h4
-rw-r--r--eval/src/vespa/eval/tensor/tensor.h4
-rw-r--r--eval/src/vespa/eval/tensor/wrapped_simple_tensor.cpp28
-rw-r--r--eval/src/vespa/eval/tensor/wrapped_simple_tensor.h4
7 files changed, 0 insertions, 120 deletions
diff --git a/eval/src/vespa/eval/tensor/dense/dense_tensor_view.cpp b/eval/src/vespa/eval/tensor/dense/dense_tensor_view.cpp
index fc17366ca8d..e245f9a8853 100644
--- a/eval/src/vespa/eval/tensor/dense/dense_tensor_view.cpp
+++ b/eval/src/vespa/eval/tensor/dense/dense_tensor_view.cpp
@@ -161,22 +161,6 @@ DenseTensorView::as_double() const
}
Tensor::UP
-DenseTensorView::add(const Tensor &arg) const
-{
- return dense::apply(*this, arg,
- [](double lhsValue, double rhsValue)
- { return lhsValue + rhsValue; });
-}
-
-Tensor::UP
-DenseTensorView::subtract(const Tensor &arg) const
-{
- return dense::apply(*this, arg,
- [](double lhsValue, double rhsValue)
- { return lhsValue - rhsValue; });
-}
-
-Tensor::UP
DenseTensorView::multiply(const Tensor &arg) const
{
return dense::apply(*this, arg,
@@ -185,22 +169,6 @@ DenseTensorView::multiply(const Tensor &arg) const
}
Tensor::UP
-DenseTensorView::min(const Tensor &arg) const
-{
- return dense::apply(*this, arg,
- [](double lhsValue, double rhsValue)
- { return std::min(lhsValue, rhsValue); });
-}
-
-Tensor::UP
-DenseTensorView::max(const Tensor &arg) const
-{
- return dense::apply(*this, arg,
- [](double lhsValue, double rhsValue)
- { return std::max(lhsValue, rhsValue); });
-}
-
-Tensor::UP
DenseTensorView::match(const Tensor &arg) const
{
return joinDenseTensors(*this, arg, "match",
diff --git a/eval/src/vespa/eval/tensor/dense/dense_tensor_view.h b/eval/src/vespa/eval/tensor/dense/dense_tensor_view.h
index 871f5478cae..af32fc0d708 100644
--- a/eval/src/vespa/eval/tensor/dense/dense_tensor_view.h
+++ b/eval/src/vespa/eval/tensor/dense/dense_tensor_view.h
@@ -49,11 +49,7 @@ public:
virtual const eval::ValueType &type() const override;
virtual double as_double() const override;
- virtual Tensor::UP add(const Tensor &arg) const override;
- virtual Tensor::UP subtract(const Tensor &arg) const override;
virtual Tensor::UP multiply(const Tensor &arg) const override;
- virtual Tensor::UP min(const Tensor &arg) const override;
- virtual Tensor::UP max(const Tensor &arg) const override;
virtual Tensor::UP match(const Tensor &arg) const override;
virtual Tensor::UP apply(const CellFunction &func) const override;
virtual Tensor::UP sum(const vespalib::string &dimension) const override;
diff --git a/eval/src/vespa/eval/tensor/sparse/sparse_tensor.cpp b/eval/src/vespa/eval/tensor/sparse/sparse_tensor.cpp
index 9b1c608cf46..3b71fdafc2d 100644
--- a/eval/src/vespa/eval/tensor/sparse/sparse_tensor.cpp
+++ b/eval/src/vespa/eval/tensor/sparse/sparse_tensor.cpp
@@ -114,28 +114,6 @@ SparseTensor::as_double() const
}
Tensor::UP
-SparseTensor::add(const Tensor &arg) const
-{
- const SparseTensor *rhs = dynamic_cast<const SparseTensor *>(&arg);
- if (!rhs) {
- return Tensor::UP();
- }
- return sparse::apply(*this, *rhs, [](double lhsValue, double rhsValue)
- { return lhsValue + rhsValue; });
-}
-
-Tensor::UP
-SparseTensor::subtract(const Tensor &arg) const
-{
- const SparseTensor *rhs = dynamic_cast<const SparseTensor *>(&arg);
- if (!rhs) {
- return Tensor::UP();
- }
- return sparse::apply(*this, *rhs, [](double lhsValue, double rhsValue)
- { return lhsValue - rhsValue; });
-}
-
-Tensor::UP
SparseTensor::multiply(const Tensor &arg) const
{
const SparseTensor *rhs = dynamic_cast<const SparseTensor *>(&arg);
@@ -147,28 +125,6 @@ SparseTensor::multiply(const Tensor &arg) const
}
Tensor::UP
-SparseTensor::min(const Tensor &arg) const
-{
- const SparseTensor *rhs = dynamic_cast<const SparseTensor *>(&arg);
- if (!rhs) {
- return Tensor::UP();
- }
- return sparse::apply(*this, *rhs, [](double lhsValue, double rhsValue)
- { return std::min(lhsValue, rhsValue); });
-}
-
-Tensor::UP
-SparseTensor::max(const Tensor &arg) const
-{
- const SparseTensor *rhs = dynamic_cast<const SparseTensor *>(&arg);
- if (!rhs) {
- return Tensor::UP();
- }
- return sparse::apply(*this, *rhs, [](double lhsValue, double rhsValue)
- { return std::max(lhsValue, rhsValue); });
-}
-
-Tensor::UP
SparseTensor::match(const Tensor &arg) const
{
const SparseTensor *rhs = dynamic_cast<const SparseTensor *>(&arg);
diff --git a/eval/src/vespa/eval/tensor/sparse/sparse_tensor.h b/eval/src/vespa/eval/tensor/sparse/sparse_tensor.h
index 4b00fe96d38..aa88f8fd6fa 100644
--- a/eval/src/vespa/eval/tensor/sparse/sparse_tensor.h
+++ b/eval/src/vespa/eval/tensor/sparse/sparse_tensor.h
@@ -43,11 +43,7 @@ public:
virtual const eval::ValueType &type() const override;
virtual double as_double() const override;
- virtual Tensor::UP add(const Tensor &arg) const override;
- virtual Tensor::UP subtract(const Tensor &arg) const override;
virtual Tensor::UP multiply(const Tensor &arg) const override;
- virtual Tensor::UP min(const Tensor &arg) const override;
- virtual Tensor::UP max(const Tensor &arg) const override;
virtual Tensor::UP match(const Tensor &arg) const override;
virtual Tensor::UP apply(const CellFunction &func) const override;
virtual Tensor::UP sum(const vespalib::string &dimension) const override;
diff --git a/eval/src/vespa/eval/tensor/tensor.h b/eval/src/vespa/eval/tensor/tensor.h
index ab859dd7299..c47afa4cd8b 100644
--- a/eval/src/vespa/eval/tensor/tensor.h
+++ b/eval/src/vespa/eval/tensor/tensor.h
@@ -30,11 +30,7 @@ struct Tensor : public eval::Tensor
Tensor();
virtual ~Tensor() {}
- virtual Tensor::UP add(const Tensor &arg) const = 0;
- virtual Tensor::UP subtract(const Tensor &arg) const = 0;
virtual Tensor::UP multiply(const Tensor &arg) const = 0;
- virtual Tensor::UP min(const Tensor &arg) const = 0;
- virtual Tensor::UP max(const Tensor &arg) const = 0;
virtual Tensor::UP match(const Tensor &arg) const = 0;
virtual Tensor::UP apply(const CellFunction &func) const = 0;
virtual Tensor::UP sum(const vespalib::string &dimension) const = 0;
diff --git a/eval/src/vespa/eval/tensor/wrapped_simple_tensor.cpp b/eval/src/vespa/eval/tensor/wrapped_simple_tensor.cpp
index 7d528fdb8a9..8f7d75fae82 100644
--- a/eval/src/vespa/eval/tensor/wrapped_simple_tensor.cpp
+++ b/eval/src/vespa/eval/tensor/wrapped_simple_tensor.cpp
@@ -69,20 +69,6 @@ WrappedSimpleTensor::clone() const
//-----------------------------------------------------------------------------
Tensor::UP
-WrappedSimpleTensor::add(const Tensor &) const
-{
- abort();
- return Tensor::UP();
-}
-
-Tensor::UP
-WrappedSimpleTensor::subtract(const Tensor &) const
-{
- abort();
- return Tensor::UP();
-}
-
-Tensor::UP
WrappedSimpleTensor::multiply(const Tensor &) const
{
abort();
@@ -90,20 +76,6 @@ WrappedSimpleTensor::multiply(const Tensor &) const
}
Tensor::UP
-WrappedSimpleTensor::min(const Tensor &) const
-{
- abort();
- return Tensor::UP();
-}
-
-Tensor::UP
-WrappedSimpleTensor::max(const Tensor &) const
-{
- abort();
- return Tensor::UP();
-}
-
-Tensor::UP
WrappedSimpleTensor::match(const Tensor &) const
{
abort();
diff --git a/eval/src/vespa/eval/tensor/wrapped_simple_tensor.h b/eval/src/vespa/eval/tensor/wrapped_simple_tensor.h
index 33357f744b4..71b49793965 100644
--- a/eval/src/vespa/eval/tensor/wrapped_simple_tensor.h
+++ b/eval/src/vespa/eval/tensor/wrapped_simple_tensor.h
@@ -37,11 +37,7 @@ public:
void print(std::ostream &out) const override;
Tensor::UP clone() const override;
// functions below should not be used for this implementation
- Tensor::UP add(const Tensor &) const override;
- Tensor::UP subtract(const Tensor &) const override;
Tensor::UP multiply(const Tensor &) const override;
- Tensor::UP min(const Tensor &) const override;
- Tensor::UP max(const Tensor &) const override;
Tensor::UP match(const Tensor &) const override;
Tensor::UP apply(const CellFunction &) const override;
Tensor::UP sum(const vespalib::string &) const override;