diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 0000000..a3c17cc --- /dev/null +++ b/Doxyfile @@ -0,0 +1,52 @@ +# --------- Project Info --------- +PROJECT_NAME = "Flow" +PROJECT_BRIEF = "Documentation for the Flow C++ Library" +OUTPUT_DIRECTORY = docs +CREATE_SUBDIRS = NO + +# --------- Build Control --------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_ANON_NSPACES = YES + +# --------- Input Settings --------- +INPUT = DataStructure/ +RECURSIVE = YES +FILE_PATTERNS = flow_*.cpp flow_*.h flow_*.hpp flow_*.cxx flow_*.cc +EXCLUDE = + +# --------- Source Browsing --------- +SOURCE_BROWSER = YES +INLINE_SOURCES = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +CALL_GRAPH = YES +CALLER_GRAPH = YES + +# --------- Output Formats --------- +GENERATE_HTML = YES +HTML_OUTPUT = . +HTML_FILE_EXTENSION = .html +HTML_COLORSTYLE_HUE = 220 +HTML_DYNAMIC_SECTIONS = YES +GENERATE_LATEX = NO +GENERATE_MAN = NO +GENERATE_RTF = NO +GENERATE_XML = NO +GENERATE_DOCBOOK = NO + +# --------- Markdown Support --------- +MARKDOWN_SUPPORT = +USE_MDFILE_AS_MAINPAGE = + +# --------- Warnings --------- +WARN_IF_UNDOCUMENTED = YES +WARN_NO_PARAMDOC = YES + +# --------- Misc --------- +QUIET = NO +WARNINGS = YES +GENERATE_TREEVIEW = YES +STRIP_FROM_PATH = DataStructure/ diff --git a/docs/annotated.html b/docs/annotated.html new file mode 100644 index 0000000..4a44d6d --- /dev/null +++ b/docs/annotated.html @@ -0,0 +1,131 @@ + + +
+ + + + +|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
| Nflow | |
| CArenaMemoryResource | A linear arena memory resource that allocates memory sequentially from a fixed buffer. Throws std::bad_alloc if there is insufficient space for the requested allocation |
| CConcurrentFlexQueue | |
| CNode | |
| CConcurrentQueue | |
| CCountedValueViewIterator | Iterator that returns a constant value for a fixed number of times. Useful for creating a virtual range of repeated values without storage |
| CDebugClass | Debug class that tracks object's copy/move opeartions. Note that some of the operations may get optimized away with optimization on |
| CDefaultMemoryResource | A default memory resource that wraps global ::operator new and ::operator delete |
| CMemoryResource | A memory resource holder interface for the PolymorphicAllocator. Responsible for allocate and deallocate raw memory |
| CPolymorphicAllocator | A polymorphic allocator that wraps around a non-owning memory resource. Memory allocation strategy is decided by memory resource's implementation |
| CPoolMemoryResource | A pool memory resource that manages fixed-size memory blocks from a pre-allocated buffer. The allocation size must be less or equal to the block size. The allocation alignment must be less or equal to the block alignment. Throws std::bad_alloc if the constraint is not met or run out of memory |
| CHeader | |
| CStackMemoryResource | A stack-based memory resource that allocates memory in a LIFO order from a fixed buffer. Deallocation must happen in reverse order of allocation. Throws std::bad_alloc if there is insufficient space for an allocation |
| CHeader | |
| CTimer | A simple timer to record timelapses. Uses chrono::steady_clock by default |
| CTuple | |
| CTuple< T, Ts... > | |
| CVector | |
| CVectorGrowthStrategy | |
| CDoubleExpand | |
| CFibonacciExpand | |
| CGoldenExpand |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::ArenaMemoryResource, including all inherited members.
+| allocate(std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) | flow::MemoryResource | inline |
| allocateImp(std::size_t bytes, std::size_t alignment) override | flow::ArenaMemoryResource | inlineprotectedvirtual |
| ArenaMemoryResource(void *buffer, std::size_t capacity) noexcept | flow::ArenaMemoryResource | inlineexplicit |
| buffer_ | flow::ArenaMemoryResource | protected |
| capacity_ | flow::ArenaMemoryResource | protected |
| deallocate(void *address, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) | flow::MemoryResource | inline |
| deallocateImp(void *address, std::size_t bytes, std::size_t alignment) override | flow::ArenaMemoryResource | inlineprotectedvirtual |
| ~MemoryResource()=default | flow::MemoryResource | virtual |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
A linear arena memory resource that allocates memory sequentially from a fixed buffer. Throws std::bad_alloc if there is insufficient space for the requested allocation. + More...
+ +#include <flow_arena_memory_resource.h>
+Public Member Functions | |
| ArenaMemoryResource (void *buffer, std::size_t capacity) noexcept | |
| Public Member Functions inherited from flow::MemoryResource | |
| virtual | ~MemoryResource ()=default |
| void * | allocate (std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
| void | deallocate (void *address, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
+Protected Member Functions | |
| virtual void * | allocateImp (std::size_t bytes, std::size_t alignment) override |
| virtual void | deallocateImp (void *address, std::size_t bytes, std::size_t alignment) override |
+Protected Attributes | |
| void * | buffer_ |
| std::size_t | capacity_ |
A linear arena memory resource that allocates memory sequentially from a fixed buffer. Throws std::bad_alloc if there is insufficient space for the requested allocation.
+ +Definition at line 14 of file flow_arena_memory_resource.h.
+
+
|
+ +inlineexplicitnoexcept | +
Definition at line 16 of file flow_arena_memory_resource.h.
+
+
|
+ +inlineoverrideprotectedvirtual | +
Implements flow::MemoryResource.
+ +Definition at line 30 of file flow_arena_memory_resource.h.
+
+
|
+ +inlineoverrideprotectedvirtual | +
Implements flow::MemoryResource.
+ +Definition at line 41 of file flow_arena_memory_resource.h.
+ +References buffer_.
+ +
+
|
+ +protected | +
Definition at line 27 of file flow_arena_memory_resource.h.
+ +Referenced by allocateImp(), and deallocateImp().
+ +
+
|
+ +protected | +
Definition at line 28 of file flow_arena_memory_resource.h.
+ +Referenced by allocateImp().
+ +|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::ConcurrentFlexQueue< T >, including all inherited members.
+| blocked_ | flow::ConcurrentFlexQueue< T > | private |
| ConcurrentFlexQueue() | flow::ConcurrentFlexQueue< T > | inline |
| ConcurrentFlexQueue(const ConcurrentFlexQueue &)=delete | flow::ConcurrentFlexQueue< T > | |
| ConcurrentFlexQueue(ConcurrentFlexQueue &&)=delete | flow::ConcurrentFlexQueue< T > | |
| emplace(Args &&... args) | flow::ConcurrentFlexQueue< T > | inline |
| empty() const | flow::ConcurrentFlexQueue< T > | inline |
| head_ | flow::ConcurrentFlexQueue< T > | private |
| headMux_ | flow::ConcurrentFlexQueue< T > | mutableprivate |
| operator=(const ConcurrentFlexQueue &)=delete | flow::ConcurrentFlexQueue< T > | |
| operator=(ConcurrentFlexQueue &&)=delete | flow::ConcurrentFlexQueue< T > | |
| push(U &&value) | flow::ConcurrentFlexQueue< T > | inline |
| tail_ | flow::ConcurrentFlexQueue< T > | private |
| tailMux_ | flow::ConcurrentFlexQueue< T > | mutableprivate |
| tryFront() const | flow::ConcurrentFlexQueue< T > | inline |
| tryPop() | flow::ConcurrentFlexQueue< T > | inline |
| waitPop() | flow::ConcurrentFlexQueue< T > | inline |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <flow_concurrent_flex_queue.h>
+Classes | |
| struct | Node |
+Public Member Functions | |
| ConcurrentFlexQueue () | |
| ConcurrentFlexQueue (const ConcurrentFlexQueue &)=delete | |
| ConcurrentFlexQueue (ConcurrentFlexQueue &&)=delete | |
| ConcurrentFlexQueue & | operator= (const ConcurrentFlexQueue &)=delete |
| ConcurrentFlexQueue & | operator= (ConcurrentFlexQueue &&)=delete |
| bool | empty () const |
| template<typename U> | |
| void | push (U &&value) |
| Push a new element to the concurrent flex queue. | |
| template<typename ... Args> | |
| void | emplace (Args &&... args) |
| Construct a new element in the concurrent flex queue inplace. | |
| std::optional< T > | tryFront () const |
| Try return the first element in the concurrent flex queue. If the concurrent flex queue is empty, then return std::nullopt. | |
| std::optional< T > | tryPop () |
| Try pop and return the first element in the concurrent flex queue. If the concurrent flex queue is empty, then return std::nullopt. | |
| T | waitPop () |
| Wait until the concurrent flex queue has at least one element, then pop and return the first element in the concurrent flex queue. | |
+Private Attributes | |
| std::unique_ptr< Node > | head_ |
| Node * | tail_ |
| std::mutex | headMux_ {} |
| std::mutex | tailMux_ {} |
| std::condition_variable | blocked_ {} |
Definition at line 9 of file flow_concurrent_flex_queue.h.
+
+
|
+ +inline | +
Definition at line 23 of file flow_concurrent_flex_queue.h.
+Referenced by ConcurrentFlexQueue(), ConcurrentFlexQueue(), operator=(), and operator=().
+ +
+
|
+ +delete | +
References ConcurrentFlexQueue().
+ +
+
|
+ +delete | +
References ConcurrentFlexQueue().
+ +
+
|
+ +inline | +
Construct a new element in the concurrent flex queue inplace.
+| ...Args |
| ...args | The element constructor's arguments. |
Definition at line 63 of file flow_concurrent_flex_queue.h.
+
+
|
+ +inline | +
Definition at line 35 of file flow_concurrent_flex_queue.h.
+
+
|
+ +delete | +
References ConcurrentFlexQueue().
+ +
+
|
+ +delete | +
References ConcurrentFlexQueue().
+ +
+
|
+ +inline | +
Push a new element to the concurrent flex queue.
+| T |
| value | The element to add. |
Definition at line 46 of file flow_concurrent_flex_queue.h.
+ + + +
+
|
+ +inline | +
Try return the first element in the concurrent flex queue. If the concurrent flex queue is empty, then return std::nullopt.
+Definition at line 79 of file flow_concurrent_flex_queue.h.
+
+
|
+ +inline | +
Try pop and return the first element in the concurrent flex queue. If the concurrent flex queue is empty, then return std::nullopt.
+Definition at line 92 of file flow_concurrent_flex_queue.h.
+
+
|
+ +inline | +
Wait until the concurrent flex queue has at least one element, then pop and return the first element in the concurrent flex queue.
+Definition at line 108 of file flow_concurrent_flex_queue.h.
+
+
|
+ +private | +
Definition at line 20 of file flow_concurrent_flex_queue.h.
+
+
|
+ +private | +
Definition at line 16 of file flow_concurrent_flex_queue.h.
+ +Referenced by ConcurrentFlexQueue(), empty(), tryFront(), tryPop(), and waitPop().
+ +
+
|
+ +mutableprivate | +
Definition at line 18 of file flow_concurrent_flex_queue.h.
+Referenced by empty(), tryFront(), tryPop(), and waitPop().
+ +
+
|
+ +private | +
Definition at line 17 of file flow_concurrent_flex_queue.h.
+ +Referenced by ConcurrentFlexQueue(), emplace(), empty(), push(), tryFront(), tryPop(), and waitPop().
+ +
+
|
+ +mutableprivate | +
Definition at line 19 of file flow_concurrent_flex_queue.h.
+|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::ConcurrentQueue< T, Container >, including all inherited members.
+|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <flow_concurrent_queue.h>
+Public Member Functions | |
| ConcurrentQueue (const allocator_type &allocator=allocator_type()) | |
| Construct a concurrent queue. The elements follow the FIFO order. | |
| ConcurrentQueue (const ConcurrentQueue &)=delete | |
| ConcurrentQueue (ConcurrentQueue &&)=delete | |
| ConcurrentQueue & | operator= (const ConcurrentQueue &)=delete |
| ConcurrentQueue & | operator= (ConcurrentQueue &&)=delete |
| bool | empty () const |
| std::size_t | size () const |
| template<typename U> | |
| void | push (U &&value) |
| Push a new element to the concurrent queue. | |
| template<typename ... Args> | |
| void | emplace (Args &&... args) |
| Construct a new element in the concurrent queue inplace. | |
| std::optional< T > | tryFront () const |
| Try return the first element in the concurrent queue. If the concurrent queue is empty, then return std::nullopt. | |
| std::optional< T > | tryPop () |
| Try pop and return the first element in the concurrent queue. If the concurrent queue is empty, then return std::nullopt. | |
| T | waitPop () |
| Wait until the concurrent queue has at least one element, then pop and return the first element in the concurrent queue. | |
+Private Types | |
| using | allocator_type = Container::allocator_type |
+Private Attributes | |
| std::queue< T, Container > | queue_ |
| std::mutex | mux_ {} |
| std::condition_variable | blocked_ {} |
Definition at line 9 of file flow_concurrent_queue.h.
+
+
|
+ +private | +
Definition at line 10 of file flow_concurrent_queue.h.
+ +
+
|
+ +inlineexplicit | +
Construct a concurrent queue. The elements follow the FIFO order.
+| allocator | allocates the elements in the concurrent queue. |
Definition at line 21 of file flow_concurrent_queue.h.
+References queue_.
+ +Referenced by ConcurrentQueue(), ConcurrentQueue(), operator=(), and operator=().
+ +
+
|
+ +delete | +
References ConcurrentQueue().
+ +
+
|
+ +delete | +
References ConcurrentQueue().
+ +
+
|
+ +inline | +
Construct a new element in the concurrent queue inplace.
+| ...Args |
| ...args | The element constructor's arguments. |
Definition at line 66 of file flow_concurrent_queue.h.
+
+
|
+ +inline | +
Definition at line 33 of file flow_concurrent_queue.h.
+ + + +
+
|
+ +delete | +
References ConcurrentQueue().
+ +
+
|
+ +delete | +
References ConcurrentQueue().
+ +
+
|
+ +inline | +
Push a new element to the concurrent queue.
+| T |
| value | The element to add. |
Definition at line 52 of file flow_concurrent_queue.h.
+ + + +
+
|
+ +inline | +
Definition at line 41 of file flow_concurrent_queue.h.
+ + + +
+
|
+ +inline | +
Try return the first element in the concurrent queue. If the concurrent queue is empty, then return std::nullopt.
+Definition at line 79 of file flow_concurrent_queue.h.
+
+
|
+ +inline | +
Try pop and return the first element in the concurrent queue. If the concurrent queue is empty, then return std::nullopt.
+Definition at line 92 of file flow_concurrent_queue.h.
+ + + +
+
|
+ +inline | +
Wait until the concurrent queue has at least one element, then pop and return the first element in the concurrent queue.
+Definition at line 108 of file flow_concurrent_queue.h.
+ + + +
+
|
+ +private | +
Definition at line 14 of file flow_concurrent_queue.h.
+
+
|
+ +mutableprivate | +
Definition at line 13 of file flow_concurrent_queue.h.
+Referenced by emplace(), empty(), push(), size(), tryFront(), tryPop(), and waitPop().
+ +
+
|
+ +private | +
Definition at line 12 of file flow_concurrent_queue.h.
+ +Referenced by ConcurrentQueue(), emplace(), empty(), push(), size(), tryFront(), tryPop(), and waitPop().
+ +|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::CountedValueViewIterator< T >, including all inherited members.
+|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
Iterator that returns a constant value for a fixed number of times. Useful for creating a virtual range of repeated values without storage. + More...
+ +#include <flow_counted_value_view_iterator.h>
+Public Types | |
| using | value_type = T |
| using | reference = const T& |
| using | pointer = const T* |
| using | difference_type = std::ptrdiff_t |
| using | iterator_category = std::forward_iterator_tag |
+Public Member Functions | |
| CountedValueViewIterator () | |
| CountedValueViewIterator (const T &value, std::size_t count=0) | |
| const T & | operator* () const |
| const T * | operator-> () const |
| CountedValueViewIterator & | operator++ () |
| CountedValueViewIterator | operator++ (int) |
+Private Attributes | |
| const T * | value_ |
| std::size_t | count_ |
+Friends | |
| bool | operator== (const CountedValueViewIterator &lhs, const CountedValueViewIterator &rhs) |
| bool | operator!= (const CountedValueViewIterator &lhs, const CountedValueViewIterator &rhs) |
Iterator that returns a constant value for a fixed number of times. Useful for creating a virtual range of repeated values without storage.
+ +Definition at line 13 of file flow_counted_value_view_iterator.h.
+| using flow::CountedValueViewIterator< T >::difference_type = std::ptrdiff_t | +
Definition at line 21 of file flow_counted_value_view_iterator.h.
+ +| using flow::CountedValueViewIterator< T >::iterator_category = std::forward_iterator_tag | +
Definition at line 22 of file flow_counted_value_view_iterator.h.
+ +| using flow::CountedValueViewIterator< T >::pointer = const T* | +
Definition at line 20 of file flow_counted_value_view_iterator.h.
+ +| using flow::CountedValueViewIterator< T >::reference = const T& | +
Definition at line 19 of file flow_counted_value_view_iterator.h.
+ +| using flow::CountedValueViewIterator< T >::value_type = T | +
Definition at line 18 of file flow_counted_value_view_iterator.h.
+ +
+
|
+ +inline | +
Definition at line 24 of file flow_counted_value_view_iterator.h.
+References count_, and value_.
+ +Referenced by operator!=, operator++(), operator++(), and operator==.
+ +
+
|
+ +inline | +
Definition at line 28 of file flow_counted_value_view_iterator.h.
+
+
|
+ +inline | +
+
|
+ +inline | +
Definition at line 42 of file flow_counted_value_view_iterator.h.
+ +References count_, and CountedValueViewIterator().
+ +
+
|
+ +inline | +
Definition at line 48 of file flow_counted_value_view_iterator.h.
+References count_, and CountedValueViewIterator().
+ +
+
|
+ +inline | +
+
|
+ +friend | +
Definition at line 58 of file flow_counted_value_view_iterator.h.
+ +References CountedValueViewIterator().
+ +
+
|
+ +friend | +
+
|
+ +private | +
Definition at line 15 of file flow_counted_value_view_iterator.h.
+ +Referenced by CountedValueViewIterator(), CountedValueViewIterator(), operator++(), operator++(), and operator==.
+ +
+
|
+ +private | +
Definition at line 14 of file flow_counted_value_view_iterator.h.
+ +Referenced by CountedValueViewIterator(), CountedValueViewIterator(), operator*(), operator->(), and operator==.
+ +|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::DebugClass, including all inherited members.
+| copies_ | flow::DebugClass | private |
| copyCounter_ | flow::DebugClass | private |
| DebugClass() | flow::DebugClass | inline |
| DebugClass(const DebugClass &rhs) | flow::DebugClass | inline |
| DebugClass(DebugClass &&rhs) noexcept | flow::DebugClass | inline |
| globalId | flow::DebugClass | inlineprivatestatic |
| id_ | flow::DebugClass | private |
| operator<<(std::ostream &out, const DebugClass &obj) | flow::DebugClass | friend |
| operator=(const DebugClass &rhs) | flow::DebugClass | inline |
| operator=(DebugClass &&rhs) noexcept | flow::DebugClass | inline |
| ~DebugClass() | flow::DebugClass | inline |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
Debug class that tracks object's copy/move opeartions. Note that some of the operations may get optimized away with optimization on. + More...
+ +#include <flow_debug_memory.h>
+Public Member Functions | |
| DebugClass () | |
| DebugClass (const DebugClass &rhs) | |
| DebugClass (DebugClass &&rhs) noexcept | |
| ~DebugClass () | |
| DebugClass & | operator= (const DebugClass &rhs) |
| DebugClass & | operator= (DebugClass &&rhs) noexcept |
+Private Attributes | |
| std::shared_ptr< std::size_t > | copyCounter_ |
| std::size_t | copies_ |
| std::size_t | id_ |
+Static Private Attributes | |
| static std::size_t | globalId = 0 |
+Friends | |
| std::ostream & | operator<< (std::ostream &out, const DebugClass &obj) |
Debug class that tracks object's copy/move opeartions. Note that some of the operations may get optimized away with optimization on.
+ +Definition at line 27 of file flow_debug_memory.h.
+
+
|
+ +inline | +
Definition at line 33 of file flow_debug_memory.h.
+References copies_, copyCounter_, globalId, and id_.
+ +Referenced by DebugClass(), DebugClass(), operator<<, operator=(), and operator=().
+ +
+
|
+ +inline | +
Definition at line 40 of file flow_debug_memory.h.
+ +References copies_, copyCounter_, DebugClass(), and id_.
+ +
+
|
+ +inlinenoexcept | +
Definition at line 48 of file flow_debug_memory.h.
+References copies_, DebugClass(), and id_.
+ +
+
|
+ +inline | +
+
|
+ +inline | +
Definition at line 59 of file flow_debug_memory.h.
+References copies_, copyCounter_, DebugClass(), and id_.
+ +
+
|
+ +inlinenoexcept | +
Definition at line 66 of file flow_debug_memory.h.
+References copies_, copyCounter_, DebugClass(), and id_.
+ +
+
|
+ +friend | +
Definition at line 76 of file flow_debug_memory.h.
+References copies_, DebugClass(), and id_.
+ +
+
|
+ +private | +
Definition at line 29 of file flow_debug_memory.h.
+ +Referenced by DebugClass(), DebugClass(), DebugClass(), operator<<, operator=(), operator=(), and ~DebugClass().
+ +
+
|
+ +private | +
Definition at line 28 of file flow_debug_memory.h.
+ +Referenced by DebugClass(), DebugClass(), operator=(), and operator=().
+ +
+
|
+ +inlinestaticprivate | +
Definition at line 74 of file flow_debug_memory.h.
+ +Referenced by DebugClass().
+ +
+
|
+ +private | +
Definition at line 30 of file flow_debug_memory.h.
+ +Referenced by DebugClass(), DebugClass(), DebugClass(), operator<<, operator=(), operator=(), and ~DebugClass().
+ +|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::DefaultMemoryResource, including all inherited members.
+| allocate(std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) | flow::MemoryResource | inline |
| allocateImp(std::size_t bytes, std::size_t alignment) | flow::DefaultMemoryResource | inlineprivatevirtual |
| deallocate(void *address, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) | flow::MemoryResource | inline |
| deallocateImp(void *address, std::size_t bytes, std::size_t alignment) | flow::DefaultMemoryResource | inlineprivatevirtual |
| getResource() | flow::DefaultMemoryResource | inlinestatic |
| ~MemoryResource()=default | flow::MemoryResource | virtual |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
A default memory resource that wraps global ::operator new and ::operator delete. + More...
+ +#include <flow_default_memory_resource.h>
+Static Public Member Functions | |
| static DefaultMemoryResource & | getResource () |
+Private Member Functions | |
| virtual void * | allocateImp (std::size_t bytes, std::size_t alignment) |
| virtual void | deallocateImp (void *address, std::size_t bytes, std::size_t alignment) |
+Additional Inherited Members | |
| Public Member Functions inherited from flow::MemoryResource | |
| virtual | ~MemoryResource ()=default |
| void * | allocate (std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
| void | deallocate (void *address, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
A default memory resource that wraps global ::operator new and ::operator delete.
+ +Definition at line 9 of file flow_default_memory_resource.h.
+
+
|
+ +inlineprivatevirtual | +
Implements flow::MemoryResource.
+ +Definition at line 17 of file flow_default_memory_resource.h.
+
+
|
+ +inlineprivatevirtual | +
Implements flow::MemoryResource.
+ +Definition at line 21 of file flow_default_memory_resource.h.
+
+
|
+ +inlinestatic | +
Definition at line 11 of file flow_default_memory_resource.h.
+|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::MemoryResource, including all inherited members.
+| allocate(std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) | flow::MemoryResource | inline |
| allocateImp(std::size_t bytes, std::size_t alignment)=0 | flow::MemoryResource | protectedpure virtual |
| deallocate(void *address, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) | flow::MemoryResource | inline |
| deallocateImp(void *address, std::size_t bytes, std::size_t alignment)=0 | flow::MemoryResource | protectedpure virtual |
| ~MemoryResource()=default | flow::MemoryResource | virtual |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
A memory resource holder interface for the PolymorphicAllocator. Responsible for allocate and deallocate raw memory. + More...
+ +#include <flow_memory_resource.h>
+Public Member Functions | |
| virtual | ~MemoryResource ()=default |
| void * | allocate (std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
| void | deallocate (void *address, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
+Protected Member Functions | |
| virtual void * | allocateImp (std::size_t bytes, std::size_t alignment)=0 |
| virtual void | deallocateImp (void *address, std::size_t bytes, std::size_t alignment)=0 |
A memory resource holder interface for the PolymorphicAllocator. Responsible for allocate and deallocate raw memory.
+ +Definition at line 10 of file flow_memory_resource.h.
+
+
|
+ +virtualdefault | +
+
|
+ +inline | +
Definition at line 14 of file flow_memory_resource.h.
+References allocateImp().
+ +
+
|
+ +protectedpure virtual | +
Implemented in flow::ArenaMemoryResource, flow::DefaultMemoryResource, flow::PoolMemoryResource, and flow::StackMemoryResource.
+ +Referenced by allocate().
+ +
+
|
+ +inline | +
Definition at line 18 of file flow_memory_resource.h.
+References deallocateImp().
+ +
+
|
+ +protectedpure virtual | +
Implemented in flow::ArenaMemoryResource, flow::DefaultMemoryResource, flow::PoolMemoryResource, and flow::StackMemoryResource.
+ +Referenced by deallocate().
+ +|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::PolymorphicAllocator< T >, including all inherited members.
+|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
A polymorphic allocator that wraps around a non-owning memory resource. Memory allocation strategy is decided by memory resource's implementation. + More...
+ +#include <flow_polymorphic_allocator.h>
+Public Types | |
| using | value_type = T |
+Public Member Functions | |
| PolymorphicAllocator () | |
| PolymorphicAllocator (MemoryResource &resource) | |
| template<typename U> | |
| PolymorphicAllocator (const PolymorphicAllocator< U > &allocator) noexcept | |
| T * | allocate (std::size_t count) |
| Allocate raw memory that can contain at least count number of objects. | |
| void | deallocate (T *address, std::size_t count) noexcept |
| Deallocates allocated raw memory. | |
| template<typename U, typename... Args> | |
| void | construct (U *address, Args &&... args) |
| Constructs an object in place at the given address. | |
| template<typename U> | |
| void | destroy (U *address) noexcept |
| Destroys the object at the given address. | |
+Private Attributes | |
| MemoryResource * | resource_ |
+Friends | |
| template<typename U> | |
| class | PolymorphicAllocator |
| template<typename U> | |
| bool | operator== (const flow::PolymorphicAllocator< T > &lhs, const flow::PolymorphicAllocator< U > &rhs) |
| template<typename U> | |
| bool | operator!= (const flow::PolymorphicAllocator< T > &lhs, const flow::PolymorphicAllocator< U > &rhs) |
A polymorphic allocator that wraps around a non-owning memory resource. Memory allocation strategy is decided by memory resource's implementation.
+ +Definition at line 12 of file flow_polymorphic_allocator.h.
+| using flow::PolymorphicAllocator< T >::value_type = T | +
Definition at line 14 of file flow_polymorphic_allocator.h.
+ +
+
|
+ +inline | +
Definition at line 17 of file flow_polymorphic_allocator.h.
+References resource_.
+ +
+
|
+ +inlineexplicit | +
Definition at line 21 of file flow_polymorphic_allocator.h.
+ +References resource_.
+ +
+
|
+ +inlinenoexcept | +
Definition at line 26 of file flow_polymorphic_allocator.h.
+ +References PolymorphicAllocator.
+ +
+
|
+ +inline | +
Allocate raw memory that can contain at least count number of objects.
+| count | Number of objects to allocate |
Definition at line 35 of file flow_polymorphic_allocator.h.
+ +References resource_.
+ +
+
|
+ +inline | +
Constructs an object in place at the given address.
+ +Definition at line 52 of file flow_polymorphic_allocator.h.
+ +
+
|
+ +inlinenoexcept | +
Deallocates allocated raw memory.
+| address | Raw memory to deallocate. |
| count | Number of objects allocated. |
Definition at line 44 of file flow_polymorphic_allocator.h.
+ +References resource_.
+ +
+
|
+ +inlinenoexcept | +
Destroys the object at the given address.
+ +Definition at line 60 of file flow_polymorphic_allocator.h.
+ +
+
|
+ +friend | +
Definition at line 76 of file flow_polymorphic_allocator.h.
+ +
+
|
+ +friend | +
+
|
+ +friend | +
Definition at line 68 of file flow_polymorphic_allocator.h.
+ +References PolymorphicAllocator.
+ +Referenced by PolymorphicAllocator(), and PolymorphicAllocator.
+ +
+
|
+ +private | +
Definition at line 65 of file flow_polymorphic_allocator.h.
+ +Referenced by allocate(), deallocate(), operator==, PolymorphicAllocator(), and PolymorphicAllocator().
+ +|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::PoolMemoryResource, including all inherited members.
+| allocate(std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) | flow::MemoryResource | inline |
| allocateImp(std::size_t bytes, std::size_t alignment) override | flow::PoolMemoryResource | inlineprotectedvirtual |
| blockAlignment_ | flow::PoolMemoryResource | protected |
| blockSize_ | flow::PoolMemoryResource | protected |
| deallocate(void *address, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) | flow::MemoryResource | inline |
| deallocateImp(void *address, std::size_t bytes, std::size_t alignment) override | flow::PoolMemoryResource | inlineprotectedvirtual |
| head_ | flow::PoolMemoryResource | protected |
| PoolMemoryResource(void *buffer, std::size_t capacity, std::size_t blockSize, std::size_t blockAlignment=sizeof(std::max_align_t)) | flow::PoolMemoryResource | inline |
| ~MemoryResource()=default | flow::MemoryResource | virtual |
| ~PoolMemoryResource() | flow::PoolMemoryResource | inline |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
A pool memory resource that manages fixed-size memory blocks from a pre-allocated buffer. The allocation size must be less or equal to the block size. The allocation alignment must be less or equal to the block alignment. Throws std::bad_alloc if the constraint is not met or run out of memory. + More...
+ +#include <flow_pool_memory_resource.h>
+Classes | |
| struct | Header |
+Public Member Functions | |
| PoolMemoryResource (void *buffer, std::size_t capacity, std::size_t blockSize, std::size_t blockAlignment=sizeof(std::max_align_t)) | |
| ~PoolMemoryResource () | |
| Public Member Functions inherited from flow::MemoryResource | |
| virtual | ~MemoryResource ()=default |
| void * | allocate (std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
| void | deallocate (void *address, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
+Protected Member Functions | |
| virtual void * | allocateImp (std::size_t bytes, std::size_t alignment) override |
| virtual void | deallocateImp (void *address, std::size_t bytes, std::size_t alignment) override |
+Protected Attributes | |
| std::size_t | blockSize_ |
| std::size_t | blockAlignment_ |
| Header * | head_ |
A pool memory resource that manages fixed-size memory blocks from a pre-allocated buffer. The allocation size must be less or equal to the block size. The allocation alignment must be less or equal to the block alignment. Throws std::bad_alloc if the constraint is not met or run out of memory.
+ +Definition at line 15 of file flow_pool_memory_resource.h.
+
+
|
+ +inline | +
Definition at line 17 of file flow_pool_memory_resource.h.
+References flow::alignWithHeader(), blockAlignment_, blockSize_, head_, and flow::PoolMemoryResource::Header::next.
+ +
+
|
+ +inline | +
+
|
+ +inlineoverrideprotectedvirtual | +
Implements flow::MemoryResource.
+ +Definition at line 54 of file flow_pool_memory_resource.h.
+References blockAlignment_, blockSize_, and head_.
+ +
+
|
+ +inlineoverrideprotectedvirtual | +
Implements flow::MemoryResource.
+ +Definition at line 64 of file flow_pool_memory_resource.h.
+ +References head_, and flow::PoolMemoryResource::Header::next.
+ +
+
|
+ +protected | +
Definition at line 51 of file flow_pool_memory_resource.h.
+ +Referenced by allocateImp(), and PoolMemoryResource().
+ +
+
|
+ +protected | +
Definition at line 50 of file flow_pool_memory_resource.h.
+ +Referenced by allocateImp(), and PoolMemoryResource().
+ +
+
|
+ +protected | +
Definition at line 52 of file flow_pool_memory_resource.h.
+ +Referenced by allocateImp(), deallocateImp(), PoolMemoryResource(), and ~PoolMemoryResource().
+ +|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::StackMemoryResource, including all inherited members.
+| allocate(std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) | flow::MemoryResource | inline |
| allocateImp(std::size_t bytes, std::size_t alignment) override | flow::StackMemoryResource | inlineprotectedvirtual |
| buffer_ | flow::StackMemoryResource | protected |
| capacity_ | flow::StackMemoryResource | protected |
| deallocate(void *address, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) | flow::MemoryResource | inline |
| deallocateImp(void *address, std::size_t bytes, std::size_t alignment) override | flow::StackMemoryResource | inlineprotectedvirtual |
| StackMemoryResource(void *buffer, std::size_t capacity) noexcept | flow::StackMemoryResource | inlineexplicit |
| ~MemoryResource()=default | flow::MemoryResource | virtual |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
A stack-based memory resource that allocates memory in a LIFO order from a fixed buffer. Deallocation must happen in reverse order of allocation. Throws std::bad_alloc if there is insufficient space for an allocation. + More...
+ +#include <flow_stack_memory_resource.h>
+Classes | |
| struct | Header |
+Public Member Functions | |
| StackMemoryResource (void *buffer, std::size_t capacity) noexcept | |
| Public Member Functions inherited from flow::MemoryResource | |
| virtual | ~MemoryResource ()=default |
| void * | allocate (std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
| void | deallocate (void *address, std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) |
+Protected Member Functions | |
| virtual void * | allocateImp (std::size_t bytes, std::size_t alignment) override |
| virtual void | deallocateImp (void *address, std::size_t bytes, std::size_t alignment) override |
+Protected Attributes | |
| void * | buffer_ |
| std::size_t | capacity_ |
A stack-based memory resource that allocates memory in a LIFO order from a fixed buffer. Deallocation must happen in reverse order of allocation. Throws std::bad_alloc if there is insufficient space for an allocation.
+ +Definition at line 15 of file flow_stack_memory_resource.h.
+
+
|
+ +inlineexplicitnoexcept | +
Definition at line 17 of file flow_stack_memory_resource.h.
+
+
|
+ +inlineoverrideprotectedvirtual | +
Implements flow::MemoryResource.
+ +Definition at line 29 of file flow_stack_memory_resource.h.
+References flow::alignWithHeader(), buffer_, and capacity_.
+ +
+
|
+ +inlineoverrideprotectedvirtual | +
Implements flow::MemoryResource.
+ +Definition at line 44 of file flow_stack_memory_resource.h.
+References buffer_, capacity_, flow::StackMemoryResource::Header::oldBuffer, and flow::pointerDistance().
+ +
+
|
+ +protected | +
Definition at line 26 of file flow_stack_memory_resource.h.
+ +Referenced by allocateImp(), and deallocateImp().
+ +
+
|
+ +protected | +
Definition at line 27 of file flow_stack_memory_resource.h.
+ +Referenced by allocateImp(), and deallocateImp().
+ +|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::Timer< ClockType >, including all inherited members.
+| begin_ | flow::Timer< ClockType > | private |
| record() | flow::Timer< ClockType > | inline |
| reset() | flow::Timer< ClockType > | inline |
| size() const | flow::Timer< ClockType > | inline |
| TimePoint typedef | flow::Timer< ClockType > | private |
| timepoints_ | flow::Timer< ClockType > | private |
| Timer(std::size_t reserveSize=8) | flow::Timer< ClockType > | inlineexplicit |
| toString() const | flow::Timer< ClockType > | inline |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
A simple timer to record timelapses. Uses chrono::steady_clock by default. + More...
+ +#include <flow_timer.h>
+Public Member Functions | |
| constexpr | Timer (std::size_t reserveSize=8) |
| Constructs a Timer and reserves space for a given number of time points. | |
| constexpr std::size_t | size () const |
| Returns the number of recorded time points. | |
| void | reset () |
| Clears all recorded time points and reset the starting time. | |
| void | record () |
| Records the current time point relative to the last call to start(). | |
| std::string | toString () const |
| Formats and returns a string showing all recorded durations since the timer resets. | |
+Private Types | |
| using | TimePoint = ClockType::time_point |
+Private Attributes | |
| TimePoint | begin_ {} |
| std::vector< TimePoint > | timepoints_ {} |
A simple timer to record timelapses. Uses chrono::steady_clock by default.
+ +Definition at line 11 of file flow_timer.h.
+
+
|
+ +private | +
Definition at line 12 of file flow_timer.h.
+ +
+
|
+ +inlineexplicitconstexpr | +
Constructs a Timer and reserves space for a given number of time points.
+ +Definition at line 20 of file flow_timer.h.
+References timepoints_.
+ +
+
|
+ +inline | +
Records the current time point relative to the last call to start().
+ +Definition at line 43 of file flow_timer.h.
+ +References timepoints_.
+ +
+
|
+ +inline | +
Clears all recorded time points and reset the starting time.
+ +Definition at line 35 of file flow_timer.h.
+ +References begin_, and timepoints_.
+ +
+
|
+ +inlineconstexpr | +
Returns the number of recorded time points.
+Definition at line 28 of file flow_timer.h.
+ +References timepoints_.
+ +
+
|
+ +inline | +
Formats and returns a string showing all recorded durations since the timer resets.
+Definition at line 51 of file flow_timer.h.
+ +References begin_, and timepoints_.
+ +
+
|
+ +private | +
Definition at line 13 of file flow_timer.h.
+Referenced by reset(), and toString().
+ +
+
|
+ +private | +
Definition at line 14 of file flow_timer.h.
+Referenced by record(), reset(), size(), Timer(), and toString().
+ +|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::Tuple< Ts >, including all inherited members.
+| size() const | flow::Tuple< Ts > | inline |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <flow_tuple.h>
+Public Member Functions | |
| constexpr std::size_t | size () const |
Definition at line 5 of file flow_tuple.h.
+
+
|
+ +inlineconstexpr | +
Definition at line 7 of file flow_tuple.h.
+|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::Tuple< T, Ts... >, including all inherited members.
+| BaseType typedef | flow::Tuple< T, Ts... > | private |
| get() | flow::Tuple< T, Ts... > | inline |
| get() const | flow::Tuple< T, Ts... > | inline |
| size() const | flow::Tuple< T, Ts... > | inline |
| Tuple() | flow::Tuple< T, Ts... > | inline |
| Tuple(Arg1 &&value, Args2 &&... values) | flow::Tuple< T, Ts... > | inlineexplicit |
| value_ | flow::Tuple< T, Ts... > | private |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <flow_tuple.h>
+Public Member Functions | |
| constexpr | Tuple () |
| template<typename Arg1, typename ... Args2> | |
| constexpr | Tuple (Arg1 &&value, Args2 &&... values) |
| constexpr std::size_t | size () const |
| template<std::size_t N> | |
| auto & | get () |
| template<std::size_t N> | |
| const auto & | get () const |
+Private Types | |
| using | BaseType = Tuple<Ts...> |
+Private Attributes | |
| T | value_ |
+Additional Inherited Members | |
| Private Member Functions inherited from flow::Tuple< Ts... > | |
| constexpr std::size_t | size () const |
Definition at line 13 of file flow_tuple.h.
+
+
|
+ +private | +
Definition at line 14 of file flow_tuple.h.
+ +
+
|
+ +inlineconstexpr | +
+
|
+ +inlineexplicitconstexpr | +
Definition at line 23 of file flow_tuple.h.
+References value_.
+ +
+
|
+ +inline | +
Definition at line 32 of file flow_tuple.h.
+References value_.
+ +
+
|
+ +inline | +
Definition at line 41 of file flow_tuple.h.
+References value_.
+ +
+
|
+ +inlineconstexpr | +
Definition at line 27 of file flow_tuple.h.
+
+
|
+ +private | +
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
This is the complete list of members for flow::Vector< T, Allocator, Strategy >, including all inherited members.
+|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <flow_vector.h>
+Public Types | |
| using | value_type = T |
| using | reference = T& |
| using | const_reference = const T& |
| using | pointer = T* |
| using | const_pointer = const T* |
| using | iterator = T* |
| using | const_iterator = const T* |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
| using | allocator_type = std::allocator_traits<Allocator>::template rebind_alloc<T> |
+Public Member Functions | |
| constexpr | Vector () noexcept |
| constexpr | Vector (const allocator_type &allocator) |
| constexpr | Vector (const Vector &rhs) |
| constexpr | Vector (const Vector &rhs, const allocator_type &allocator) |
| constexpr | Vector (Vector &&rhs) noexcept |
| constexpr | Vector (Vector &&rhs, const allocator_type &allocator) |
| template<std::input_iterator It> | |
| constexpr | Vector (It first, It last, const allocator_type &allocator={}) |
| constexpr | Vector (std::initializer_list< T > list, const allocator_type &allocator={}) |
| constexpr | Vector (std::size_t count, const allocator_type &allocator={}) |
| constexpr | Vector (std::size_t count, const T &value, const allocator_type &allocator={}) |
| ~Vector () | |
| Vector & | operator= (Vector rhs) noexcept |
| T & | operator[] (std::size_t i) noexcept |
| const T & | operator[] (std::size_t i) const noexcept |
| allocator_type | get_allocator () const noexcept |
| iterator | begin () noexcept |
| constexpr const_iterator | begin () const noexcept |
| iterator | end () noexcept |
| constexpr const_iterator | end () const noexcept |
| constexpr std::size_t | size () const noexcept |
| constexpr std::size_t | capacity () const noexcept |
| constexpr bool | empty () const noexcept |
| T & | front () noexcept |
| constexpr const T & | front () const noexcept |
| T & | back () noexcept |
| constexpr const T & | back () const noexcept |
| void | clear () noexcept |
| void | reserve (std::size_t capacity) |
| void | resize (std::size_t size) |
| void | resize (std::size_t size, const T &value) |
| void | pushBack (const T &value) |
| void | pushBack (T &&value) |
| template<typename ... Args> | |
| void | emplaceBack (Args &&... args) |
| void | popBack () noexcept |
| iterator | erase (iterator pos) noexcept |
| Removes the element at the given position. | |
| iterator | erase (iterator first, iterator last) noexcept |
| Removes elements in the range [first, last). | |
| template<typename ... Args> | |
| void | emplace (iterator pos, Args &&... args) |
| void | insert (iterator pos, const T &value) |
| void | insert (iterator pos, T &&value) |
| void | insert (iterator pos, std::size_t count, const T &value) |
| template<std::input_iterator It> | |
| void | insert (iterator pos, It first, It last) |
| void | insert (iterator pos, std::initializer_list< T > list) |
+Private Types | |
| using | allocator_trait = std::allocator_traits<Allocator>::template rebind_traits<T> |
+Private Member Functions | |
| void | updateBuffer (T *buffer, std::size_t capacity) |
| void | relocateBuffer (std::size_t capacity) |
| void | relocateBufferWithHoles (std::size_t capacity, iterator pos, std::size_t holeSize) |
| template<typename ... U> | |
| void | resizeImp (std::size_t size, const U &... optionalValue) |
+Private Attributes | |
| allocator_type | allocator_ |
| Strategy | growthStrategy_ |
| std::size_t | size_ |
| std::size_t | capacity_ |
| T * | buffer_ |
+Friends | |
| void | swap (Vector &lhs, Vector &rhs) noexcept |
Definition at line 47 of file flow_vector.h.
+
+
|
+ +private | +
Definition at line 61 of file flow_vector.h.
+ +| using flow::Vector< T, Allocator, Strategy >::allocator_type = std::allocator_traits<Allocator>::template rebind_alloc<T> | +
Definition at line 58 of file flow_vector.h.
+ +| using flow::Vector< T, Allocator, Strategy >::const_iterator = const T* | +
Definition at line 55 of file flow_vector.h.
+ +| using flow::Vector< T, Allocator, Strategy >::const_pointer = const T* | +
Definition at line 53 of file flow_vector.h.
+ +| using flow::Vector< T, Allocator, Strategy >::const_reference = const T& | +
Definition at line 51 of file flow_vector.h.
+ +| using flow::Vector< T, Allocator, Strategy >::difference_type = std::ptrdiff_t | +
Definition at line 57 of file flow_vector.h.
+ +| using flow::Vector< T, Allocator, Strategy >::iterator = T* | +
Definition at line 54 of file flow_vector.h.
+ +| using flow::Vector< T, Allocator, Strategy >::pointer = T* | +
Definition at line 52 of file flow_vector.h.
+ +| using flow::Vector< T, Allocator, Strategy >::reference = T& | +
Definition at line 50 of file flow_vector.h.
+ +| using flow::Vector< T, Allocator, Strategy >::size_type = std::size_t | +
Definition at line 56 of file flow_vector.h.
+ +| using flow::Vector< T, Allocator, Strategy >::value_type = T | +
Definition at line 49 of file flow_vector.h.
+ +
+
|
+ +inlineconstexprnoexcept | +
Definition at line 116 of file flow_vector.h.
+References Vector().
+ +Referenced by operator=(), swap, Vector(), Vector(), Vector(), Vector(), and Vector().
+ +
+
|
+ +inlineexplicitconstexpr | +
Definition at line 120 of file flow_vector.h.
+References allocator_, buffer_, capacity_, growthStrategy_, and size_.
+ +
+
|
+ +inlineconstexpr | +
Definition at line 128 of file flow_vector.h.
+References get_allocator(), and Vector().
+ +
+
|
+ +inlineconstexpr | +
Definition at line 132 of file flow_vector.h.
+References allocator_, begin(), buffer_, capacity_, end(), growthStrategy_, size_, flow::uninitializedForward(), and Vector().
+ +
+
|
+ +inlineconstexprnoexcept | +
+
|
+ +inlineconstexpr | +
Definition at line 147 of file flow_vector.h.
+References Vector().
+ +
+
|
+ +inlineexplicitconstexpr | +
Definition at line 160 of file flow_vector.h.
+
+
|
+ +inlineconstexpr | +
+
|
+ +inlineexplicitconstexpr | +
Definition at line 173 of file flow_vector.h.
+
+
|
+ +inlineexplicitconstexpr | +
Definition at line 182 of file flow_vector.h.
+
+
|
+ +inline | +
Definition at line 192 of file flow_vector.h.
+References allocator_, buffer_, capacity_, flow::deleteBuffer(), and size_.
+ +
+
|
+ +inlineconstexprnoexcept | +
+
|
+ +inlinenoexcept | +
+
|
+ +inlineconstexprnoexcept | +
Definition at line 222 of file flow_vector.h.
+ +References buffer_.
+ +
+
|
+ +inlinenoexcept | +
Definition at line 218 of file flow_vector.h.
+ +References buffer_.
+ +Referenced by erase(), erase(), insert(), relocateBuffer(), relocateBufferWithHoles(), and Vector().
+ +
+
|
+ +inlineconstexprnoexcept | +
Definition at line 239 of file flow_vector.h.
+ +References capacity_.
+ +Referenced by relocateBuffer(), relocateBufferWithHoles(), reserve(), and updateBuffer().
+ +
+
|
+ +inlinenoexcept | +
Definition at line 268 of file flow_vector.h.
+References allocator_, buffer_, flow::destroyElementsN(), and size_.
+ +
+
|
+ +inline | +
Definition at line 341 of file flow_vector.h.
+References allocator_, back(), buffer_, capacity_, emplaceBack(), end(), growthStrategy_, relocateBufferWithHoles(), and size_.
+ + + +
+
|
+ +inline | +
Definition at line 298 of file flow_vector.h.
+ +References allocator_, buffer_, capacity_, growthStrategy_, relocateBuffer(), and size_.
+ +Referenced by emplace(), pushBack(), and pushBack().
+ +
+
|
+ +inlineconstexprnoexcept | +
Definition at line 243 of file flow_vector.h.
+ +References size_.
+ +
+
|
+ +inlineconstexprnoexcept | +
+
|
+ +inlinenoexcept | +
Definition at line 226 of file flow_vector.h.
+ +References buffer_, and size_.
+ +Referenced by emplace(), erase(), erase(), insert(), relocateBuffer(), relocateBufferWithHoles(), and Vector().
+ +
+
|
+ +inlinenoexcept | +
Removes elements in the range [first, last).
+| first | Iterator to the start of the range to remove. |
| last | Iterator to the end of the range to remove. |
Definition at line 330 of file flow_vector.h.
+References allocator_, begin(), flow::destroyElements(), end(), and size_.
+ +
+
|
+ +inlinenoexcept | +
Removes the element at the given position.
+| pos | Iterator to the element to remove (must not be end()). |
Definition at line 317 of file flow_vector.h.
+ + + +
+
|
+ +inlineconstexprnoexcept | +
+
|
+ +inlinenoexcept | +
+
|
+ +inlinenoexcept | +
Definition at line 213 of file flow_vector.h.
+ +References allocator_.
+ +Referenced by Vector().
+ +
+
|
+ +inline | +
Definition at line 364 of file flow_vector.h.
+References emplace().
+ + + +
+
|
+ +inline | +
Definition at line 378 of file flow_vector.h.
+References allocator_, begin(), capacity_, end(), growthStrategy_, relocateBufferWithHoles(), size_, flow::uninitializedForward(), flow::uninitializedForwardN(), and flow::uninitializedMove().
+ +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inlinenoexcept | +
+
|
+ +inlinenoexcept | +
+
|
+ +inlinenoexcept | +
+
|
+ +inlinenoexcept | +
Definition at line 306 of file flow_vector.h.
+ +References allocator_, buffer_, and size_.
+ +Referenced by erase().
+ +
+
|
+ +inline | +
Definition at line 289 of file flow_vector.h.
+ +References emplaceBack().
+ +
+
|
+ +inline | +
Definition at line 293 of file flow_vector.h.
+ +References emplaceBack().
+ +
+
|
+ +inlineprivate | +
Definition at line 78 of file flow_vector.h.
+References allocator_, begin(), capacity(), capacity_, end(), flow::uninitializedMove(), and updateBuffer().
+ +Referenced by emplaceBack(), reserve(), and resizeImp().
+ +
+
|
+ +inlineprivate | +
Definition at line 87 of file flow_vector.h.
+References allocator_, begin(), capacity(), capacity_, end(), flow::uninitializedMove(), and updateBuffer().
+ + + +
+
|
+ +inline | +
Definition at line 273 of file flow_vector.h.
+ +References capacity(), capacity_, and relocateBuffer().
+ +
+
|
+ +inline | +
Definition at line 279 of file flow_vector.h.
+References resizeImp(), and size().
+ +
+
|
+ +inline | +
Definition at line 283 of file flow_vector.h.
+ +References resizeImp(), and size().
+ +
+
|
+ +inlineprivate | +
Definition at line 97 of file flow_vector.h.
+References allocator_, buffer_, capacity_, flow::destroyElements(), relocateBuffer(), size(), size_, and flow::uninitializedEmplace().
+ + + +
+
|
+ +inlineconstexprnoexcept | +
Definition at line 235 of file flow_vector.h.
+ +References size_.
+ +Referenced by resize(), resize(), and resizeImp().
+ +
+
|
+ +inlineprivate | +
Definition at line 70 of file flow_vector.h.
+References allocator_, buffer_, capacity(), capacity_, flow::deleteBuffer(), and size_.
+ +Referenced by relocateBuffer(), and relocateBufferWithHoles().
+ +
+
|
+ +friend | +
Definition at line 424 of file flow_vector.h.
+References swap, and Vector().
+ +Referenced by operator=(), and swap.
+ +
+
|
+ +private | +
Definition at line 63 of file flow_vector.h.
+ +Referenced by clear(), emplace(), emplaceBack(), erase(), get_allocator(), insert(), popBack(), relocateBuffer(), relocateBufferWithHoles(), resizeImp(), updateBuffer(), Vector(), Vector(), and ~Vector().
+ +
+
|
+ +private | +
Definition at line 67 of file flow_vector.h.
+ +Referenced by back(), back(), begin(), begin(), clear(), emplace(), emplaceBack(), end(), end(), front(), front(), operator[](), operator[](), popBack(), resizeImp(), updateBuffer(), Vector(), Vector(), and ~Vector().
+ +
+
|
+ +private | +
Definition at line 66 of file flow_vector.h.
+ +Referenced by capacity(), emplace(), emplaceBack(), insert(), relocateBuffer(), relocateBufferWithHoles(), reserve(), resizeImp(), updateBuffer(), Vector(), Vector(), and ~Vector().
+ +
+
|
+ +private | +
Definition at line 64 of file flow_vector.h.
+ +Referenced by emplace(), emplaceBack(), insert(), Vector(), and Vector().
+ +
+
|
+ +private | +
Definition at line 65 of file flow_vector.h.
+ +Referenced by back(), back(), clear(), emplace(), emplaceBack(), empty(), end(), end(), erase(), front(), front(), insert(), operator[](), operator[](), popBack(), resizeImp(), size(), updateBuffer(), Vector(), Vector(), and ~Vector().
+ +|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <flow_vector.h>
Definition at line 14 of file flow_vector.h.
+|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
| Nflow | |
| RGrowthStrategy |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include "flow_memory_resource.h"#include <cassert>#include <cstddef>#include <exception>#include <memory>Go to the source code of this file.
++Classes | |
| class | flow::ArenaMemoryResource |
| A linear arena memory resource that allocates memory sequentially from a fixed buffer. Throws std::bad_alloc if there is insufficient space for the requested allocation. More... | |
+Namespaces | |
| namespace | flow |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <memory>#include <mutex>#include <optional>Go to the source code of this file.
++Classes | |
| class | flow::ConcurrentFlexQueue< T > |
| struct | flow::ConcurrentFlexQueue< T >::Node |
+Namespaces | |
| namespace | flow |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <deque>#include <mutex>#include <optional>#include <queue>Go to the source code of this file.
++Classes | |
| class | flow::ConcurrentQueue< T, Container > |
+Namespaces | |
| namespace | flow |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <cassert>#include <cstddef>#include <iterator>Go to the source code of this file.
++Classes | |
| class | flow::CountedValueViewIterator< T > |
| Iterator that returns a constant value for a fixed number of times. Useful for creating a virtual range of repeated values without storage. More... | |
+Namespaces | |
| namespace | flow |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <format>#include <iostream>Go to the source code of this file.
++Classes | |
| class | flow::DebugClass |
| Debug class that tracks object's copy/move opeartions. Note that some of the operations may get optimized away with optimization on. More... | |
+Namespaces | |
| namespace | flow |
+Functions | |
| void | flow::enableMemoryGuard () |
| Enable MSVC native memory leak checker in debug mode. Not compatible with the address sanitizer. | |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include "flow_memory_resource.h"Go to the source code of this file.
++Classes | |
| class | flow::DefaultMemoryResource |
| A default memory resource that wraps global ::operator new and ::operator delete. More... | |
+Namespaces | |
| namespace | flow |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <cassert>#include <iterator>#include <memory>Go to the source code of this file.
++Namespaces | |
| namespace | flow |
+Functions | |
| template<typename AllocatorType, std::input_iterator InputIt, std::forward_iterator OutputIt> | |
| OutputIt | flow::uninitializedForward (AllocatorType &allocator, InputIt first, InputIt last, OutputIt dest) |
| Forward elements from a source range to uninitialized memory. | |
| template<typename AllocatorType, std::input_iterator InputIt, std::forward_iterator OutputIt> | |
| OutputIt | flow::uninitializedMove (AllocatorType &allocator, InputIt first, InputIt last, OutputIt dest) noexcept |
| Moves elements from a source range to uninitialized memory. | |
| template<typename AllocatorType, std::forward_iterator OutputIt, typename ... Args> | |
| OutputIt | flow::uninitializedEmplace (AllocatorType &allocator, OutputIt first, OutputIt last, const Args &... args) |
| Constructs objects in uninitialized memory by copying arguments to their constructor. Is is intentional that the arguments are copied instead of forwarded to prevent reuse moved objects. | |
| template<typename AllocatorType, std::forward_iterator OutputIt, typename T> | |
| OutputIt | flow::uninitializedFill (AllocatorType &allocator, OutputIt first, OutputIt last, const T &value) |
| Fills uninitialized memory with copies of a value. | |
| template<typename AllocatorType, std::forward_iterator InputIt> | |
| void | flow::destroyElements (AllocatorType &allocator, InputIt first, InputIt last) noexcept |
| Destroys a range of constructed objects in memory. | |
| template<typename AllocatorType, std::input_iterator InputIt, std::forward_iterator OutputIt> | |
| OutputIt | flow::uninitializedForwardN (AllocatorType &allocator, InputIt first, std::size_t count, OutputIt dest) |
| Forward count elements from a source range to uninitialized memory. | |
| template<typename AllocatorType, std::input_iterator InputIt, std::forward_iterator OutputIt> | |
| OutputIt | flow::uninitializedMoveN (AllocatorType &allocator, InputIt first, std::size_t count, OutputIt dest) noexcept |
| Moves count elements from a source range to uninitialized memory. | |
| template<typename AllocatorType, std::forward_iterator OutputIt, typename ... Args> | |
| OutputIt | flow::uninitializedEmplaceN (AllocatorType &allocator, OutputIt first, std::size_t count, const Args &... args) |
| Constructs a specified number of objects in uninitialized memory by forwarding arguments to their constructor. Is is intentional that the arguments are copied instead of forwarded to prevent reuse moved objects. | |
| template<typename AllocatorType, std::forward_iterator OutputIt, typename T> | |
| OutputIt | flow::uninitializedFillN (AllocatorType &allocator, OutputIt first, std::size_t count, const T &value) |
| Fills count elements in uninitialized memory with a value. | |
| template<typename AllocatorType, std::forward_iterator InputIt> | |
| void | flow::destroyElementsN (AllocatorType &allocator, InputIt first, std::size_t count) noexcept |
| Destroys count objects in a range. | |
| template<typename AllocatorType, typename T> | |
| void | flow::deleteBuffer (AllocatorType &allocator, T *buffer, std::size_t size, std::size_t capacity) noexcept |
| Destroys and deallocates the buffer, where size is the number of constructed elements and capacity is the buffer capacity. | |
| template<typename T, typename U> | |
| std::size_t | flow::pointerDistance (const T *first, const U *last) |
| Calculate the distance from the first pointer to the last pointer in bytes. | |
| template<typename Header> | |
| Header * | flow::alignWithHeader (std::size_t alignment, std::size_t size, void *&buffer, std::size_t &capacity) noexcept |
| Align the header + buffer to their corresponding alignments. If the capacity is not big enough to accommodate, then return nullptr. This function is similar to std::align, but it also aligns a header in the front. | |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <cstddef>Go to the source code of this file.
++Classes | |
| class | flow::MemoryResource |
| A memory resource holder interface for the PolymorphicAllocator. Responsible for allocate and deallocate raw memory. More... | |
+Namespaces | |
| namespace | flow |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
Go to the source code of this file.
++Classes | |
| class | flow::PolymorphicAllocator< T > |
| A polymorphic allocator that wraps around a non-owning memory resource. Memory allocation strategy is decided by memory resource's implementation. More... | |
+Namespaces | |
| namespace | flow |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include "flow_memory_algorithm.h"#include "flow_memory_resource.h"#include <cstddef>#include <exception>Go to the source code of this file.
++Classes | |
| class | flow::PoolMemoryResource |
| A pool memory resource that manages fixed-size memory blocks from a pre-allocated buffer. The allocation size must be less or equal to the block size. The allocation alignment must be less or equal to the block alignment. Throws std::bad_alloc if the constraint is not met or run out of memory. More... | |
| struct | flow::PoolMemoryResource::Header |
+Namespaces | |
| namespace | flow |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <algorithm>#include <concepts>#include <random>Go to the source code of this file.
++Namespaces | |
| namespace | flow |
+Functions | |
| template<typename T> +requires std::integral<T> || std::floating_point<T> | |
| T | flow::getRandomNumber (T lower, T upper) |
| Produces a random number uniformly distributed on the closed interval [lower, upper]. | |
| template<std::random_access_iterator It> | |
| void | flow::shuffle (It begin, It end) |
| Randomly shuffle the elements in the range [begin, end). | |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include "flow_memory_algorithm.h"#include "flow_memory_resource.h"#include <cassert>#include <cstddef>#include <exception>Go to the source code of this file.
++Classes | |
| class | flow::StackMemoryResource |
| A stack-based memory resource that allocates memory in a LIFO order from a fixed buffer. Deallocation must happen in reverse order of allocation. Throws std::bad_alloc if there is insufficient space for an allocation. More... | |
| struct | flow::StackMemoryResource::Header |
+Namespaces | |
| namespace | flow |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include <chrono>#include <format>#include <vector>Go to the source code of this file.
++Classes | |
| class | flow::Timer< ClockType > |
| A simple timer to record timelapses. Uses chrono::steady_clock by default. More... | |
+Namespaces | |
| namespace | flow |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
Go to the source code of this file.
++Classes | |
| class | flow::Tuple< Ts > |
| class | flow::Tuple< T, Ts... > |
+Namespaces | |
| namespace | flow |
+Functions | |
| template<typename T, typename ... Ts> | |
| flow::Tuple (T &&, Ts &&...) -> Tuple< T, Ts... > | |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
#include "flow_counted_value_view_iterator.h"#include "flow_memory_algorithm.h"#include "flow_polymorphic_allocator.h"#include <cassert>#include <concepts>#include <initializer_list>#include <memory>#include <utility>Go to the source code of this file.
++Classes | |
| struct | flow::VectorGrowthStrategy |
| struct | flow::VectorGrowthStrategy::GoldenExpand |
| struct | flow::VectorGrowthStrategy::DoubleExpand |
| struct | flow::VectorGrowthStrategy::FibonacciExpand |
| class | flow::Vector< T, Allocator, Strategy > |
+Namespaces | |
| namespace | flow |
+Concepts | |
| concept | flow::GrowthStrategy |
+Functions | |
| template<typename T> | |
| bool | operator== (const flow::Vector< T > &lhs, const flow::Vector< T > &rhs) noexcept |
| template<typename T> | |
| bool | operator!= (const flow::Vector< T > &lhs, const flow::Vector< T > &rhs) noexcept |
+
|
+ +noexcept | +
Definition at line 441 of file flow_vector.h.
+
+
|
+ +noexcept | +
Definition at line 436 of file flow_vector.h.
+|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+
| Cflow::ConcurrentFlexQueue< T > | |
| Cflow::ConcurrentQueue< T, Container > | |
| Cflow::CountedValueViewIterator< T > | Iterator that returns a constant value for a fixed number of times. Useful for creating a virtual range of repeated values without storage |
| Cflow::DebugClass | Debug class that tracks object's copy/move opeartions. Note that some of the operations may get optimized away with optimization on |
| Cflow::VectorGrowthStrategy::DoubleExpand | |
| Cflow::VectorGrowthStrategy::FibonacciExpand | |
| Cflow::VectorGrowthStrategy::GoldenExpand | |
| Cflow::PoolMemoryResource::Header | |
| Cflow::StackMemoryResource::Header | |
| Cflow::MemoryResource | A memory resource holder interface for the PolymorphicAllocator. Responsible for allocate and deallocate raw memory |
| Cflow::ArenaMemoryResource | A linear arena memory resource that allocates memory sequentially from a fixed buffer. Throws std::bad_alloc if there is insufficient space for the requested allocation |
| Cflow::DefaultMemoryResource | A default memory resource that wraps global ::operator new and ::operator delete |
| Cflow::PoolMemoryResource | A pool memory resource that manages fixed-size memory blocks from a pre-allocated buffer. The allocation size must be less or equal to the block size. The allocation alignment must be less or equal to the block alignment. Throws std::bad_alloc if the constraint is not met or run out of memory |
| Cflow::StackMemoryResource | A stack-based memory resource that allocates memory in a LIFO order from a fixed buffer. Deallocation must happen in reverse order of allocation. Throws std::bad_alloc if there is insufficient space for an allocation |
| Cflow::ConcurrentFlexQueue< T >::Node | |
| Cflow::PolymorphicAllocator< T > | A polymorphic allocator that wraps around a non-owning memory resource. Memory allocation strategy is decided by memory resource's implementation |
| Cflow::Timer< ClockType > | A simple timer to record timelapses. Uses chrono::steady_clock by default |
| Cflow::Tuple< Ts > | |
| Cflow::Tuple< Ts... > | |
| Cflow::Tuple< T, Ts... > | |
| Cflow::Vector< T, Allocator, Strategy > | |
| Cflow::VectorGrowthStrategy |
|
+ Flow
+
+ Documentation for the Flow C++ Library
+ |
+