diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-07-19 12:03:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-19 12:03:31 +0800 |
commit | d6b6199df2ef93cd1a5edcc9311d4f49de7d6ef7 (patch) | |
tree | a6cbdaf015e226c58705b04ddef0400bb63271f4 /vespalib | |
parent | 62a0819f689a7d5784d301f968494d0feaf978a4 (diff) |
Revert "Revert "- Consolidate on isFilter.""
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/bufferstate.h | 16 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/datastorebase.h | 4 |
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); } |