diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2024-02-09 12:30:21 -0500 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2024-02-09 12:30:21 -0500 |
| commit | 402fc269c0aaa671d84a6d15918735ad4b90e6b2 (patch) | |
| tree | 145b1658f31a005eda33c9231b2b8ee7bab7915f /include/util/Cursor.h | |
| parent | 711769574e647839677739192698e400529efe75 (diff) | |
| download | dynamic-extension-402fc269c0aaa671d84a6d15918735ad4b90e6b2.tar.gz | |
Comment updates/fixes
Diffstat (limited to 'include/util/Cursor.h')
| -rw-r--r-- | include/util/Cursor.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/util/Cursor.h b/include/util/Cursor.h index be7ab32..e8ba53d 100644 --- a/include/util/Cursor.h +++ b/include/util/Cursor.h @@ -7,15 +7,18 @@ * Distributed under the Modified BSD License. * * A simple record cursor type with associated methods for help in - * merging record sets when constructing shards. + * merging record sets when constructing shards. Iterates an array + * of records in order, and provides facilities to make sorted merges + * easier. + * + * TODO: Prior versions of this module included automatic support for + * working with data stored in PagedFiles as well. That should be + * reintroduced at some point. */ #pragma once -#include "framework/ShardRequirements.h" - -#include "psu-ds/BloomFilter.h" -#include "psu-ds/PriorityQueue.h" -#include "psu-util/alignment.h" +#include <cstdlib> +#include <vector> namespace de { template<typename R> @@ -64,6 +67,8 @@ template <typename R> inline static Cursor<R> *get_next(std::vector<Cursor<R>> &cursors, Cursor<R> *current=nullptr) { const R *min_rec = nullptr; Cursor<R> *result = nullptr; + // FIXME: for large cursor vectors, it may be worth it to use a + // PriorityQueue here instead of scanning. for (size_t i=0; i< cursors.size(); i++) { if (cursors[i] == (Cursor<R>) {0} ) continue; |