summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-10-14 13:39:47 +0000
committerArne Juul <arnej@verizonmedia.com>2020-10-14 13:39:47 +0000
commit1f5a099c4b2f26d779501ed0b4758175e1a01457 (patch)
tree9f34524be20176a17c574b468e7092d453a29d10 /searchlib
parent8956a4e0299342eea6660c098cafc8497d8ceae6 (diff)
use cells() not cellsRef()
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_iterator.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp4
4 files changed, 8 insertions, 8 deletions
diff --git a/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp b/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp
index 877ed6b5094..e99e14c8d6b 100644
--- a/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_blueprint.cpp
@@ -24,7 +24,7 @@ template<typename LCT, typename RCT>
void
convert_cells(std::unique_ptr<DenseTensorView> &original, vespalib::eval::ValueType want_type)
{
- auto old_cells = original->cellsRef().typify<LCT>();
+ auto old_cells = original->cells().typify<LCT>();
std::vector<RCT> new_cells;
new_cells.reserve(old_cells.size());
for (LCT value : old_cells) {
@@ -66,7 +66,7 @@ NearestNeighborBlueprint::NearestNeighborBlueprint(const queryeval::FieldSpec& f
_found_hits(),
_global_filter(GlobalFilter::create())
{
- auto lct = _query_tensor->cellsRef().type;
+ auto lct = _query_tensor->cells().type;
auto rct = _attr_tensor.getTensorType().cell_type();
using MyTypify = vespalib::eval::TypifyCellType;
auto fixup_fun = vespalib::typify_invoke<2,MyTypify,ConvertCellsSelector>(lct, rct);
@@ -124,7 +124,7 @@ NearestNeighborBlueprint::perform_top_k()
auto rhs_type = _attr_tensor.getTensorType();
// different cell types should be converted already
if (lhs_type == rhs_type) {
- auto lhs = _query_tensor->cellsRef();
+ auto lhs = _query_tensor->cells();
uint32_t k = _target_num_hits;
if (_global_filter->has_filter()) {
auto filter = _global_filter->filter();
diff --git a/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_iterator.cpp b/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_iterator.cpp
index cf4e8ae2f6a..3012de7563b 100644
--- a/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_iterator.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/nearest_neighbor_iterator.cpp
@@ -37,7 +37,7 @@ public:
NearestNeighborImpl(Params params_in)
: NearestNeighborIterator(params_in),
- _lhs(params().queryTensor.cellsRef()),
+ _lhs(params().queryTensor.cells()),
_fieldTensor(params().tensorAttribute.getTensorType()),
_lastScore(0.0)
{
@@ -77,7 +77,7 @@ public:
private:
double computeDistance(uint32_t docId, double limit) {
params().tensorAttribute.extract_dense_view(docId, _fieldTensor);
- auto rhs = _fieldTensor.cellsRef();
+ auto rhs = _fieldTensor.cells();
return params().distanceFunction->calc_with_limit(_lhs, rhs, limit);
}
diff --git a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp
index 0a34c18bae9..81c8df982b1 100644
--- a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp
@@ -149,7 +149,7 @@ DenseTensorAttribute::prepare_set_tensor(DocId docid, const Tensor& tensor) cons
if (_index) {
const auto* view = dynamic_cast<const DenseTensorView*>(&tensor);
assert(view);
- return _index->prepare_add_document(docid, view->cellsRef(), getGenerationHandler().takeGuard());
+ return _index->prepare_add_document(docid, view->cells(), getGenerationHandler().takeGuard());
}
return std::unique_ptr<PrepareResult>();
}
diff --git a/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp b/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
index 7a020d33d5c..e250a19214c 100644
--- a/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
@@ -166,11 +166,11 @@ template <class TensorType>
TensorStore::EntryRef
DenseTensorStore::setDenseTensor(const TensorType &tensor)
{
- size_t numCells = tensor.cellsRef().size;
+ size_t numCells = tensor.cells().size;
assert(numCells == getNumCells());
assert(tensor.type() == _type);
auto raw = allocRawBuffer();
- memcpy(raw.data, tensor.cellsRef().data, getBufSize());
+ memcpy(raw.data, tensor.cells().data, getBufSize());
return raw.ref;
}