aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp')
-rw-r--r--searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp41
1 files changed, 25 insertions, 16 deletions
diff --git a/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp b/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
index 1bc84a7216d..ba7e8526146 100644
--- a/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
@@ -11,6 +11,7 @@
using vespalib::datastore::CompactionContext;
using vespalib::datastore::CompactionSpec;
using vespalib::datastore::CompactionStrategy;
+using vespalib::datastore::EntryRef;
using vespalib::datastore::Handle;
using vespalib::datastore::ICompactionContext;
using vespalib::eval::CellType;
@@ -147,19 +148,8 @@ DenseTensorStore::start_compact(const CompactionStrategy& compaction_strategy)
return std::make_unique<CompactionContext>(*this, std::move(compacting_buffers));
}
-std::unique_ptr<Value>
-DenseTensorStore::getTensor(EntryRef ref) const
-{
- if (!ref.valid()) {
- return {};
- }
- vespalib::eval::TypedCells cells_ref(getRawBuffer(ref), _type.cell_type(), getNumCells());
- return std::make_unique<vespalib::eval::DenseValueView>(_type, cells_ref);
-}
-
-template <class TensorType>
-TensorStore::EntryRef
-DenseTensorStore::setDenseTensor(const TensorType &tensor)
+EntryRef
+DenseTensorStore::store_tensor(const Value& tensor)
{
assert(tensor.type() == _type);
auto cells = tensor.cells();
@@ -170,10 +160,29 @@ DenseTensorStore::setDenseTensor(const TensorType &tensor)
return raw.ref;
}
-TensorStore::EntryRef
-DenseTensorStore::setTensor(const vespalib::eval::Value &tensor)
+EntryRef
+DenseTensorStore::store_encoded_tensor(vespalib::nbostream& encoded)
+{
+ (void) encoded;
+ abort();
+}
+
+std::unique_ptr<Value>
+DenseTensorStore::get_tensor(EntryRef ref) const
+{
+ if (!ref.valid()) {
+ return {};
+ }
+ vespalib::eval::TypedCells cells_ref(getRawBuffer(ref), _type.cell_type(), getNumCells());
+ return std::make_unique<vespalib::eval::DenseValueView>(_type, cells_ref);
+}
+
+bool
+DenseTensorStore::encode_stored_tensor(EntryRef ref, vespalib::nbostream& target) const
{
- return setDenseTensor(tensor);
+ (void) ref;
+ (void) target;
+ abort();
}
}