summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-07-05 14:39:37 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-07-05 14:39:37 +0000
commit3182d80c0dbccfe2f2a854a9eaf3e4308918b61a (patch)
tree75bdf6a589dd549dfc7948275a72195fc5533e38 /vespalib
parenta52700972fad8fc8b98d7eafc41086499a8fbd56 (diff)
- Consolidate on isFilter.
- Add has_weight_iterator to IDocumentWeightAttribute to allow fallback to bitvector. - Allow filter attributes to enjoy IDirectWeightedSet optimization.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/datastore/bufferstate.h16
-rw-r--r--vespalib/src/vespa/vespalib/datastore/datastorebase.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/vespalib/src/vespa/vespalib/datastore/bufferstate.h b/vespalib/src/vespa/vespalib/datastore/bufferstate.h
index 01439586f5b..3de821928b8 100644
--- a/vespalib/src/vespa/vespalib/datastore/bufferstate.h
+++ b/vespalib/src/vespa/vespalib/datastore/bufferstate.h
@@ -134,21 +134,21 @@ public:
class BufferAndMeta {
public:
- BufferAndMeta() : BufferAndMeta(nullptr, nullptr, 0, 0) { }
+ BufferAndMeta() noexcept : BufferAndMeta(nullptr, nullptr, 0, 0) { }
std::atomic<void*>& get_atomic_buffer() noexcept { return _buffer; }
void* get_buffer_relaxed() noexcept { return _buffer.load(std::memory_order_relaxed); }
const void* get_buffer_acquire() const noexcept { return _buffer.load(std::memory_order_acquire); }
- uint32_t getTypeId() const { return _typeId; }
- uint32_t get_array_size() const { return _array_size; }
- BufferState * get_state_relaxed() { return _state.load(std::memory_order_relaxed); }
+ uint32_t getTypeId() const noexcept { return _typeId; }
+ uint32_t get_array_size() const noexcept { return _array_size; }
+ BufferState * get_state_relaxed() noexcept { return _state.load(std::memory_order_relaxed); }
const BufferState * get_state_acquire() const { return _state.load(std::memory_order_acquire); }
uint32_t get_entry_size() const noexcept { return _entry_size; }
- void setTypeId(uint32_t typeId) { _typeId = typeId; }
- void set_array_size(uint32_t arraySize) { _array_size = arraySize; }
+ void setTypeId(uint32_t typeId) noexcept { _typeId = typeId; }
+ void set_array_size(uint32_t arraySize) noexcept { _array_size = arraySize; }
void set_entry_size(uint32_t entry_size) noexcept { _entry_size = entry_size; }
- void set_state(BufferState * state) { _state.store(state, std::memory_order_release); }
+ void set_state(BufferState * state) noexcept { _state.store(state, std::memory_order_release); }
private:
- BufferAndMeta(void* buffer, BufferState * state, uint32_t typeId, uint32_t arraySize)
+ BufferAndMeta(void* buffer, BufferState * state, uint32_t typeId, uint32_t arraySize) noexcept
: _buffer(buffer),
_state(state),
_typeId(typeId),
diff --git a/vespalib/src/vespa/vespalib/datastore/datastorebase.h b/vespalib/src/vespa/vespalib/datastore/datastorebase.h
index dbcdbeb12b9..b91d6c7cfa6 100644
--- a/vespalib/src/vespa/vespalib/datastore/datastorebase.h
+++ b/vespalib/src/vespa/vespalib/datastore/datastorebase.h
@@ -72,9 +72,9 @@ public:
/**
* Get the primary buffer id for the given type id.
*/
- uint32_t primary_buffer_id(uint32_t typeId) const { return _primary_buffer_ids[typeId]; }
+ uint32_t primary_buffer_id(uint32_t typeId) const noexcept { return _primary_buffer_ids[typeId]; }
BufferState &getBufferState(uint32_t buffer_id) noexcept;
- const BufferAndMeta & getBufferMeta(uint32_t buffer_id) const { return _buffers[buffer_id]; }
+ const BufferAndMeta & getBufferMeta(uint32_t buffer_id) const noexcept { return _buffers[buffer_id]; }
uint32_t getMaxNumBuffers() const noexcept { return _buffers.size(); }
uint32_t get_bufferid_limit_acquire() const noexcept { return _bufferIdLimit.load(std::memory_order_acquire); }
uint32_t get_bufferid_limit_relaxed() noexcept { return _bufferIdLimit.load(std::memory_order_relaxed); }