summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-12-04 12:52:36 +0000
committerArne Juul <arnej@verizonmedia.com>2020-12-06 20:59:46 +0100
commitea1305d578ca3ff11503eb30109a408f6c150fcb (patch)
tree093b10f90101decbbd23d693713ca3ebd1844d7e /searchlib
parentc9785734e2bf04e063cb693a54f6d769a1a83704 (diff)
use DenseCellsValue in NearestNeighborBlueprint
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp b/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp
index d75cda2e513..d3ecffd1605 100644
--- a/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp
@@ -4,16 +4,16 @@
#include "nearest_neighbor_blueprint.h"
#include "nearest_neighbor_iterator.h"
#include "nns_index_iterator.h"
+#include <vespa/eval/eval/dense_cells_value.h>
#include <vespa/searchlib/fef/termfieldmatchdataarray.h>
-#include <vespa/eval/tensor/dense/dense_tensor.h>
#include <vespa/searchlib/tensor/dense_tensor_attribute.h>
#include <vespa/searchlib/tensor/distance_function_factory.h>
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.queryeval.nearest_neighbor_blueprint");
+using vespalib::eval::DenseCellsValue;
using vespalib::eval::Value;
-using vespalib::tensor::DenseTensor;
namespace search::queryeval {
@@ -21,7 +21,7 @@ namespace {
template<typename LCT, typename RCT>
void
-convert_cells(std::unique_ptr<Value> &original, vespalib::eval::ValueType want_type)
+convert_cells(std::unique_ptr<Value> &original, const vespalib::eval::ValueType &want_type)
{
auto old_cells = original->cells().typify<LCT>();
std::vector<RCT> new_cells;
@@ -30,16 +30,16 @@ convert_cells(std::unique_ptr<Value> &original, vespalib::eval::ValueType want_t
RCT conv = value;
new_cells.push_back(conv);
}
- original = std::make_unique<DenseTensor<RCT>>(want_type, std::move(new_cells));
+ original = std::make_unique<DenseCellsValue<RCT>>(want_type, std::move(new_cells));
}
template<>
void
-convert_cells<float,float>(std::unique_ptr<Value> &, vespalib::eval::ValueType) {}
+convert_cells<float,float>(std::unique_ptr<Value> &, const vespalib::eval::ValueType &) {}
template<>
void
-convert_cells<double,double>(std::unique_ptr<Value> &, vespalib::eval::ValueType) {}
+convert_cells<double,double>(std::unique_ptr<Value> &, const vespalib::eval::ValueType &) {}
struct ConvertCellsSelector
{