summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2023-06-13 22:42:45 +0200
committerTor Egge <Tor.Egge@online.no>2023-06-13 22:42:45 +0200
commit00fef8b061eed0e7ddb87635cce036b1e5d24ef8 (patch)
treef7503b5d8fe149521b1b7296fbe4708875d6522a /searchlib
parent9a483e577acdd5cb5a36e94ec3c8ab08a8b43d17 (diff)
Add get_entry_size member function in array store type mappers that maps
from type id to entry size.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/raw_buffer_type_mapper.h1
-rw-r--r--searchlib/src/vespa/searchlib/tensor/tensor_buffer_type_mapper.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/raw_buffer_type_mapper.h b/searchlib/src/vespa/searchlib/attribute/raw_buffer_type_mapper.h
index 88c213c8979..a2538fe51e5 100644
--- a/searchlib/src/vespa/searchlib/attribute/raw_buffer_type_mapper.h
+++ b/searchlib/src/vespa/searchlib/attribute/raw_buffer_type_mapper.h
@@ -26,6 +26,7 @@ public:
RawBufferTypeMapper();
RawBufferTypeMapper(uint32_t max_small_buffer_type_id, double grow_factor);
~RawBufferTypeMapper();
+ size_t get_entry_size(uint32_t type_id) const { return get_array_size(type_id); }
};
}
diff --git a/searchlib/src/vespa/searchlib/tensor/tensor_buffer_type_mapper.h b/searchlib/src/vespa/searchlib/tensor/tensor_buffer_type_mapper.h
index 422224751e3..3087ef67c4d 100644
--- a/searchlib/src/vespa/searchlib/tensor/tensor_buffer_type_mapper.h
+++ b/searchlib/src/vespa/searchlib/tensor/tensor_buffer_type_mapper.h
@@ -26,6 +26,7 @@ public:
~TensorBufferTypeMapper();
TensorBufferOperations& get_tensor_buffer_operations() const noexcept { return *_ops; }
+ size_t get_entry_size(uint32_t type_id) const { return get_array_size(type_id); }
};
}