diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2023-09-13 16:22:03 -0400 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2023-09-13 16:22:03 -0400 |
| commit | eb8dbaa770a57557d67c817c2839c64f536a6ce4 (patch) | |
| tree | 77bbbb79fb70f79965e7f6fd75bb5f4799a6f120 /include/framework/InternalLevel.h | |
| parent | 076e104b8672924c3d80cd1da2fdb5ebee1766ac (diff) | |
| download | dynamic-extension-eb8dbaa770a57557d67c817c2839c64f536a6ce4.tar.gz | |
Began re-architecting the project for concurrency support
The project is now in a state where it builds, but it probably has a lot
of bugs still.
Diffstat (limited to 'include/framework/InternalLevel.h')
| -rw-r--r-- | include/framework/InternalLevel.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/framework/InternalLevel.h b/include/framework/InternalLevel.h index ec8ffc4..983ec6a 100644 --- a/include/framework/InternalLevel.h +++ b/include/framework/InternalLevel.h @@ -19,6 +19,10 @@ #include "framework/MutableBuffer.h" namespace de { +template <RecordInterface R, ShardInterface S, QueryInterface Q> +class InternalLevel; + + template <RecordInterface R, ShardInterface S, QueryInterface Q> class InternalLevel { @@ -55,7 +59,7 @@ public: // WARNING: for leveling only. // assuming the base level is the level new level is merging into. (base_level is larger.) - static InternalLevel* merge_levels(InternalLevel* base_level, InternalLevel* new_level) { + static std::shared_ptr<InternalLevel> merge_levels(InternalLevel* base_level, InternalLevel* new_level) { assert(base_level->m_level_no > new_level->m_level_no || (base_level->m_level_no == 0 && new_level->m_level_no == 0)); auto res = new InternalLevel(base_level->m_level_no, 1); res->m_shard_cnt = 1; @@ -64,7 +68,7 @@ public: shards[1] = new_level->m_shards[0]; res->m_shards[0] = new S(shards, 2); - return res; + return std::shared_ptr<InternalLevel>(res); } void append_buffer(Buffer* buffer) { |