summaryrefslogtreecommitdiffstats
path: root/include/framework/structure/InternalLevel.h
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2024-01-11 16:31:24 -0500
committerDouglas Rumbaugh <dbr4@psu.edu>2024-01-11 16:31:24 -0500
commit7e503464176adbd0880373325e30a6bfd58616f0 (patch)
tree8c7b999379caa5a3fdcfac3452749a56b5aaf852 /include/framework/structure/InternalLevel.h
parent5a2c378aad3f1a9923db3191ffaa3fb807d392b2 (diff)
downloaddynamic-extension-7e503464176adbd0880373325e30a6bfd58616f0.tar.gz
InternalLevel update and tests
Plus some assorted fixes for move semantics stuff in BufferView that accompanied these changes.
Diffstat (limited to 'include/framework/structure/InternalLevel.h')
-rw-r--r--include/framework/structure/InternalLevel.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/framework/structure/InternalLevel.h b/include/framework/structure/InternalLevel.h
index ee85cb3..b35cadd 100644
--- a/include/framework/structure/InternalLevel.h
+++ b/include/framework/structure/InternalLevel.h
@@ -16,7 +16,7 @@
#include "framework/interface/Shard.h"
#include "framework/interface/Query.h"
#include "framework/interface/Record.h"
-#include "framework/structure/MutableBuffer.h"
+#include "framework/structure/BufferView.h"
namespace de {
template <RecordInterface R, ShardInterface S, QueryInterface Q>
@@ -27,7 +27,7 @@ class InternalLevel;
template <RecordInterface R, ShardInterface S, QueryInterface Q>
class InternalLevel {
typedef S Shard;
- typedef MutableBuffer<R> Buffer;
+ typedef BufferView<R> BuffView;
public:
InternalLevel(ssize_t level_no, size_t shard_cap)
: m_level_no(level_no)
@@ -97,14 +97,14 @@ public:
* into this level. This is used for buffer
* flushes under the tiering layout policy.
*/
- void append_buffer(Buffer* buffer) {
+ void append_buffer(BuffView buffer) {
if (m_shard_cnt == m_shards.size()) {
assert(m_pending_shard == nullptr);
- m_pending_shard = new S(buffer);
+ m_pending_shard = new S(std::move(buffer));
return;
}
- m_shards[m_shard_cnt] = std::make_shared<S>(buffer);
+ m_shards[m_shard_cnt] = std::make_shared<S>(std::move(buffer));
++m_shard_cnt;
}
@@ -140,7 +140,6 @@ public:
return new S(shards, m_shard_cnt);
}
- /* Append the sample range in-order */
void get_query_states(std::vector<std::pair<ShardID, Shard *>> &shards, std::vector<void*>& shard_states, void *query_parms) {
for (size_t i=0; i<m_shard_cnt; i++) {
if (m_shards[i]) {