aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/tensor/tensor_store.h
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2022-10-09 20:12:34 +0200
committerGitHub <noreply@github.com>2022-10-09 20:12:34 +0200
commit240a62de8a9b3c93fb9f7031f5e204264d414817 (patch)
tree1f5e0bb204f8a98d7bf8fdf0da48472de27a3ab8 /searchlib/src/vespa/searchlib/tensor/tensor_store.h
parent14e1b2febd40c3fa89d09b64569b4634f5594acc (diff)
parenta45d929b88b17c9de0d53d4c6fc3b25815bbe233 (diff)
Merge pull request #24367 from vespa-engine/toregge/share-code-for-loading-and-saving-tensor-attributev8.65.41
Share code for loading and saving tensor attribute between
Diffstat (limited to 'searchlib/src/vespa/searchlib/tensor/tensor_store.h')
-rw-r--r--searchlib/src/vespa/searchlib/tensor/tensor_store.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/searchlib/src/vespa/searchlib/tensor/tensor_store.h b/searchlib/src/vespa/searchlib/tensor/tensor_store.h
index 90bc82c4fde..e2426d2e899 100644
--- a/searchlib/src/vespa/searchlib/tensor/tensor_store.h
+++ b/searchlib/src/vespa/searchlib/tensor/tensor_store.h
@@ -8,6 +8,7 @@
#include <vespa/vespalib/datastore/i_compactable.h>
#include <vespa/vespalib/util/generationhandler.h>
+namespace vespalib { class nbostream; }
namespace vespalib::datastore { struct ICompactionContext; }
namespace vespalib::eval { struct Value; }
@@ -41,6 +42,11 @@ public:
virtual std::unique_ptr<vespalib::datastore::ICompactionContext> start_compact(const vespalib::datastore::CompactionStrategy& compaction_strategy) = 0;
+ virtual EntryRef store_tensor(const vespalib::eval::Value& tensor) = 0;
+ virtual EntryRef store_encoded_tensor(vespalib::nbostream& encoded) = 0;
+ virtual std::unique_ptr<vespalib::eval::Value> get_tensor(EntryRef ref) const = 0;
+ virtual bool encode_stored_tensor(EntryRef ref, vespalib::nbostream& target) const = 0;
+
// Inherit doc from DataStoreBase
void trimHoldLists(generation_t usedGen) {
_store.trimHoldLists(usedGen);