diff --git a/annotated.html b/annotated.html index 7034197..8e29758 100644 --- a/annotated.html +++ b/annotated.html @@ -129,7 +129,7 @@  COnceFunction  CParallelForExecutor  CParForOptions - CPoolAllocator + CPoolAllocatorT  CReserveTagS  CResource  CResourcePool diff --git a/annotated_dup.js b/annotated_dup.js index 9af4ef3..8007389 100644 --- a/annotated_dup.js +++ b/annotated_dup.js @@ -26,7 +26,7 @@ var annotated_dup = [ "OnceFunction", "classdispenso_1_1_once_function.html", "classdispenso_1_1_once_function" ], [ "ParallelForExecutor", "classdispenso_1_1_parallel_for_executor.html", "classdispenso_1_1_parallel_for_executor" ], [ "ParForOptions", "structdispenso_1_1_par_for_options.html", "structdispenso_1_1_par_for_options" ], - [ "PoolAllocator", "classdispenso_1_1_pool_allocator.html", "classdispenso_1_1_pool_allocator" ], + [ "PoolAllocatorT", "classdispenso_1_1_pool_allocator_t.html", "classdispenso_1_1_pool_allocator_t" ], [ "ReserveTagS", "structdispenso_1_1_reserve_tag_s.html", null ], [ "Resource", "classdispenso_1_1_resource.html", "classdispenso_1_1_resource" ], [ "ResourcePool", "classdispenso_1_1_resource_pool.html", "classdispenso_1_1_resource_pool" ], diff --git a/classdispenso_1_1_bi_prop_node.html b/classdispenso_1_1_bi_prop_node.html index f9d3cb9..17a13d5 100644 --- a/classdispenso_1_1_bi_prop_node.html +++ b/classdispenso_1_1_bi_prop_node.html @@ -176,7 +176,7 @@

Detailed Description

Class to store task with dependencies. Support bidirectional propagation dependency between nodes.

-

Definition at line 356 of file graph.h.

+

Definition at line 358 of file graph.h.

Constructor & Destructor Documentation

◆ BiPropNode()

@@ -202,7 +202,7 @@

-

Definition at line 361 of file graph.h.

+

Definition at line 363 of file graph.h.

@@ -240,7 +240,7 @@

Definition at line 370 of file graph.h.

+

Definition at line 372 of file graph.h.

@@ -267,7 +267,7 @@

-

Definition at line 391 of file graph.h.

+

Definition at line 393 of file graph.h.

diff --git a/classdispenso_1_1_graph_t.html b/classdispenso_1_1_graph_t.html index 06844d7..0765fd2 100644 --- a/classdispenso_1_1_graph_t.html +++ b/classdispenso_1_1_graph_t.html @@ -167,7 +167,7 @@

Detailed Description

template<class N>
class dispenso::GraphT< N >
-

Definition at line 493 of file graph.h.

+

Definition at line 510 of file graph.h.

Member Typedef Documentation

◆ NodeType

@@ -183,7 +183,7 @@

-

Definition at line 495 of file graph.h.

+

Definition at line 512 of file graph.h.

@@ -201,7 +201,7 @@

-

Definition at line 496 of file graph.h.

+

Definition at line 513 of file graph.h.

@@ -232,7 +232,7 @@

Create empty graph.

-

Definition at line 498 of file graph.h.

+

Definition at line 515 of file graph.h.

@@ -255,7 +255,7 @@

Move constructor

-

Definition at line 110 of file graph.cpp.

+

Definition at line 175 of file graph.cpp.

@@ -295,7 +295,7 @@

Definition at line 520 of file graph.h.

+

Definition at line 537 of file graph.h.

@@ -314,7 +314,7 @@

Create an empty subgraph. This is not concurrency safe.

-

Definition at line 126 of file graph.cpp.

+

Definition at line 191 of file graph.cpp.

@@ -344,7 +344,7 @@

Destroy all nodes and subgraphs. This is not concurrency safe.

-

Definition at line 623 of file graph.h.

+

Definition at line 640 of file graph.h.

@@ -383,7 +383,7 @@

Definition at line 613 of file graph.h.

+

Definition at line 630 of file graph.h.

@@ -422,7 +422,7 @@

Definition at line 600 of file graph.h.

+

Definition at line 617 of file graph.h.

@@ -461,7 +461,7 @@

Definition at line 588 of file graph.h.

+

Definition at line 605 of file graph.h.

@@ -500,7 +500,7 @@

Definition at line 577 of file graph.h.

+

Definition at line 594 of file graph.h.

@@ -537,7 +537,7 @@

Definition at line 542 of file graph.h.

+

Definition at line 559 of file graph.h.

@@ -574,7 +574,7 @@

Definition at line 534 of file graph.h.

+

Definition at line 551 of file graph.h.

@@ -604,7 +604,7 @@

Return number of nodes in subgraph 0. Concurrency safe.

-

Definition at line 526 of file graph.h.

+

Definition at line 543 of file graph.h.

@@ -634,7 +634,7 @@

Return number of subgraphs in the graph including subgraph 0. Concurrency safe.

-

Definition at line 552 of file graph.h.

+

Definition at line 569 of file graph.h.

@@ -657,7 +657,7 @@

Move assignment operator

-

Definition at line 117 of file graph.cpp.

+

Definition at line 182 of file graph.cpp.

@@ -694,7 +694,7 @@

Definition at line 568 of file graph.h.

+

Definition at line 585 of file graph.h.

@@ -731,7 +731,7 @@

Definition at line 560 of file graph.h.

+

Definition at line 577 of file graph.h.

@@ -760,7 +760,7 @@

-

Definition at line 639 of file graph.h.

+

Definition at line 658 of file graph.h.

diff --git a/classdispenso_1_1_node.html b/classdispenso_1_1_node.html index e37845e..b47d386 100644 --- a/classdispenso_1_1_node.html +++ b/classdispenso_1_1_node.html @@ -173,7 +173,7 @@

Detailed Description

Class to store task with dependencies

-

Definition at line 219 of file graph.h.

+

Definition at line 221 of file graph.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

@@ -199,7 +199,7 @@

-

Definition at line 224 of file graph.h.

+

Definition at line 226 of file graph.h.

@@ -226,7 +226,7 @@

-

Definition at line 233 of file graph.h.

+

Definition at line 235 of file graph.h.

@@ -256,7 +256,7 @@

-

Definition at line 318 of file graph.h.

+

Definition at line 320 of file graph.h.

@@ -294,7 +294,7 @@

Definition at line 244 of file graph.h.

+

Definition at line 246 of file graph.h.

@@ -322,7 +322,7 @@

-

Definition at line 328 of file graph.h.

+

Definition at line 330 of file graph.h.

@@ -359,7 +359,7 @@

Definition at line 272 of file graph.h.

+

Definition at line 274 of file graph.h.

@@ -396,7 +396,7 @@

Definition at line 261 of file graph.h.

+

Definition at line 263 of file graph.h.

@@ -424,7 +424,7 @@

Return true if node is completed. New node always incomplete. If node was invoked it become completed. this state can be changed by calling setIncomplete() Concurrency safe.

-

Definition at line 289 of file graph.h.

+

Definition at line 291 of file graph.h.

@@ -452,7 +452,7 @@

Return the number of nodes this node depends on. Concurrency safe.

-

Definition at line 280 of file graph.h.

+

Definition at line 282 of file graph.h.

@@ -480,7 +480,7 @@

Invoke the type-erased functor. Change competed state of the node to "Incomplete". Concurrency safe.

-

Definition at line 251 of file graph.h.

+

Definition at line 253 of file graph.h.

@@ -508,7 +508,7 @@

Mark node completed. Concurrency safe. This methods should never be called concurrent to when the graph execution is happening

-

Definition at line 312 of file graph.h.

+

Definition at line 314 of file graph.h.

@@ -537,7 +537,7 @@

Returns
true if state was changed.
-

Definition at line 299 of file graph.h.

+

Definition at line 301 of file graph.h.

@@ -594,7 +594,7 @@

-

Definition at line 347 of file graph.h.

+

Definition at line 349 of file graph.h.

@@ -619,7 +619,7 @@

-

Definition at line 333 of file graph.h.

+

Definition at line 335 of file graph.h.

@@ -643,7 +643,7 @@

-

Definition at line 334 of file graph.h.

+

Definition at line 336 of file graph.h.

@@ -667,7 +667,7 @@

-

Definition at line 335 of file graph.h.

+

Definition at line 337 of file graph.h.

diff --git a/classdispenso_1_1_pool_allocator.js b/classdispenso_1_1_pool_allocator.js deleted file mode 100644 index 2508e50..0000000 --- a/classdispenso_1_1_pool_allocator.js +++ /dev/null @@ -1,7 +0,0 @@ -var classdispenso_1_1_pool_allocator = -[ - [ "PoolAllocator", "classdispenso_1_1_pool_allocator.html#a7a393687ca662206fea08d6d261cdd20", null ], - [ "~PoolAllocator", "classdispenso_1_1_pool_allocator.html#a5c40ea70c1e81435ee7c9152fb9ce62a", null ], - [ "alloc", "classdispenso_1_1_pool_allocator.html#a38a9be5293b77653b1560cb8e74b5bd4", null ], - [ "dealloc", "classdispenso_1_1_pool_allocator.html#ae7121e9dcebfeb09a6a045d04455a582", null ] -]; \ No newline at end of file diff --git a/classdispenso_1_1_pool_allocator-members.html b/classdispenso_1_1_pool_allocator_t-members.html similarity index 70% rename from classdispenso_1_1_pool_allocator-members.html rename to classdispenso_1_1_pool_allocator_t-members.html index 17c1930..16e35a6 100644 --- a/classdispenso_1_1_pool_allocator-members.html +++ b/classdispenso_1_1_pool_allocator_t-members.html @@ -70,7 +70,7 @@
@@ -96,16 +96,18 @@
-
dispenso::PoolAllocator Member List
+
dispenso::PoolAllocatorT< kThreadSafe > Member List
-

This is the complete list of members for dispenso::PoolAllocator, including all inherited members.

+

This is the complete list of members for dispenso::PoolAllocatorT< kThreadSafe >, including all inherited members.

- - - - + + + + + +
alloc()dispenso::PoolAllocator
dealloc(char *ptr)dispenso::PoolAllocator
PoolAllocator(size_t chunkSize, size_t allocSize, std::function< void *(size_t)> allocFunc, std::function< void(void *)> deallocFunc)dispenso::PoolAllocator
~PoolAllocator()dispenso::PoolAllocator
alloc()dispenso::PoolAllocatorT< kThreadSafe >
clear()dispenso::PoolAllocatorT< kThreadSafe >
dealloc(char *ptr)dispenso::PoolAllocatorT< kThreadSafe >
PoolAllocatorT(size_t chunkSize, size_t allocSize, std::function< void *(size_t)> allocFunc, std::function< void(void *)> deallocFunc)dispenso::PoolAllocatorT< kThreadSafe >
totalChunkCapacity() constdispenso::PoolAllocatorT< kThreadSafe >inline
~PoolAllocatorT()dispenso::PoolAllocatorT< kThreadSafe >
diff --git a/classdispenso_1_1_pool_allocator.html b/classdispenso_1_1_pool_allocator_t.html similarity index 57% rename from classdispenso_1_1_pool_allocator.html rename to classdispenso_1_1_pool_allocator_t.html index e7f0b7a..f95011d 100644 --- a/classdispenso_1_1_pool_allocator.html +++ b/classdispenso_1_1_pool_allocator_t.html @@ -5,7 +5,7 @@ -dispenso: dispenso::PoolAllocator Class Reference +dispenso: dispenso::PoolAllocatorT< kThreadSafe > Class Template Reference @@ -70,7 +70,7 @@
@@ -98,8 +98,8 @@
-
dispenso::PoolAllocator Class Reference
+List of all members
+
dispenso::PoolAllocatorT< kThreadSafe > Class Template Reference
@@ -107,28 +107,35 @@ - - - - - - - - + + + + + + + + + + + +

Public Member Functions

DISPENSO_DLL_ACCESS PoolAllocator (size_t chunkSize, size_t allocSize, std::function< void *(size_t)> allocFunc, std::function< void(void *)> deallocFunc)
 
DISPENSO_DLL_ACCESS char * alloc ()
 
DISPENSO_DLL_ACCESS void dealloc (char *ptr)
 
DISPENSO_DLL_ACCESS ~PoolAllocator ()
 
DISPENSO_DLL_ACCESS PoolAllocatorT (size_t chunkSize, size_t allocSize, std::function< void *(size_t)> allocFunc, std::function< void(void *)> deallocFunc)
 
DISPENSO_DLL_ACCESS char * alloc ()
 
DISPENSO_DLL_ACCESS void dealloc (char *ptr)
 
DISPENSO_DLL_ACCESS void clear ()
 
size_t totalChunkCapacity () const
 
DISPENSO_DLL_ACCESS ~PoolAllocatorT ()
 

Detailed Description

-

A pool allocator to help reduce calls to the underlying allocation and deallocation functions.

+
template<bool kThreadSafe>
+class dispenso::PoolAllocatorT< kThreadSafe >

A pool allocator to help reduce calls to the underlying allocation and deallocation functions.

-

Definition at line 28 of file pool_allocator.h.

+

Definition at line 29 of file pool_allocator.h.

Constructor & Destructor Documentation

- -

◆ PoolAllocator()

+ +

◆ PoolAllocatorT()

+
+template<bool kThreadSafe>
- + @@ -158,7 +165,7 @@

-

Construct a PoolAllocator.

+

Construct a PoolAllocator.

Parameters

dispenso::PoolAllocator::PoolAllocator dispenso::PoolAllocatorT< kThreadSafe >::PoolAllocatorT ( size_t  chunkSize,
@@ -169,60 +176,79 @@

Definition at line 12 of file pool_allocator.cpp.

+

Definition at line 13 of file pool_allocator.cpp.

- -

◆ ~PoolAllocator()

+ +

◆ ~PoolAllocatorT()

+
+template<bool kThreadSafe>

chunkSizeThe chunk size for each pool allocation
- - - - +
dispenso::PoolAllocator::~PoolAllocator ()dispenso::PoolAllocatorT< kThreadSafe >::~PoolAllocatorT
-

Destruct a PoolAllocator

+

Destruct a PoolAllocator

-

Definition at line 70 of file pool_allocator.cpp.

+

Definition at line 104 of file pool_allocator.cpp.

Member Function Documentation

- -

◆ alloc()

+ +

◆ alloc()

+
+template<bool kThreadSafe>
- - - - +
char * dispenso::PoolAllocator::alloc ()char * dispenso::PoolAllocatorT< kThreadSafe >::alloc

Allocate a chunk from a slab

Returns
The pointer to a buffer of chunkSize bytes
-

Definition at line 26 of file pool_allocator.cpp.

+

Definition at line 28 of file pool_allocator.cpp.

+ +
+
+ +

◆ clear()

+ +
+
+
+template<bool kThreadSafe>
+ + + + +
void dispenso::PoolAllocatorT< kThreadSafe >::clear
+
+

Effectively dealloc all previously allocated chunks. Useful for arenas. This function is not thread safe, and no previously allocated chunks may be dealloc'd after clear.

+ +

Definition at line 92 of file pool_allocator.cpp.

- -

◆ dealloc()

+ +

◆ dealloc()

+
+template<bool kThreadSafe>
- + @@ -238,7 +264,37 @@

Definition at line 52 of file pool_allocator.cpp.

+

Definition at line 68 of file pool_allocator.cpp.

+ + + + +

◆ totalChunkCapacity()

+ +
+
+
+template<bool kThreadSafe>
+

void dispenso::PoolAllocator::dealloc void dispenso::PoolAllocatorT< kThreadSafe >::dealloc ( char *  ptr)
+ + + + +
+ + + + + + + +
size_t dispenso::PoolAllocatorT< kThreadSafe >::totalChunkCapacity () const
+
+inline
+
+

Get the total capicity allocated in chunks (how many alloc() could be called without triggering allocFunc() if all chunks were available)

+ +

Definition at line 70 of file pool_allocator.h.

@@ -251,7 +307,7 @@

diff --git a/classdispenso_1_1_pool_allocator_t.js b/classdispenso_1_1_pool_allocator_t.js new file mode 100644 index 0000000..75cedeb --- /dev/null +++ b/classdispenso_1_1_pool_allocator_t.js @@ -0,0 +1,9 @@ +var classdispenso_1_1_pool_allocator_t = +[ + [ "PoolAllocatorT", "classdispenso_1_1_pool_allocator_t.html#a82adb70b33422125a6f3de59a0b63d11", null ], + [ "~PoolAllocatorT", "classdispenso_1_1_pool_allocator_t.html#a6f1cf4cfc584a9eef84a3e5e4e92ad60", null ], + [ "alloc", "classdispenso_1_1_pool_allocator_t.html#a04ec8c4a58977f8ca6011431e1860036", null ], + [ "clear", "classdispenso_1_1_pool_allocator_t.html#a67dc4676c39f7226c23ac48ea1a58ad1", null ], + [ "dealloc", "classdispenso_1_1_pool_allocator_t.html#add24c6cf8e3ea586940a18acf7959a4d", null ], + [ "totalChunkCapacity", "classdispenso_1_1_pool_allocator_t.html#a811782e39e4b441b960bc35757af59c1", null ] +]; \ No newline at end of file diff --git a/classdispenso_1_1_subgraph_t-members.html b/classdispenso_1_1_subgraph_t-members.html index b99e851..f90b344 100644 --- a/classdispenso_1_1_subgraph_t-members.html +++ b/classdispenso_1_1_subgraph_t-members.html @@ -115,6 +115,7 @@ SubgraphT()=delete (defined in dispenso::SubgraphT< N >)dispenso::SubgraphT< N > SubgraphT(const SubgraphT< N > &)=delete (defined in dispenso::SubgraphT< N >)dispenso::SubgraphT< N > SubgraphT(SubgraphT< N > &&other) (defined in dispenso::SubgraphT< N >)dispenso::SubgraphT< N >inline + ~SubgraphT() (defined in dispenso::SubgraphT< N >)dispenso::SubgraphT< N >
diff --git a/classdispenso_1_1_subgraph_t.html b/classdispenso_1_1_subgraph_t.html index 2113664..dc38095 100644 --- a/classdispenso_1_1_subgraph_t.html +++ b/classdispenso_1_1_subgraph_t.html @@ -147,7 +147,7 @@

Detailed Description

template<class N>
class dispenso::SubgraphT< N >
-

Definition at line 399 of file graph.h.

+

Definition at line 401 of file graph.h.

Member Typedef Documentation

◆ NodeType

@@ -163,7 +163,7 @@

-

Definition at line 401 of file graph.h.

+

Definition at line 403 of file graph.h.

@@ -194,7 +194,25 @@

-

Definition at line 405 of file graph.h.

+

Definition at line 407 of file graph.h.

+ + + + +

◆ ~SubgraphT()

+ +
+
+
+template<class N >
+ + + + +
dispenso::SubgraphT< N >::~SubgraphT
+
+ +

Definition at line 68 of file graph.cpp.

@@ -235,7 +253,7 @@

Returns
reference to the created node.
-

Definition at line 413 of file graph.h.

+

Definition at line 419 of file graph.h.

@@ -254,7 +272,7 @@

Removes all dependency between nodes of this subgraph and other nodes, destroy this subgraph nodes. This is not concurrency safe.

-

Definition at line 52 of file graph.cpp.

+

Definition at line 54 of file graph.cpp.

@@ -293,7 +311,7 @@

Definition at line 457 of file graph.h.

+

Definition at line 463 of file graph.h.

@@ -332,7 +350,7 @@

Definition at line 445 of file graph.h.

+

Definition at line 451 of file graph.h.

@@ -369,7 +387,7 @@

Definition at line 436 of file graph.h.

+

Definition at line 442 of file graph.h.

@@ -406,7 +424,7 @@

Definition at line 428 of file graph.h.

+

Definition at line 434 of file graph.h.

@@ -436,7 +454,7 @@

Return number of nodes in subgraph. Concurrency safe.

-

Definition at line 420 of file graph.h.

+

Definition at line 426 of file graph.h.

@@ -465,7 +483,7 @@

-

Definition at line 489 of file graph.h.

+

Definition at line 506 of file graph.h.

diff --git a/classes.html b/classes.html index 6d95e04..beff3f4 100644 --- a/classes.html +++ b/classes.html @@ -133,7 +133,7 @@
OnceFunction (dispenso)
P
-
ParallelForExecutor (dispenso)
ParForOptions (dispenso)
PoolAllocator (dispenso)
+
ParallelForExecutor (dispenso)
ParForOptions (dispenso)
PoolAllocatorT (dispenso)
R
ReserveTagS (dispenso)
Resource (dispenso)
ResourcePool (dispenso)
RWLock (dispenso)
diff --git a/functions.html b/functions.html index c575852..0f5558e 100644 --- a/functions.html +++ b/functions.html @@ -102,7 +102,7 @@

- a -

  • acquire() : dispenso::ResourcePool< T >
  • addNode() : dispenso::GraphT< N >, dispenso::SubgraphT< N >
  • addSubgraph() : dispenso::GraphT< N >
  • -
  • alloc() : dispenso::PoolAllocator
  • +
  • alloc() : dispenso::PoolAllocatorT< kThreadSafe >
  • arrive_and_wait() : dispenso::Latch
  • assign() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
  • at() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
  • diff --git a/functions_c.html b/functions_c.html index 3bee8ef..d84ecf7 100644 --- a/functions_c.html +++ b/functions_c.html @@ -106,7 +106,7 @@

    - c -

    • cbegin() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
    • cend() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
    • ChunkedRange() : dispenso::ChunkedRange< IntegerT >
    • -
    • clear() : dispenso::ConcurrentVector< T, Traits, SizeTraits >, dispenso::GraphT< N >, dispenso::SubgraphT< N >
    • +
    • clear() : dispenso::ConcurrentVector< T, Traits, SizeTraits >, dispenso::GraphT< N >, dispenso::PoolAllocatorT< kThreadSafe >, dispenso::SubgraphT< N >
    • completed() : dispenso::CompletionEvent
    • ConcurrentObjectArena() : dispenso::ConcurrentObjectArena< T, Index, alignment >
    • ConcurrentTaskSet() : dispenso::ConcurrentTaskSet
    • diff --git a/functions_d.html b/functions_d.html index b7f5611..e124be8 100644 --- a/functions_d.html +++ b/functions_d.html @@ -99,7 +99,7 @@
      Here is a list of all documented class members with links to the class documentation for each member:

      - d -

        -
      • dealloc() : dispenso::PoolAllocator
      • +
      • dealloc() : dispenso::PoolAllocatorT< kThreadSafe >
      • default_capacity() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
      • defaultChunking : dispenso::ParForOptions
      • dependsOn() : dispenso::Node
      • diff --git a/functions_func.html b/functions_func.html index 6d614da..ece7103 100644 --- a/functions_func.html +++ b/functions_func.html @@ -102,7 +102,7 @@

        - a -

        • acquire() : dispenso::ResourcePool< T >
        • addNode() : dispenso::GraphT< N >, dispenso::SubgraphT< N >
        • addSubgraph() : dispenso::GraphT< N >
        • -
        • alloc() : dispenso::PoolAllocator
        • +
        • alloc() : dispenso::PoolAllocatorT< kThreadSafe >
        • arrive_and_wait() : dispenso::Latch
        • assign() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
        • at() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
        • @@ -124,7 +124,7 @@

          - c -

          • cbegin() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
          • cend() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
          • ChunkedRange() : dispenso::ChunkedRange< IntegerT >
          • -
          • clear() : dispenso::ConcurrentVector< T, Traits, SizeTraits >, dispenso::GraphT< N >, dispenso::SubgraphT< N >
          • +
          • clear() : dispenso::ConcurrentVector< T, Traits, SizeTraits >, dispenso::GraphT< N >, dispenso::PoolAllocatorT< kThreadSafe >, dispenso::SubgraphT< N >
          • completed() : dispenso::CompletionEvent
          • ConcurrentObjectArena() : dispenso::ConcurrentObjectArena< T, Index, alignment >
          • ConcurrentTaskSet() : dispenso::ConcurrentTaskSet
          • @@ -134,7 +134,7 @@

            - c -

              - d -

                -
              • dealloc() : dispenso::PoolAllocator
              • +
              • dealloc() : dispenso::PoolAllocatorT< kThreadSafe >
              • default_capacity() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
              • dependsOn() : dispenso::Node
              • detach() : dispenso::TimedTask
              • @@ -204,7 +204,7 @@

                - o -

                  - p -

                  @@ -241,6 +241,7 @@

                  - t -

                  • then() : dispenso::Future< Result >
                  • ThreadPool() : dispenso::ThreadPool
                  • TimedTaskScheduler() : dispenso::TimedTaskScheduler
                  • +
                  • totalChunkCapacity() : dispenso::PoolAllocatorT< kThreadSafe >
                  • try_wait() : dispenso::Latch
                  • tryEmplaceUpdate() : dispenso::AsyncRequest< T >
                  • tryWait() : dispenso::ConcurrentTaskSet, dispenso::TaskSet
                  • @@ -270,7 +271,7 @@

                    - ~ -

                    • ~ConcurrentTaskSet() : dispenso::ConcurrentTaskSet
                    • ~ConcurrentVector() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
                    • ~Future() : dispenso::Future< Result >
                    • -
                    • ~PoolAllocator() : dispenso::PoolAllocator
                    • +
                    • ~PoolAllocatorT() : dispenso::PoolAllocatorT< kThreadSafe >
                    • ~ResourcePool() : dispenso::ResourcePool< T >
                    • ~TaskSet() : dispenso::TaskSet
                    • ~ThreadPool() : dispenso::ThreadPool
                    • diff --git a/functions_p.html b/functions_p.html index 759266f..c6f92c0 100644 --- a/functions_p.html +++ b/functions_p.html @@ -99,7 +99,7 @@
                      Here is a list of all documented class members with links to the class documentation for each member:

                      - p -

                      diff --git a/functions_t.html b/functions_t.html index 7afa5cc..b9c4382 100644 --- a/functions_t.html +++ b/functions_t.html @@ -103,6 +103,7 @@

                      - t -

                      • then() : dispenso::Future< Result >
                      • ThreadPool() : dispenso::ThreadPool
                      • TimedTaskScheduler() : dispenso::TimedTaskScheduler
                      • +
                      • totalChunkCapacity() : dispenso::PoolAllocatorT< kThreadSafe >
                      • try_wait() : dispenso::Latch
                      • tryEmplaceUpdate() : dispenso::AsyncRequest< T >
                      • tryWait() : dispenso::ConcurrentTaskSet, dispenso::TaskSet
                      • diff --git a/functions_~.html b/functions_~.html index 3a2bd20..8f84990 100644 --- a/functions_~.html +++ b/functions_~.html @@ -102,7 +102,7 @@

                        - ~ -

                        • ~ConcurrentTaskSet() : dispenso::ConcurrentTaskSet
                        • ~ConcurrentVector() : dispenso::ConcurrentVector< T, Traits, SizeTraits >
                        • ~Future() : dispenso::Future< Result >
                        • -
                        • ~PoolAllocator() : dispenso::PoolAllocator
                        • +
                        • ~PoolAllocatorT() : dispenso::PoolAllocatorT< kThreadSafe >
                        • ~ResourcePool() : dispenso::ResourcePool< T >
                        • ~TaskSet() : dispenso::TaskSet
                        • ~ThreadPool() : dispenso::ThreadPool
                        • diff --git a/graph_8cpp_source.html b/graph_8cpp_source.html index 31ee3c4..abda1e8 100644 --- a/graph_8cpp_source.html +++ b/graph_8cpp_source.html @@ -107,141 +107,204 @@
                          6 */
                          7
                          8#include <dispenso/graph.h>
                          -
                          9#include <iostream>
                          -
                          10
                          -
                          11namespace {
                          -
                          12constexpr size_t kToDelete = std::numeric_limits<size_t>::max();
                          -
                          13
                          -
                          14void set_union(
                          -
                          15 std::vector<const dispenso::BiPropNode*>& s1,
                          -
                          16 const std::vector<const dispenso::BiPropNode*>& s2) {
                          -
                          17 std::vector<const dispenso::BiPropNode*> tmp(s1);
                          -
                          18 s1.clear();
                          -
                          19 std::set_union(tmp.cbegin(), tmp.cend(), s2.cbegin(), s2.cend(), std::back_inserter(s1));
                          -
                          20}
                          -
                          21
                          -
                          22void set_insert(std::vector<const dispenso::BiPropNode*>& s, const dispenso::BiPropNode* node) {
                          -
                          23 auto it = std::upper_bound(s.begin(), s.end(), node);
                          -
                          24 if (it == s.begin() || *(it - 1) != node) {
                          -
                          25 s.insert(it, node);
                          -
                          26 }
                          -
                          27}
                          -
                          28} // anonymous namespace
                          -
                          29
                          -
                          30namespace dispenso {
                          +
                          9
                          +
                          10#include <iterator>
                          +
                          11#include <mutex>
                          +
                          12
                          +
                          13namespace {
                          +
                          14constexpr size_t kToDelete = std::numeric_limits<size_t>::max();
                          +
                          15
                          +
                          16void set_union(
                          +
                          17 std::vector<const dispenso::BiPropNode*>& s1,
                          +
                          18 const std::vector<const dispenso::BiPropNode*>& s2) {
                          +
                          19 std::vector<const dispenso::BiPropNode*> tmp(s1);
                          +
                          20 s1.clear();
                          +
                          21 std::set_union(tmp.cbegin(), tmp.cend(), s2.cbegin(), s2.cend(), std::back_inserter(s1));
                          +
                          22}
                          +
                          23
                          +
                          24void set_insert(std::vector<const dispenso::BiPropNode*>& s, const dispenso::BiPropNode* node) {
                          +
                          25 auto it = std::upper_bound(s.begin(), s.end(), node);
                          +
                          26 if (it == s.begin() || *(it - 1) != node) {
                          +
                          27 s.insert(it, node);
                          +
                          28 }
                          +
                          29}
                          +
                          30} // anonymous namespace
                          31
                          -
                          32void BiPropNode::biPropDependsOnOneNode(BiPropNode& node) {
                          -
                          33 Node::dependsOnOneNode(node);
                          -
                          34 if (node.biPropSet_ == nullptr && biPropSet_ == nullptr) {
                          -
                          35 biPropSet_ = std::make_shared<std::vector<const BiPropNode*>>();
                          -
                          36 set_insert(*biPropSet_, this);
                          -
                          37 set_insert(*biPropSet_, &node);
                          -
                          38 node.biPropSet_ = biPropSet_;
                          -
                          39 } else if (node.biPropSet_ != nullptr && biPropSet_ != nullptr) {
                          -
                          40 set_union(*biPropSet_, *node.biPropSet_);
                          -
                          41 node.biPropSet_ = biPropSet_;
                          -
                          42 } else if (biPropSet_ == nullptr) {
                          -
                          43 biPropSet_ = node.biPropSet_;
                          -
                          44 set_insert(*biPropSet_, this);
                          -
                          45 } else {
                          -
                          46 node.biPropSet_ = biPropSet_;
                          -
                          47 set_insert(*biPropSet_, &node);
                          -
                          48 }
                          -
                          49}
                          -
                          50
                          -
                          51template <class N>
                          - -
                          53 decrementDependentCounters();
                          -
                          54 const size_t numGraphPredecessors = markNodesWithPredicessors();
                          -
                          55 if (numGraphPredecessors != 0) {
                          -
                          56 removePredecessorDependencies(numGraphPredecessors);
                          -
                          57 }
                          -
                          58 nodes_.clear();
                          -
                          59}
                          -
                          60
                          -
                          61template <class N>
                          - -
                          63 for (N& node : nodes_) {
                          -
                          64 for (Node* const dependent : node.dependents_) {
                          -
                          65 dependent->numPredecessors_--;
                          -
                          66 }
                          -
                          67 removeNodeFromBiPropSet(node);
                          -
                          68 }
                          -
                          69}
                          -
                          70
                          -
                          71template <class N>
                          -
                          72size_t SubgraphT<N>::markNodesWithPredicessors() {
                          -
                          73 size_t numGraphPredecessors = 0;
                          -
                          74 for (N& node : nodes_) {
                          -
                          75 if (node.numPredecessors_ != 0) {
                          -
                          76 numGraphPredecessors += node.numPredecessors_;
                          -
                          77 node.numPredecessors_ = kToDelete;
                          -
                          78 }
                          -
                          79 }
                          -
                          80 return numGraphPredecessors;
                          -
                          81}
                          -
                          82
                          -
                          83template <class N>
                          -
                          84void SubgraphT<N>::removePredecessorDependencies(size_t numGraphPredecessors) {
                          -
                          85 for (SubgraphT<N>& subgraph : graph_->subgraphs_) {
                          -
                          86 if (&subgraph == this) {
                          -
                          87 continue;
                          -
                          88 }
                          -
                          89 for (N& node : subgraph.nodes_) {
                          -
                          90 std::vector<Node*>& dependents = node.dependents_;
                          -
                          91 size_t num = dependents.size();
                          -
                          92 for (size_t i = 0; i < num;) {
                          -
                          93 if (dependents[i]->numPredecessors_ == kToDelete) {
                          -
                          94 dependents[i] = dependents[num - 1];
                          -
                          95 --num;
                          -
                          96 if (--numGraphPredecessors == 0) {
                          -
                          97 dependents.resize(num);
                          -
                          98 return;
                          -
                          99 }
                          -
                          100 } else {
                          -
                          101 i++;
                          -
                          102 }
                          -
                          103 }
                          -
                          104 dependents.resize(num);
                          -
                          105 }
                          -
                          106 }
                          -
                          107}
                          -
                          108
                          -
                          109template <class N>
                          -
                          110GraphT<N>::GraphT(GraphT<N>&& other) : subgraphs_(std::move(other.subgraphs_)) {
                          -
                          111 for (SubgraphT<N>& subgraph : subgraphs_) {
                          -
                          112 subgraph.graph_ = this;
                          -
                          113 }
                          -
                          114}
                          -
                          115
                          -
                          116template <class N>
                          - -
                          118 subgraphs_ = std::move(other.subgraphs_);
                          -
                          119 for (SubgraphT<N>& subgraph : subgraphs_) {
                          -
                          120 subgraph.graph_ = this;
                          -
                          121 }
                          -
                          122 return *this;
                          -
                          123}
                          -
                          124
                          -
                          125template <class N>
                          - -
                          127 subgraphs_.push_back(SubgraphType(this));
                          -
                          128 SubgraphT<N>& subgraph = subgraphs_.back();
                          -
                          129 return subgraph;
                          -
                          130}
                          -
                          131
                          -
                          132template class DISPENSO_DLL_ACCESS SubgraphT<Node>;
                          -
                          133template class DISPENSO_DLL_ACCESS SubgraphT<BiPropNode>;
                          -
                          134template class DISPENSO_DLL_ACCESS GraphT<Node>;
                          -
                          135template class DISPENSO_DLL_ACCESS GraphT<BiPropNode>;
                          -
                          136} // namespace dispenso
                          - - - -
                          SubgraphT< N > & addSubgraph()
                          Definition: graph.cpp:126
                          - - - +
                          32namespace dispenso {
                          +
                          33
                          +
                          34void BiPropNode::biPropDependsOnOneNode(BiPropNode& node) {
                          +
                          35 Node::dependsOnOneNode(node);
                          +
                          36 if (node.biPropSet_ == nullptr && biPropSet_ == nullptr) {
                          +
                          37 biPropSet_ = std::make_shared<std::vector<const BiPropNode*>>();
                          +
                          38 set_insert(*biPropSet_, this);
                          +
                          39 set_insert(*biPropSet_, &node);
                          +
                          40 node.biPropSet_ = biPropSet_;
                          +
                          41 } else if (node.biPropSet_ != nullptr && biPropSet_ != nullptr) {
                          +
                          42 set_union(*biPropSet_, *node.biPropSet_);
                          +
                          43 node.biPropSet_ = biPropSet_;
                          +
                          44 } else if (biPropSet_ == nullptr) {
                          +
                          45 biPropSet_ = node.biPropSet_;
                          +
                          46 set_insert(*biPropSet_, this);
                          +
                          47 } else {
                          +
                          48 node.biPropSet_ = biPropSet_;
                          +
                          49 set_insert(*biPropSet_, &node);
                          +
                          50 }
                          +
                          51}
                          +
                          52
                          +
                          53template <class N>
                          + +
                          55 decrementDependentCounters();
                          +
                          56 const size_t numGraphPredecessors = markNodesWithPredicessors();
                          +
                          57 if (numGraphPredecessors != 0) {
                          +
                          58 removePredecessorDependencies(numGraphPredecessors);
                          +
                          59 }
                          +
                          60 for (NodeType* n : nodes_) {
                          +
                          61 n->~NodeType();
                          +
                          62 }
                          +
                          63 allocator_->clear();
                          +
                          64 nodes_.clear();
                          +
                          65}
                          +
                          66
                          +
                          67template <class N>
                          + +
                          69 for (NodeType* n : nodes_) {
                          +
                          70 n->~NodeType();
                          +
                          71 }
                          +
                          72}
                          +
                          73
                          +
                          74template <class N>
                          +
                          75void SubgraphT<N>::decrementDependentCounters() {
                          +
                          76 for (N* node : nodes_) {
                          +
                          77 for (Node* const dependent : node->dependents_) {
                          +
                          78 dependent->numPredecessors_--;
                          +
                          79 }
                          +
                          80 removeNodeFromBiPropSet(node);
                          +
                          81 }
                          +
                          82}
                          +
                          83
                          +
                          84template <class N>
                          +
                          85size_t SubgraphT<N>::markNodesWithPredicessors() {
                          +
                          86 size_t numGraphPredecessors = 0;
                          +
                          87 for (N* node : nodes_) {
                          +
                          88 if (node->numPredecessors_ != 0) {
                          +
                          89 numGraphPredecessors += node->numPredecessors_;
                          +
                          90 node->numPredecessors_ = kToDelete;
                          +
                          91 }
                          +
                          92 }
                          +
                          93 return numGraphPredecessors;
                          +
                          94}
                          +
                          95
                          +
                          96template <class N>
                          +
                          97void SubgraphT<N>::removePredecessorDependencies(size_t numGraphPredecessors) {
                          +
                          98 for (SubgraphT<N>& subgraph : graph_->subgraphs_) {
                          +
                          99 if (&subgraph == this) {
                          +
                          100 continue;
                          +
                          101 }
                          +
                          102 for (N* node : subgraph.nodes_) {
                          +
                          103 std::vector<Node*>& dependents = node->dependents_;
                          +
                          104 size_t num = dependents.size();
                          +
                          105 for (size_t i = 0; i < num;) {
                          +
                          106 if (dependents[i]->numPredecessors_ == kToDelete) {
                          +
                          107 dependents[i] = dependents[num - 1];
                          +
                          108 --num;
                          +
                          109 if (--numGraphPredecessors == 0) {
                          +
                          110 dependents.resize(num);
                          +
                          111 return;
                          +
                          112 }
                          +
                          113 } else {
                          +
                          114 i++;
                          +
                          115 }
                          +
                          116 }
                          +
                          117 dependents.resize(num);
                          +
                          118 }
                          +
                          119 }
                          +
                          120}
                          +
                          121
                          +
                          122namespace {
                          +
                          123constexpr size_t kMaxCache = 8;
                          +
                          124// Don't cache too-large allocators. This way we will have at most 8*(2**16) = 512K outstanding
                          +
                          125// nodes worth of memory per node type.
                          +
                          126// TODO(bbudge): Make these caching values macro configurable for lightweight platforms.
                          +
                          127constexpr size_t kMaxChunkCapacity = 1 << 16;
                          +
                          128std::vector<std::unique_ptr<NoLockPoolAllocator>> g_sgcache[2];
                          +
                          129std::mutex g_sgcacheMtx;
                          +
                          130
                          +
                          131template <class T>
                          +
                          132constexpr size_t kCacheIndex = size_t{std::is_same<T, BiPropNode>::value};
                          +
                          133
                          +
                          134} // namespace
                          +
                          135
                          +
                          136template <class N>
                          +
                          137typename SubgraphT<N>::PoolPtr SubgraphT<N>::getAllocator() {
                          +
                          138 std::unique_ptr<NoLockPoolAllocator> ptr;
                          +
                          139
                          +
                          140 auto& cache = g_sgcache[kCacheIndex<N>];
                          +
                          141
                          +
                          142 {
                          +
                          143 std::lock_guard<std::mutex> lk(g_sgcacheMtx);
                          +
                          144 if (cache.empty()) {
                          +
                          145 ptr = std::make_unique<NoLockPoolAllocator>(
                          +
                          146 sizeof(NodeType), 128 * sizeof(NodeType), ::malloc, ::free);
                          +
                          147 } else {
                          +
                          148 ptr = std::move(cache.back());
                          +
                          149 ptr->clear();
                          +
                          150 cache.pop_back();
                          +
                          151 }
                          +
                          152 }
                          +
                          153 return PoolPtr(ptr.release(), releaseAllocator);
                          +
                          154}
                          +
                          155
                          +
                          156template <class N>
                          +
                          157void SubgraphT<N>::releaseAllocator(NoLockPoolAllocator* ptr) {
                          +
                          158 if (!ptr) {
                          +
                          159 return;
                          +
                          160 }
                          +
                          161 if (ptr->totalChunkCapacity() < kMaxChunkCapacity) {
                          +
                          162 auto& cache = g_sgcache[kCacheIndex<N>];
                          +
                          163 {
                          +
                          164 std::lock_guard<std::mutex> lk(g_sgcacheMtx);
                          +
                          165 if (cache.size() < kMaxCache) {
                          +
                          166 cache.emplace_back(ptr);
                          +
                          167 return;
                          +
                          168 }
                          +
                          169 }
                          +
                          170 }
                          +
                          171 delete ptr;
                          +
                          172}
                          +
                          173
                          +
                          174template <class N>
                          +
                          175GraphT<N>::GraphT(GraphT<N>&& other) : subgraphs_(std::move(other.subgraphs_)) {
                          +
                          176 for (SubgraphT<N>& subgraph : subgraphs_) {
                          +
                          177 subgraph.graph_ = this;
                          +
                          178 }
                          +
                          179}
                          +
                          180
                          +
                          181template <class N>
                          + +
                          183 subgraphs_ = std::move(other.subgraphs_);
                          +
                          184 for (SubgraphT<N>& subgraph : subgraphs_) {
                          +
                          185 subgraph.graph_ = this;
                          +
                          186 }
                          +
                          187 return *this;
                          +
                          188}
                          +
                          189
                          +
                          190template <class N>
                          + +
                          192 subgraphs_.push_back(SubgraphType(this));
                          +
                          193 return subgraphs_.back();
                          +
                          194}
                          +
                          195
                          +
                          196template class DISPENSO_DLL_ACCESS SubgraphT<Node>;
                          +
                          197template class DISPENSO_DLL_ACCESS SubgraphT<BiPropNode>;
                          +
                          198template class DISPENSO_DLL_ACCESS GraphT<Node>;
                          +
                          199template class DISPENSO_DLL_ACCESS GraphT<BiPropNode>;
                          +
                          200} // namespace dispenso
                          + + + +
                          SubgraphT< N > & addSubgraph()
                          Definition: graph.cpp:191
                          + + diff --git a/graph_8h_source.html b/graph_8h_source.html index 7f67718..f2c0e25 100644 --- a/graph_8h_source.html +++ b/graph_8h_source.html @@ -108,523 +108,541 @@
                          7
                          8#pragma once
                          9
                          -
                          10#include <dispenso/platform.h>
                          - -
                          12#include <atomic>
                          -
                          13#include <deque>
                          -
                          14#include <limits>
                          -
                          15#include <memory>
                          -
                          16#include <type_traits>
                          -
                          17#include <vector>
                          -
                          18/*
                          -
                          19Terminology
                          -
                          20--------------------------------------------------------------------------------
                          -
                          21The Node depends on the predecessor. The dependent depends on the node.
                          -
                          22~~~
                          -
                          23┌─────────────┐ ┌──────┐ ┌───────────┐
                          -
                          24│ predecessor │ ──▶ │ node │ ──▶ │ dependent │
                          -
                          25└─────────────┘ └──────┘ └───────────┘
                          -
                          26~~~
                          -
                          27
                          -
                          28Graph construction
                          -
                          29--------------------------------------------------------------------------------
                          -
                          30The Graph class can be used to created tasks with dependencies and execute it once.
                          -
                          31Graphs must not contain cycles.
                          -
                          32Example:
                          -
                          33~~~
                          -
                          34//
                          -
                          35// ┌────────────┐ ┌───────────────┐ ┌───────────────────┐
                          -
                          36// │ 0: r[0]+=1 │ ──▶ │ 1: r[1]=r[0]*2│ ──▶ │ 4: r[4]=r[1]+r[3] │
                          -
                          37// └────────────┘ └───────────────┘ └───────────────────┘
                          -
                          38// ▲
                          -
                          39// ┌────────────┐ ┌───────────────┐ │
                          -
                          40// │ 2: r[2]+=8 │ ──▶ │ 3: r[3]=r[2]/2│ ──────┘
                          -
                          41// └────────────┘ └───────────────┘
                          -
                          42
                          -
                          43std::array<float, 5> r;
                          +
                          10#include <atomic>
                          +
                          11#include <deque>
                          +
                          12#include <limits>
                          +
                          13#include <memory>
                          +
                          14#include <type_traits>
                          +
                          15#include <vector>
                          +
                          16
                          +
                          17#include <dispenso/platform.h>
                          + + +
                          20/*
                          +
                          21Terminology
                          +
                          22--------------------------------------------------------------------------------
                          +
                          23The Node depends on the predecessor. The dependent depends on the node.
                          +
                          24~~~
                          +
                          25┌─────────────┐ ┌──────┐ ┌───────────┐
                          +
                          26│ predecessor │ ──▶ │ node │ ──▶ │ dependent │
                          +
                          27└─────────────┘ └──────┘ └───────────┘
                          +
                          28~~~
                          +
                          29
                          +
                          30Graph construction
                          +
                          31--------------------------------------------------------------------------------
                          +
                          32The Graph class can be used to created tasks with dependencies and execute it once.
                          +
                          33Graphs must not contain cycles.
                          +
                          34Example:
                          +
                          35~~~
                          +
                          36//
                          +
                          37// ┌────────────┐ ┌───────────────┐ ┌───────────────────┐
                          +
                          38// │ 0: r[0]+=1 │ ──▶ │ 1: r[1]=r[0]*2│ ──▶ │ 4: r[4]=r[1]+r[3] │
                          +
                          39// └────────────┘ └───────────────┘ └───────────────────┘
                          +
                          40// ▲
                          +
                          41// ┌────────────┐ ┌───────────────┐ │
                          +
                          42// │ 2: r[2]+=8 │ ──▶ │ 3: r[3]=r[2]/2│ ──────┘
                          +
                          43// └────────────┘ └───────────────┘
                          44
                          -
                          45dispenso::Graph graph;
                          +
                          45std::array<float, 5> r;
                          46
                          -
                          47dispenso::Node& N0 = graph.addNode([&]() { r[0] += 1; });
                          -
                          48dispenso::Node& N2 = graph.addNode([&]() { r[2] += 8; });
                          -
                          49dispenso::Node& N1 = graph.addNode([&]() { r[1] += r[0] * 2; });
                          -
                          50dispenso::Node& N3 = graph.addNode([&]() { r[3] += r[2] / 2; });
                          -
                          51dispenso::Node& N4 = graph.addNode([&]() { r[4] += r[1] + r[3]; });
                          -
                          52
                          -
                          53N4.dependsOn(N1, N3);
                          -
                          54N1.dependsOn(N0);
                          -
                          55N3.dependsOn(N2);
                          -
                          56
                          -
                          57dispenso::TaskSet taskSet(dispenso::globalThreadPool());
                          -
                          58dispenso::ParallelForExecutor parallelForExecutor;
                          -
                          59parallelForExecutor(taskSet, graph);
                          -
                          60~~~
                          -
                          61
                          -
                          62Partial revaluation
                          -
                          63--------------------------------------------------------------------------------
                          -
                          64If graph is big or we need to recompute graph partially we can execute it again.
                          -
                          65After execution of the graph all nodes change their state from "incomplete" to
                          -
                          66"completed". If order to evaluate whole graph again we can use function `setAllNodesIncomplete`
                          -
                          67Example:
                          -
                          68~~~
                          -
                          69r = {0, 0, 0, 0, 0};
                          -
                          70setAllNodesIncomplete(graph);
                          -
                          71parallelForExecutor(taskSet, graph);
                          -
                          72~~~
                          -
                          73
                          -
                          74The graph can be recomputed partially if we have new input data for one or several nodes in the
                          -
                          75graph. It order to do it we need to call `setIncomplete()` method for every node which we need to
                          -
                          76recompute and after use functor `ForwardPropagator` to mark as "incomplete" all dependents.
                          -
                          77
                          -
                          78Example:
                          -
                          79~~~
                          -
                          80N1.setIncomplete();
                          -
                          81r[1] = r[4] = 0;
                          -
                          82ForwardPropagator forwardPropagator;
                          -
                          83forwardPropagator(graph);
                          -
                          84evaluateGraph(graph);
                          -
                          85~~~
                          -
                          86In this exaple only node 1 and 4 will be invoked.
                          -
                          87
                          -
                          88 Subgraphs
                          -
                          89--------------------------------------------------------------------------------
                          -
                          90It is possible to organize nodes into subgraphs and destroy and recreate if we have static and
                          -
                          91dynamic parts of the computation graph
                          -
                          92Example:
                          -
                          93~~~
                          -
                          94//
                          -
                          95// ∙----subgraph1---∙ ∙---subgraph2-------∙
                          -
                          96// ¦ ┌────────────┐ ¦ ¦ ┌───────────────┐ ¦ ┌───────────────────┐
                          -
                          97// ¦ │ 0: r[0]+=1 │ ──▶ │ 1: r[1]=r[0]*2│ ──▶ │ 4: r[4]=r[1]+r[3] │
                          -
                          98// ¦ └────────────┘ ¦ ¦ └───────────────┘ ¦ └───────────────────┘
                          -
                          99// ¦ ¦ ¦ ¦ ▲
                          -
                          100// ¦ ┌────────────┐ ¦ ¦ ┌───────────────┐ ¦ │
                          -
                          101// ¦ │ 2: r[2]+=8 │ ──▶ │ 3: r[3]=r[2]/2│ ──────┘
                          -
                          102// ¦ └────────────┘ ¦ ¦ └───────────────┘ ¦
                          -
                          103// ∙----------------∙ ∙-------------------∙
                          -
                          104std::array<float, 5> r;
                          -
                          105dispenso::Graph graph;
                          -
                          106
                          -
                          107dispenso::Subgraph& subgraph1 = graph.addSubgraph();
                          -
                          108dispenso::Subgraph& subgraph2 = graph.addSubgraph();
                          -
                          109
                          -
                          110dispenso::Node& N0 = subgraph1.addNode([&]() { r[0] += 1; });
                          -
                          111dispenso::Node& N2 = subgraph1.addNode([&]() { r[2] += 8; });
                          -
                          112dispenso::Node& N1 = subgraph2.addNode([&]() { r[1] += r[0] * 2; });
                          -
                          113dispenso::Node& N3 = subgraph2.addNode([&]() { r[3] += r[2] / 2; });
                          -
                          114dispenso::Node& N4 = graph.addNode([&]() { r[4] += r[1] + r[3]; });
                          -
                          115
                          -
                          116N4.dependsOn(N1, N3);
                          -
                          117N1.dependsOn(N0);
                          -
                          118N3.dependsOn(N2);
                          -
                          119
                          -
                          120// evaluate graph first time
                          -
                          121r = {0, 0, 0, 0, 0};
                          -
                          122dispenso::ConcurrentTaskSet concurrentTaskSet(dispenso::globalThreadPool());
                          -
                          123dispenso::ConcurrentTaskSetExecutor concurrentTaskSetExecutor;
                          -
                          124concurrentTaskSetExecutor(concurrentTaskSet, graph);
                          -
                          125
                          -
                          126// disconnect and destroy nodes of subgraph2
                          -
                          127// it invalidates node references/pointers of this subgraph
                          -
                          128subgraph2.clear();
                          -
                          129
                          -
                          130// create another nodes
                          -
                          131dispenso::Node& newN1 = subgraph2.addNode([&]() { r[1] += r[0] * 20; });
                          -
                          132dispenso::Node& newN3 = subgraph2.addNode([&]() { r[3] += r[2] / 20; });
                          -
                          133newN1.dependsOn(N0);
                          -
                          134newN3.dependsOn(N2);
                          -
                          135N4.dependsOn(newN1, newN3);
                          -
                          136
                          -
                          137// and revaluae the graph
                          -
                          138setAllNodesIncomplete(movedGraph);
                          -
                          139concurrentTaskSetExecutor(concurrentTaskSet, graph);
                          -
                          140~~~
                          -
                          141
                          -
                          142Bidirectional propagation dependency
                          -
                          143--------------------------------------------------------------------------------
                          -
                          144In certain scenarios, nodes may alter the same memory. In such instances, it becomes necessary to
                          -
                          145compute the predecessors of the node, even if they possess a "completed" state following state
                          -
                          146propagation. To facilitate this process automatically, we introduce the notion of a bidirectional
                          -
                          147propagation dependency (`BiProp`).
                          -
                          148
                          -
                          149Example:
                          -
                          150~~~
                          -
                          151// ┌─────────────────┐
                          -
                          152// │ 3: m3+=b*b │
                          -
                          153// └─────────────────┘
                          -
                          154// ▲
                          -
                          155// ┌−-----------−−−−−−−−−│−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−┐
                          -
                          156// ╎ ┌───────────┐ ┌─────────────────┐ ┌────────────┐ ╎
                          -
                          157// ╎ │ 0: b+=5 │ ──▷ │ 1: b*=5 │ ──▷ │ 2: b/=m4 │ ╎
                          -
                          158// ╎ └───────────┘ └─────────────────┘ └────────────┘ ╎
                          -
                          159// └−−−-−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−▲−−−−−−−−−−−−┘
                          -
                          160// Legend: │
                          -
                          161// ──▶ Normal dependency ┌────────────┐
                          -
                          162// ──▷ Bidirectional propagation dependency │ 4: m4+=2 │
                          -
                          163// m4 variable modified only in node 4 └────────────┘
                          -
                          164
                          -
                          165float b, m3, m4
                          -
                          166dispenso::BiPropGraph g;
                          -
                          167std::array<dispenso::BiPropNode*, 8> N;
                          -
                          168
                          -
                          169dispenso::BiPropNode& N0 = g.addNode([&]() { b += 5; });
                          -
                          170dispenso::BiPropNode& N1 = g.addNode([&]() { b *= 5; });
                          -
                          171dispenso::BiPropNode& N2 = g.addNode([&]() { b /= m4; });
                          -
                          172dispenso::BiPropNode& N3 = g.addNode([&]() { m3 += b*b; });
                          -
                          173dispenso::BiPropNode& N4 = g.addNode([&]() { m4 += 2; });
                          -
                          174
                          -
                          175N3.dependsOn(N1);
                          -
                          176N2.dependsOn(N4);
                          -
                          177N2.biPropDependsOn(N1);
                          -
                          178N1.biPropDependsOn(N0);
                          -
                          179
                          -
                          180// first execution
                          -
                          181b = m3 = m4 = 0.f;
                          -
                          182dispenso::ConcurrentTaskSet concurrentTaskSet(dispenso::globalThreadPool());
                          -
                          183dispenso::ConcurrentTaskSetExecutor concurrentTaskSetExecutor;
                          -
                          184concurrentTaskSetExecutor(concurrentTaskSet, g);
                          -
                          185
                          -
                          186N[4].setIncomplete();
                          -
                          187// if node 4 is incomplete after propagation node 2 become incomplete. Taking in account that node 2
                          -
                          188// bidirectionally depends on nodes 0 and 1 they will be marked as incomplete as well
                          -
                          189b = m4 = 0.f;
                          -
                          190ForwardPropagator forwardPropagator;
                          -
                          191forwardPropagator(g);
                          -
                          192concurrentTaskSetExecutor(concurrentTaskSet, g);
                          -
                          193~~~
                          -
                          194
                          -
                          195Please read tests from `graph_test.cpp` for more examples.
                          -
                          196*/
                          -
                          197
                          -
                          198namespace detail {
                          -
                          199class ExecutorBase;
                          -
                          200
                          -
                          201template <typename F>
                          -
                          202void callFunctor(void* ptr) {
                          -
                          203 (*static_cast<F*>(ptr))();
                          -
                          204}
                          -
                          205
                          -
                          206template <typename F>
                          -
                          207void destroyFunctor(void* ptr) {
                          -
                          208 static_cast<F*>(ptr)->~F();
                          -
                          209 constexpr size_t kFuncSize = static_cast<size_t>(dispenso::detail::nextPow2(sizeof(F)));
                          -
                          210 dispenso::deallocSmallBuffer<kFuncSize>(ptr);
                          -
                          211}
                          -
                          212
                          -
                          213} // namespace detail
                          +
                          47dispenso::Graph graph;
                          +
                          48
                          +
                          49dispenso::Node& N0 = graph.addNode([&]() { r[0] += 1; });
                          +
                          50dispenso::Node& N2 = graph.addNode([&]() { r[2] += 8; });
                          +
                          51dispenso::Node& N1 = graph.addNode([&]() { r[1] += r[0] * 2; });
                          +
                          52dispenso::Node& N3 = graph.addNode([&]() { r[3] += r[2] / 2; });
                          +
                          53dispenso::Node& N4 = graph.addNode([&]() { r[4] += r[1] + r[3]; });
                          +
                          54
                          +
                          55N4.dependsOn(N1, N3);
                          +
                          56N1.dependsOn(N0);
                          +
                          57N3.dependsOn(N2);
                          +
                          58
                          +
                          59dispenso::TaskSet taskSet(dispenso::globalThreadPool());
                          +
                          60dispenso::ParallelForExecutor parallelForExecutor;
                          +
                          61parallelForExecutor(taskSet, graph);
                          +
                          62~~~
                          +
                          63
                          +
                          64Partial revaluation
                          +
                          65--------------------------------------------------------------------------------
                          +
                          66If graph is big or we need to recompute graph partially we can execute it again.
                          +
                          67After execution of the graph all nodes change their state from "incomplete" to
                          +
                          68"completed". If order to evaluate whole graph again we can use function `setAllNodesIncomplete`
                          +
                          69Example:
                          +
                          70~~~
                          +
                          71r = {0, 0, 0, 0, 0};
                          +
                          72setAllNodesIncomplete(graph);
                          +
                          73parallelForExecutor(taskSet, graph);
                          +
                          74~~~
                          +
                          75
                          +
                          76The graph can be recomputed partially if we have new input data for one or several nodes in the
                          +
                          77graph. It order to do it we need to call `setIncomplete()` method for every node which we need to
                          +
                          78recompute and after use functor `ForwardPropagator` to mark as "incomplete" all dependents.
                          +
                          79
                          +
                          80Example:
                          +
                          81~~~
                          +
                          82N1.setIncomplete();
                          +
                          83r[1] = r[4] = 0;
                          +
                          84ForwardPropagator forwardPropagator;
                          +
                          85forwardPropagator(graph);
                          +
                          86evaluateGraph(graph);
                          +
                          87~~~
                          +
                          88In this exaple only node 1 and 4 will be invoked.
                          +
                          89
                          +
                          90 Subgraphs
                          +
                          91--------------------------------------------------------------------------------
                          +
                          92It is possible to organize nodes into subgraphs and destroy and recreate if we have static and
                          +
                          93dynamic parts of the computation graph
                          +
                          94Example:
                          +
                          95~~~
                          +
                          96//
                          +
                          97// ∙----subgraph1---∙ ∙---subgraph2-------∙
                          +
                          98// ¦ ┌────────────┐ ¦ ¦ ┌───────────────┐ ¦ ┌───────────────────┐
                          +
                          99// ¦ │ 0: r[0]+=1 │ ──▶ │ 1: r[1]=r[0]*2│ ──▶ │ 4: r[4]=r[1]+r[3] │
                          +
                          100// ¦ └────────────┘ ¦ ¦ └───────────────┘ ¦ └───────────────────┘
                          +
                          101// ¦ ¦ ¦ ¦ ▲
                          +
                          102// ¦ ┌────────────┐ ¦ ¦ ┌───────────────┐ ¦ │
                          +
                          103// ¦ │ 2: r[2]+=8 │ ──▶ │ 3: r[3]=r[2]/2│ ──────┘
                          +
                          104// ¦ └────────────┘ ¦ ¦ └───────────────┘ ¦
                          +
                          105// ∙----------------∙ ∙-------------------∙
                          +
                          106std::array<float, 5> r;
                          +
                          107dispenso::Graph graph;
                          +
                          108
                          +
                          109dispenso::Subgraph& subgraph1 = graph.addSubgraph();
                          +
                          110dispenso::Subgraph& subgraph2 = graph.addSubgraph();
                          +
                          111
                          +
                          112dispenso::Node& N0 = subgraph1.addNode([&]() { r[0] += 1; });
                          +
                          113dispenso::Node& N2 = subgraph1.addNode([&]() { r[2] += 8; });
                          +
                          114dispenso::Node& N1 = subgraph2.addNode([&]() { r[1] += r[0] * 2; });
                          +
                          115dispenso::Node& N3 = subgraph2.addNode([&]() { r[3] += r[2] / 2; });
                          +
                          116dispenso::Node& N4 = graph.addNode([&]() { r[4] += r[1] + r[3]; });
                          +
                          117
                          +
                          118N4.dependsOn(N1, N3);
                          +
                          119N1.dependsOn(N0);
                          +
                          120N3.dependsOn(N2);
                          +
                          121
                          +
                          122// evaluate graph first time
                          +
                          123r = {0, 0, 0, 0, 0};
                          +
                          124dispenso::ConcurrentTaskSet concurrentTaskSet(dispenso::globalThreadPool());
                          +
                          125dispenso::ConcurrentTaskSetExecutor concurrentTaskSetExecutor;
                          +
                          126concurrentTaskSetExecutor(concurrentTaskSet, graph);
                          +
                          127
                          +
                          128// disconnect and destroy nodes of subgraph2
                          +
                          129// it invalidates node references/pointers of this subgraph
                          +
                          130subgraph2.clear();
                          +
                          131
                          +
                          132// create another nodes
                          +
                          133dispenso::Node& newN1 = subgraph2.addNode([&]() { r[1] += r[0] * 20; });
                          +
                          134dispenso::Node& newN3 = subgraph2.addNode([&]() { r[3] += r[2] / 20; });
                          +
                          135newN1.dependsOn(N0);
                          +
                          136newN3.dependsOn(N2);
                          +
                          137N4.dependsOn(newN1, newN3);
                          +
                          138
                          +
                          139// and revaluae the graph
                          +
                          140setAllNodesIncomplete(movedGraph);
                          +
                          141concurrentTaskSetExecutor(concurrentTaskSet, graph);
                          +
                          142~~~
                          +
                          143
                          +
                          144Bidirectional propagation dependency
                          +
                          145--------------------------------------------------------------------------------
                          +
                          146In certain scenarios, nodes may alter the same memory. In such instances, it becomes necessary to
                          +
                          147compute the predecessors of the node, even if they possess a "completed" state following state
                          +
                          148propagation. To facilitate this process automatically, we introduce the notion of a bidirectional
                          +
                          149propagation dependency (`BiProp`).
                          +
                          150
                          +
                          151Example:
                          +
                          152~~~
                          +
                          153// ┌─────────────────┐
                          +
                          154// │ 3: m3+=b*b │
                          +
                          155// └─────────────────┘
                          +
                          156// ▲
                          +
                          157// ┌−-----------−−−−−−−−−│−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−┐
                          +
                          158// ╎ ┌───────────┐ ┌─────────────────┐ ┌────────────┐ ╎
                          +
                          159// ╎ │ 0: b+=5 │ ──▷ │ 1: b*=5 │ ──▷ │ 2: b/=m4 │ ╎
                          +
                          160// ╎ └───────────┘ └─────────────────┘ └────────────┘ ╎
                          +
                          161// └−−−-−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−▲−−−−−−−−−−−−┘
                          +
                          162// Legend: │
                          +
                          163// ──▶ Normal dependency ┌────────────┐
                          +
                          164// ──▷ Bidirectional propagation dependency │ 4: m4+=2 │
                          +
                          165// m4 variable modified only in node 4 └────────────┘
                          +
                          166
                          +
                          167float b, m3, m4
                          +
                          168dispenso::BiPropGraph g;
                          +
                          169std::array<dispenso::BiPropNode*, 8> N;
                          +
                          170
                          +
                          171dispenso::BiPropNode& N0 = g.addNode([&]() { b += 5; });
                          +
                          172dispenso::BiPropNode& N1 = g.addNode([&]() { b *= 5; });
                          +
                          173dispenso::BiPropNode& N2 = g.addNode([&]() { b /= m4; });
                          +
                          174dispenso::BiPropNode& N3 = g.addNode([&]() { m3 += b*b; });
                          +
                          175dispenso::BiPropNode& N4 = g.addNode([&]() { m4 += 2; });
                          +
                          176
                          +
                          177N3.dependsOn(N1);
                          +
                          178N2.dependsOn(N4);
                          +
                          179N2.biPropDependsOn(N1);
                          +
                          180N1.biPropDependsOn(N0);
                          +
                          181
                          +
                          182// first execution
                          +
                          183b = m3 = m4 = 0.f;
                          +
                          184dispenso::ConcurrentTaskSet concurrentTaskSet(dispenso::globalThreadPool());
                          +
                          185dispenso::ConcurrentTaskSetExecutor concurrentTaskSetExecutor;
                          +
                          186concurrentTaskSetExecutor(concurrentTaskSet, g);
                          +
                          187
                          +
                          188N[4].setIncomplete();
                          +
                          189// if node 4 is incomplete after propagation node 2 become incomplete. Taking in account that node 2
                          +
                          190// bidirectionally depends on nodes 0 and 1 they will be marked as incomplete as well
                          +
                          191b = m4 = 0.f;
                          +
                          192ForwardPropagator forwardPropagator;
                          +
                          193forwardPropagator(g);
                          +
                          194concurrentTaskSetExecutor(concurrentTaskSet, g);
                          +
                          195~~~
                          +
                          196
                          +
                          197Please read tests from `graph_test.cpp` for more examples.
                          +
                          198*/
                          +
                          199
                          +
                          200namespace detail {
                          +
                          201class ExecutorBase;
                          +
                          202
                          +
                          203template <typename F>
                          +
                          204void callFunctor(void* ptr) {
                          +
                          205 (*static_cast<F*>(ptr))();
                          +
                          206}
                          +
                          207
                          +
                          208template <typename F>
                          +
                          209void destroyFunctor(void* ptr) {
                          +
                          210 static_cast<F*>(ptr)->~F();
                          +
                          211 constexpr size_t kFuncSize = static_cast<size_t>(dispenso::detail::nextPow2(sizeof(F)));
                          +
                          212 dispenso::deallocSmallBuffer<kFuncSize>(ptr);
                          +
                          213}
                          214
                          -
                          215namespace dispenso {
                          -
                          219class Node {
                          -
                          220 public:
                          -
                          221 Node() = delete;
                          -
                          222 Node(const Node&) = delete;
                          -
                          223 Node& operator=(const Node&) = delete;
                          -
                          224 Node(Node&& other) noexcept
                          -
                          225 : numIncompletePredecessors_(other.numIncompletePredecessors_.load()),
                          -
                          226 numPredecessors_(other.numPredecessors_),
                          -
                          227 invoke_(other.invoke_),
                          -
                          228 destroy_(other.destroy_),
                          -
                          229 funcBuffer_(other.funcBuffer_),
                          -
                          230 dependents_(std::move(other.dependents_)) {
                          -
                          231 other.funcBuffer_ = nullptr;
                          -
                          232 }
                          -
                          233 ~Node() {
                          -
                          234 if (funcBuffer_) {
                          -
                          235 destroy_(funcBuffer_);
                          -
                          236 }
                          -
                          237 };
                          -
                          243 template <typename... Ns>
                          -
                          244 inline void dependsOn(Ns&... nodes) {
                          -
                          245 ((void)std::initializer_list<int>{(dependsOnOneNode(nodes), 0)...});
                          -
                          246 }
                          -
                          251 inline void run() const {
                          -
                          252 invoke_(funcBuffer_);
                          -
                          253 numIncompletePredecessors_.store(kCompleted, std::memory_order_release);
                          -
                          254 }
                          -
                          260 template <class F>
                          -
                          261 inline void forEachDependent(F func) const {
                          -
                          262 for (const Node* dependent : dependents_) {
                          -
                          263 func(*dependent);
                          -
                          264 }
                          -
                          265 }
                          -
                          271 template <class F>
                          -
                          272 inline void forEachDependent(F func) {
                          -
                          273 for (Node* dependent : dependents_) {
                          -
                          274 func(*dependent);
                          -
                          275 }
                          -
                          276 }
                          -
                          280 inline size_t numPredecessors() const {
                          -
                          281 return numPredecessors_;
                          -
                          282 }
                          -
                          289 inline bool isCompleted() const {
                          -
                          290 return numIncompletePredecessors_.load(std::memory_order_relaxed) == kCompleted;
                          -
                          291 }
                          -
                          299 inline bool setIncomplete() const {
                          -
                          300 if (numIncompletePredecessors_.load(std::memory_order_relaxed) == kCompleted) {
                          -
                          301 numIncompletePredecessors_.store(0, std::memory_order_relaxed);
                          -
                          302 return true;
                          -
                          303 }
                          -
                          304 return false;
                          -
                          305 }
                          -
                          306
                          -
                          312 inline void setCompleted() const {
                          -
                          313 numIncompletePredecessors_.store(kCompleted, std::memory_order_relaxed);
                          -
                          314 }
                          -
                          315
                          -
                          316 protected:
                          -
                          317 template <class F, class X = std::enable_if_t<!std::is_base_of<Node, F>::value, void>>
                          -
                          318 Node(F&& f) : numIncompletePredecessors_(0) {
                          -
                          319 using FNoRef = typename std::remove_reference<F>::type;
                          -
                          320
                          -
                          321 constexpr size_t kFuncSize = static_cast<size_t>(detail::nextPow2(sizeof(FNoRef)));
                          -
                          322 funcBuffer_ = allocSmallBuffer<kFuncSize>();
                          -
                          323 new (funcBuffer_) FNoRef(std::forward<F>(f));
                          -
                          324 invoke_ = ::detail::callFunctor<FNoRef>;
                          -
                          325 destroy_ = ::detail::destroyFunctor<FNoRef>;
                          -
                          326 }
                          -
                          327
                          -
                          328 void dependsOnOneNode(Node& node) {
                          -
                          329 node.dependents_.emplace_back(this);
                          -
                          330 numPredecessors_++;
                          -
                          331 }
                          -
                          332
                          -
                          333 static constexpr size_t kCompleted = std::numeric_limits<size_t>::max();
                          -
                          334 mutable std::atomic<size_t> numIncompletePredecessors_;
                          -
                          335 size_t numPredecessors_ = 0;
                          -
                          336
                          -
                          337 private:
                          -
                          338 using InvokerType = void (*)(void* ptr);
                          -
                          339
                          -
                          340 InvokerType invoke_;
                          -
                          341 InvokerType destroy_;
                          -
                          342 char* funcBuffer_;
                          -
                          343
                          -
                          344 std::vector<Node*> dependents_; // nodes depend on this
                          +
                          215} // namespace detail
                          +
                          216
                          +
                          217namespace dispenso {
                          +
                          221class Node {
                          +
                          222 public:
                          +
                          223 Node() = delete;
                          +
                          224 Node(const Node&) = delete;
                          +
                          225 Node& operator=(const Node&) = delete;
                          +
                          226 Node(Node&& other) noexcept
                          +
                          227 : numIncompletePredecessors_(other.numIncompletePredecessors_.load()),
                          +
                          228 numPredecessors_(other.numPredecessors_),
                          +
                          229 invoke_(other.invoke_),
                          +
                          230 destroy_(other.destroy_),
                          +
                          231 funcBuffer_(other.funcBuffer_),
                          +
                          232 dependents_(std::move(other.dependents_)) {
                          +
                          233 other.funcBuffer_ = nullptr;
                          +
                          234 }
                          +
                          235 ~Node() {
                          +
                          236 if (funcBuffer_) {
                          +
                          237 destroy_(funcBuffer_);
                          +
                          238 }
                          +
                          239 };
                          +
                          245 template <typename... Ns>
                          +
                          246 inline void dependsOn(Ns&... nodes) {
                          +
                          247 ((void)std::initializer_list<int>{(dependsOnOneNode(nodes), 0)...});
                          +
                          248 }
                          +
                          253 inline void run() const {
                          +
                          254 invoke_(funcBuffer_);
                          +
                          255 numIncompletePredecessors_.store(kCompleted, std::memory_order_release);
                          +
                          256 }
                          +
                          262 template <class F>
                          +
                          263 inline void forEachDependent(F func) const {
                          +
                          264 for (const Node* dependent : dependents_) {
                          +
                          265 func(*dependent);
                          +
                          266 }
                          +
                          267 }
                          +
                          273 template <class F>
                          +
                          274 inline void forEachDependent(F func) {
                          +
                          275 for (Node* dependent : dependents_) {
                          +
                          276 func(*dependent);
                          +
                          277 }
                          +
                          278 }
                          +
                          282 inline size_t numPredecessors() const {
                          +
                          283 return numPredecessors_;
                          +
                          284 }
                          +
                          291 inline bool isCompleted() const {
                          +
                          292 return numIncompletePredecessors_.load(std::memory_order_relaxed) == kCompleted;
                          +
                          293 }
                          +
                          301 inline bool setIncomplete() const {
                          +
                          302 if (numIncompletePredecessors_.load(std::memory_order_relaxed) == kCompleted) {
                          +
                          303 numIncompletePredecessors_.store(0, std::memory_order_relaxed);
                          +
                          304 return true;
                          +
                          305 }
                          +
                          306 return false;
                          +
                          307 }
                          +
                          308
                          +
                          314 inline void setCompleted() const {
                          +
                          315 numIncompletePredecessors_.store(kCompleted, std::memory_order_relaxed);
                          +
                          316 }
                          +
                          317
                          +
                          318 protected:
                          +
                          319 template <class F, class X = std::enable_if_t<!std::is_base_of<Node, F>::value, void>>
                          +
                          320 Node(F&& f) : numIncompletePredecessors_(0) {
                          +
                          321 using FNoRef = typename std::remove_reference<F>::type;
                          +
                          322
                          +
                          323 constexpr size_t kFuncSize = static_cast<size_t>(detail::nextPow2(sizeof(FNoRef)));
                          +
                          324 funcBuffer_ = allocSmallBuffer<kFuncSize>();
                          +
                          325 new (funcBuffer_) FNoRef(std::forward<F>(f));
                          +
                          326 invoke_ = ::detail::callFunctor<FNoRef>;
                          +
                          327 destroy_ = ::detail::destroyFunctor<FNoRef>;
                          +
                          328 }
                          +
                          329
                          +
                          330 void dependsOnOneNode(Node& node) {
                          +
                          331 node.dependents_.emplace_back(this);
                          +
                          332 numPredecessors_++;
                          +
                          333 }
                          +
                          334
                          +
                          335 static constexpr size_t kCompleted = std::numeric_limits<size_t>::max();
                          +
                          336 mutable std::atomic<size_t> numIncompletePredecessors_;
                          +
                          337 size_t numPredecessors_ = 0;
                          +
                          338
                          +
                          339 private:
                          +
                          340 using InvokerType = void (*)(void* ptr);
                          +
                          341
                          +
                          342 InvokerType invoke_;
                          +
                          343 InvokerType destroy_;
                          +
                          344 char* funcBuffer_;
                          345
                          -
                          346 template <class N>
                          -
                          347 friend class SubgraphT;
                          -
                          348 friend class ::detail::ExecutorBase;
                          -
                          349 template <typename G>
                          -
                          350 friend void setAllNodesIncomplete(const G& graph);
                          -
                          351};
                          -
                          356class BiPropNode : public Node {
                          -
                          357 public:
                          -
                          358 BiPropNode() = delete;
                          -
                          359 BiPropNode(const BiPropNode&) = delete;
                          -
                          360 BiPropNode& operator=(const BiPropNode&) = delete;
                          -
                          361 BiPropNode(BiPropNode&& other) noexcept
                          -
                          362 : Node(std::move(other)), biPropSet_(std::move(other.biPropSet_)) {}
                          -
                          369 template <class... Ns>
                          -
                          370 inline void biPropDependsOn(Ns&... nodes) {
                          -
                          371 ((void)std::initializer_list<int>{(biPropDependsOnOneNode(nodes), 0)...});
                          -
                          372 }
                          -
                          373
                          -
                          374 private:
                          -
                          375 template <class T, class X = std::enable_if_t<!std::is_base_of<BiPropNode, T>::value, void>>
                          -
                          376 BiPropNode(T&& f) : Node(std::forward<T>(f)) {}
                          -
                          377 inline void removeFromBiPropSet() {
                          -
                          378 if (biPropSet_ != nullptr) {
                          -
                          379 auto it = std::find(biPropSet_->begin(), biPropSet_->end(), this);
                          -
                          380 if (it != biPropSet_->end()) {
                          -
                          381 biPropSet_->erase(it);
                          -
                          382 }
                          -
                          383 }
                          -
                          384 }
                          -
                          385
                          -
                          386 DISPENSO_DLL_ACCESS void biPropDependsOnOneNode(BiPropNode& node);
                          +
                          346 std::vector<Node*> dependents_; // nodes depend on this
                          +
                          347
                          +
                          348 template <class N>
                          +
                          349 friend class SubgraphT;
                          +
                          350 friend class ::detail::ExecutorBase;
                          +
                          351 template <typename G>
                          +
                          352 friend void setAllNodesIncomplete(const G& graph);
                          +
                          353};
                          +
                          358class BiPropNode : public Node {
                          +
                          359 public:
                          +
                          360 BiPropNode() = delete;
                          +
                          361 BiPropNode(const BiPropNode&) = delete;
                          +
                          362 BiPropNode& operator=(const BiPropNode&) = delete;
                          +
                          363 BiPropNode(BiPropNode&& other) noexcept
                          +
                          364 : Node(std::move(other)), biPropSet_(std::move(other.biPropSet_)) {}
                          +
                          371 template <class... Ns>
                          +
                          372 inline void biPropDependsOn(Ns&... nodes) {
                          +
                          373 ((void)std::initializer_list<int>{(biPropDependsOnOneNode(nodes), 0)...});
                          +
                          374 }
                          +
                          375
                          +
                          376 private:
                          +
                          377 template <class T, class X = std::enable_if_t<!std::is_base_of<BiPropNode, T>::value, void>>
                          +
                          378 BiPropNode(T&& f) : Node(std::forward<T>(f)) {}
                          +
                          379 inline void removeFromBiPropSet() {
                          +
                          380 if (biPropSet_ != nullptr) {
                          +
                          381 auto it = std::find(biPropSet_->begin(), biPropSet_->end(), this);
                          +
                          382 if (it != biPropSet_->end()) {
                          +
                          383 biPropSet_->erase(it);
                          +
                          384 }
                          +
                          385 }
                          +
                          386 }
                          387
                          -
                          388 std::shared_ptr<std::vector<const BiPropNode*>> biPropSet_;
                          +
                          388 DISPENSO_DLL_ACCESS void biPropDependsOnOneNode(BiPropNode& node);
                          389
                          -
                          390 template <class N>
                          -
                          391 friend class SubgraphT;
                          -
                          392 friend class ::detail::ExecutorBase;
                          -
                          393};
                          -
                          394
                          -
                          395template <class N>
                          -
                          396class GraphT;
                          -
                          397
                          -
                          398template <class N>
                          - -
                          400 public:
                          -
                          401 using NodeType = N;
                          -
                          402 SubgraphT() = delete;
                          -
                          403 SubgraphT(const SubgraphT<N>&) = delete;
                          -
                          404 SubgraphT<N>& operator=(const SubgraphT<N>&) = delete;
                          -
                          405 SubgraphT(SubgraphT<N>&& other) : graph_(other.graph_), nodes_(std::move(other.nodes_)) {}
                          -
                          412 template <class T>
                          -
                          413 N& addNode(T&& f) {
                          -
                          414 nodes_.push_back(NodeType(std::forward<T>(f)));
                          -
                          415 return nodes_.back();
                          -
                          416 }
                          -
                          420 size_t numNodes() const {
                          -
                          421 return nodes_.size();
                          +
                          390 std::shared_ptr<std::vector<const BiPropNode*>> biPropSet_;
                          +
                          391
                          +
                          392 template <class N>
                          +
                          393 friend class SubgraphT;
                          +
                          394 friend class ::detail::ExecutorBase;
                          +
                          395};
                          +
                          396
                          +
                          397template <class N>
                          +
                          398class GraphT;
                          +
                          399
                          +
                          400template <class N>
                          +
                          401class DISPENSO_DLL_ACCESS SubgraphT {
                          +
                          402 public:
                          +
                          403 using NodeType = N;
                          +
                          404 SubgraphT() = delete;
                          +
                          405 SubgraphT(const SubgraphT<N>&) = delete;
                          +
                          406 SubgraphT<N>& operator=(const SubgraphT<N>&) = delete;
                          +
                          407 SubgraphT(SubgraphT<N>&& other)
                          +
                          408 : graph_(other.graph_),
                          +
                          409 nodes_(std::move(other.nodes_)),
                          +
                          410 allocator_(std::move(other.allocator_)) {}
                          +
                          411 ~SubgraphT();
                          +
                          418 template <class T>
                          +
                          419 N& addNode(T&& f) {
                          +
                          420 nodes_.push_back(new (allocator_->alloc()) NodeType(std::forward<T>(f)));
                          +
                          421 return *nodes_.back();
                          422 }
                          -
                          428 const N& node(size_t index) const {
                          -
                          429 return nodes_[index];
                          -
                          430 }
                          -
                          436 N& node(size_t index) {
                          -
                          437 return nodes_[index];
                          -
                          438 }
                          -
                          444 template <class F>
                          -
                          445 inline void forEachNode(F func) const {
                          -
                          446 for (const N& node : nodes_) {
                          -
                          447 func(node);
                          -
                          448 }
                          -
                          449 }
                          -
                          456 template <class F>
                          -
                          457 inline void forEachNode(F func) {
                          -
                          458 for (N& node : nodes_) {
                          -
                          459 func(node);
                          -
                          460 }
                          -
                          461 }
                          -
                          466 void clear();
                          -
                          467
                          -
                          468 private:
                          -
                          469 explicit SubgraphT<N>(GraphT<N>* graph) : graph_(graph), nodes_() {}
                          -
                          470 inline void removeNodeFromBiPropSet(Node& /* node */) {}
                          -
                          471 void removeNodeFromBiPropSet(BiPropNode& node) {
                          -
                          472 node.removeFromBiPropSet();
                          -
                          473 }
                          -
                          474 void decrementDependentCounters();
                          -
                          475 size_t markNodesWithPredicessors();
                          -
                          476 void removePredecessorDependencies(size_t numGraphPredecessors);
                          +
                          426 size_t numNodes() const {
                          +
                          427 return nodes_.size();
                          +
                          428 }
                          +
                          434 const N& node(size_t index) const {
                          +
                          435 return *nodes_[index];
                          +
                          436 }
                          +
                          442 N& node(size_t index) {
                          +
                          443 return *nodes_[index];
                          +
                          444 }
                          +
                          450 template <class F>
                          +
                          451 inline void forEachNode(F func) const {
                          +
                          452 for (const N* node : nodes_) {
                          +
                          453 func(*node);
                          +
                          454 }
                          +
                          455 }
                          +
                          462 template <class F>
                          +
                          463 inline void forEachNode(F func) {
                          +
                          464 for (N* node : nodes_) {
                          +
                          465 func(*node);
                          +
                          466 }
                          +
                          467 }
                          +
                          472 void clear();
                          +
                          473
                          +
                          474 private:
                          +
                          475 using DeallocFunc = void (*)(NoLockPoolAllocator*);
                          +
                          476 using PoolPtr = std::unique_ptr<NoLockPoolAllocator, DeallocFunc>;
                          477
                          -
                          478 GraphT<N>* graph_;
                          -
                          479#if defined(_WIN32)
                          -
                          480#pragma warning(push)
                          -
                          481#pragma warning(disable : 4251)
                          -
                          482#endif
                          -
                          483 std::deque<N> nodes_;
                          -
                          484#if defined(_WIN32)
                          -
                          485#pragma warning(pop)
                          -
                          486#endif
                          -
                          487
                          -
                          488 template <class T>
                          -
                          489 friend class GraphT;
                          -
                          490};
                          -
                          491
                          -
                          492template <class N>
                          -
                          493class GraphT {
                          -
                          494 public:
                          -
                          495 using NodeType = N;
                          - -
                          497 GraphT(const GraphT<N>&) = delete;
                          -
                          498 GraphT& operator=(const GraphT<N>&) = delete;
                          -
                          502 GraphT<N>() {
                          -
                          503 subgraphs_.push_back(SubgraphType(this));
                          -
                          504 }
                          -
                          508 GraphT(GraphT<N>&& other);
                          -
                          512 GraphT<N>& operator=(GraphT&& other);
                          -
                          519 template <class T>
                          -
                          520 N& addNode(T&& f) {
                          -
                          521 return subgraphs_[0].addNode(std::forward<T>(f));
                          -
                          522 }
                          -
                          526 size_t numNodes() const {
                          -
                          527 return subgraphs_[0].numNodes();
                          -
                          528 }
                          -
                          534 const N& node(size_t index) const {
                          -
                          535 return subgraphs_[0].node(index);
                          -
                          536 }
                          -
                          542 N& node(size_t index) {
                          -
                          543 return subgraphs_[0].node(index);
                          -
                          544 }
                          - -
                          552 size_t numSubgraphs() const {
                          -
                          553 return subgraphs_.size();
                          -
                          554 }
                          -
                          560 const SubgraphT<N>& subgraphs(size_t index) const {
                          -
                          561 return subgraphs_[index];
                          -
                          562 }
                          -
                          568 SubgraphT<N>& subgraphs(size_t index) {
                          -
                          569 return subgraphs_[index];
                          -
                          570 }
                          -
                          576 template <class F>
                          -
                          577 inline void forEachSubgraph(F&& func) const {
                          -
                          578 for (const SubgraphT<N>& subgraph : subgraphs_) {
                          -
                          579 func(subgraph);
                          -
                          580 }
                          -
                          581 }
                          -
                          587 template <class F>
                          -
                          588 inline void forEachSubgraph(F&& func) {
                          -
                          589 for (SubgraphT<N>& subgraph : subgraphs_) {
                          -
                          590 func(subgraph);
                          -
                          591 }
                          -
                          592 }
                          -
                          599 template <class F>
                          -
                          600 inline void forEachNode(F&& func) const {
                          -
                          601 for (const SubgraphT<N>& subgraph : subgraphs_) {
                          -
                          602 for (const N& node : subgraph.nodes_) {
                          -
                          603 func(node);
                          -
                          604 }
                          -
                          605 }
                          -
                          606 }
                          -
                          612 template <class F>
                          -
                          613 inline void forEachNode(F&& func) {
                          -
                          614 for (SubgraphT<N>& subgraph : subgraphs_) {
                          -
                          615 for (N& node : subgraph.nodes_) {
                          -
                          616 func(node);
                          -
                          617 }
                          -
                          618 }
                          -
                          619 }
                          -
                          623 void clear() {
                          -
                          624 subgraphs_.clear();
                          -
                          625 subgraphs_.push_back(SubgraphType(this));
                          -
                          626 }
                          -
                          627
                          -
                          628 private:
                          -
                          629#if defined(_WIN32)
                          -
                          630#pragma warning(push)
                          -
                          631#pragma warning(disable : 4251)
                          -
                          632#endif
                          -
                          633 std::deque<SubgraphT<N>> subgraphs_;
                          -
                          634#if defined(_WIN32)
                          -
                          635#pragma warning(pop)
                          -
                          636#endif
                          -
                          637
                          -
                          638 template <class T>
                          -
                          639 friend class SubgraphT;
                          -
                          640};
                          -
                          641
                          -
                          642using Graph = GraphT<Node>;
                          -
                          643using BiPropGraph = GraphT<BiPropNode>;
                          +
                          478 static constexpr size_t kNodeSizeP2 = detail::nextPow2(sizeof(NodeType));
                          +
                          479
                          +
                          480 explicit SubgraphT<N>(GraphT<N>* graph) : graph_(graph), nodes_(), allocator_(getAllocator()) {}
                          +
                          481
                          +
                          482 inline void removeNodeFromBiPropSet(Node* /* node */) {}
                          +
                          483 void removeNodeFromBiPropSet(BiPropNode* node) {
                          +
                          484 node->removeFromBiPropSet();
                          +
                          485 }
                          +
                          486 void decrementDependentCounters();
                          +
                          487 size_t markNodesWithPredicessors();
                          +
                          488 void removePredecessorDependencies(size_t numGraphPredecessors);
                          +
                          489
                          +
                          490 static PoolPtr getAllocator();
                          +
                          491 static void releaseAllocator(NoLockPoolAllocator* ptr);
                          +
                          492
                          +
                          493 GraphT<N>* graph_;
                          +
                          494#if defined(_WIN32)
                          +
                          495#pragma warning(push)
                          +
                          496#pragma warning(disable : 4251)
                          +
                          497#endif
                          +
                          498 std::vector<N*> nodes_;
                          +
                          499
                          +
                          500 PoolPtr allocator_;
                          +
                          501#if defined(_WIN32)
                          +
                          502#pragma warning(pop)
                          +
                          503#endif
                          +
                          504
                          +
                          505 template <class T>
                          +
                          506 friend class GraphT;
                          +
                          507};
                          +
                          508
                          +
                          509template <class N>
                          +
                          510class DISPENSO_DLL_ACCESS GraphT {
                          +
                          511 public:
                          +
                          512 using NodeType = N;
                          + +
                          514 GraphT(const GraphT<N>&) = delete;
                          +
                          515 GraphT& operator=(const GraphT<N>&) = delete;
                          +
                          519 GraphT<N>() {
                          +
                          520 subgraphs_.push_back(SubgraphType(this));
                          +
                          521 }
                          +
                          525 GraphT(GraphT<N>&& other);
                          +
                          529 GraphT<N>& operator=(GraphT&& other);
                          +
                          536 template <class T>
                          +
                          537 N& addNode(T&& f) {
                          +
                          538 return subgraphs_[0].addNode(std::forward<T>(f));
                          +
                          539 }
                          +
                          543 size_t numNodes() const {
                          +
                          544 return subgraphs_[0].numNodes();
                          +
                          545 }
                          +
                          551 const N& node(size_t index) const {
                          +
                          552 return subgraphs_[0].node(index);
                          +
                          553 }
                          +
                          559 N& node(size_t index) {
                          +
                          560 return subgraphs_[0].node(index);
                          +
                          561 }
                          +
                          565 SubgraphT<N>& addSubgraph();
                          +
                          569 size_t numSubgraphs() const {
                          +
                          570 return subgraphs_.size();
                          +
                          571 }
                          +
                          577 const SubgraphT<N>& subgraphs(size_t index) const {
                          +
                          578 return subgraphs_[index];
                          +
                          579 }
                          +
                          585 SubgraphT<N>& subgraphs(size_t index) {
                          +
                          586 return subgraphs_[index];
                          +
                          587 }
                          +
                          593 template <class F>
                          +
                          594 inline void forEachSubgraph(F&& func) const {
                          +
                          595 for (const SubgraphT<N>& subgraph : subgraphs_) {
                          +
                          596 func(subgraph);
                          +
                          597 }
                          +
                          598 }
                          +
                          604 template <class F>
                          +
                          605 inline void forEachSubgraph(F&& func) {
                          +
                          606 for (SubgraphT<N>& subgraph : subgraphs_) {
                          +
                          607 func(subgraph);
                          +
                          608 }
                          +
                          609 }
                          +
                          616 template <class F>
                          +
                          617 inline void forEachNode(F&& func) const {
                          +
                          618 for (const SubgraphT<N>& subgraph : subgraphs_) {
                          +
                          619 for (const N* node : subgraph.nodes_) {
                          +
                          620 func(*node);
                          +
                          621 }
                          +
                          622 }
                          +
                          623 }
                          +
                          629 template <class F>
                          +
                          630 inline void forEachNode(F&& func) {
                          +
                          631 for (SubgraphT<N>& subgraph : subgraphs_) {
                          +
                          632 for (N* node : subgraph.nodes_) {
                          +
                          633 func(*node);
                          +
                          634 }
                          +
                          635 }
                          +
                          636 }
                          +
                          640 void clear() {
                          +
                          641 subgraphs_.clear();
                          +
                          642 subgraphs_.push_back(SubgraphType(this));
                          +
                          643 }
                          644
                          -
                          645using Subgraph = SubgraphT<Node>;
                          -
                          646using BiPropSubgraph = SubgraphT<BiPropNode>;
                          -
                          647} // namespace dispenso
                          - -
                          void biPropDependsOn(Ns &... nodes)
                          Definition: graph.h:370
                          - -
                          const SubgraphT< N > & subgraphs(size_t index) const
                          Definition: graph.h:560
                          -
                          N & addNode(T &&f)
                          Definition: graph.h:520
                          -
                          void forEachNode(F &&func) const
                          Definition: graph.h:600
                          -
                          void clear()
                          Definition: graph.h:623
                          -
                          SubgraphT< N > & subgraphs(size_t index)
                          Definition: graph.h:568
                          -
                          void forEachNode(F &&func)
                          Definition: graph.h:613
                          -
                          void forEachSubgraph(F &&func) const
                          Definition: graph.h:577
                          -
                          size_t numSubgraphs() const
                          Definition: graph.h:552
                          -
                          void forEachSubgraph(F &&func)
                          Definition: graph.h:588
                          - -
                          N & node(size_t index)
                          Definition: graph.h:542
                          -
                          const N & node(size_t index) const
                          Definition: graph.h:534
                          -
                          SubgraphT< N > & addSubgraph()
                          Definition: graph.cpp:126
                          -
                          size_t numNodes() const
                          Definition: graph.h:526
                          - -
                          bool isCompleted() const
                          Definition: graph.h:289
                          -
                          void forEachDependent(F func)
                          Definition: graph.h:272
                          -
                          void forEachDependent(F func) const
                          Definition: graph.h:261
                          -
                          bool setIncomplete() const
                          Definition: graph.h:299
                          -
                          void setCompleted() const
                          Definition: graph.h:312
                          -
                          void dependsOn(Ns &... nodes)
                          Definition: graph.h:244
                          -
                          size_t numPredecessors() const
                          Definition: graph.h:280
                          -
                          void run() const
                          Definition: graph.h:251
                          - - -
                          const N & node(size_t index) const
                          Definition: graph.h:428
                          -
                          N & addNode(T &&f)
                          Definition: graph.h:413
                          -
                          void forEachNode(F func)
                          Definition: graph.h:457
                          -
                          void forEachNode(F func) const
                          Definition: graph.h:445
                          -
                          N & node(size_t index)
                          Definition: graph.h:436
                          -
                          size_t numNodes() const
                          Definition: graph.h:420
                          +
                          645 private:
                          +
                          646 static constexpr size_t kSubgraphSizeP2 = detail::nextPow2(sizeof(SubgraphType));
                          +
                          647
                          +
                          648#if defined(_WIN32)
                          +
                          649#pragma warning(push)
                          +
                          650#pragma warning(disable : 4251)
                          +
                          651#endif
                          +
                          652 std::deque<SubgraphT<N>> subgraphs_;
                          +
                          653#if defined(_WIN32)
                          +
                          654#pragma warning(pop)
                          +
                          655#endif
                          +
                          656
                          +
                          657 template <class T>
                          +
                          658 friend class SubgraphT;
                          +
                          659};
                          +
                          660
                          +
                          661using Graph = GraphT<Node>;
                          +
                          662using BiPropGraph = GraphT<BiPropNode>;
                          +
                          663
                          +
                          664using Subgraph = SubgraphT<Node>;
                          +
                          665using BiPropSubgraph = SubgraphT<BiPropNode>;
                          +
                          666} // namespace dispenso
                          + +
                          void biPropDependsOn(Ns &... nodes)
                          Definition: graph.h:372
                          + +
                          const SubgraphT< N > & subgraphs(size_t index) const
                          Definition: graph.h:577
                          +
                          N & addNode(T &&f)
                          Definition: graph.h:537
                          +
                          void forEachNode(F &&func) const
                          Definition: graph.h:617
                          +
                          void clear()
                          Definition: graph.h:640
                          +
                          SubgraphT< N > & subgraphs(size_t index)
                          Definition: graph.h:585
                          +
                          void forEachNode(F &&func)
                          Definition: graph.h:630
                          +
                          void forEachSubgraph(F &&func) const
                          Definition: graph.h:594
                          +
                          size_t numSubgraphs() const
                          Definition: graph.h:569
                          +
                          void forEachSubgraph(F &&func)
                          Definition: graph.h:605
                          +
                          N & node(size_t index)
                          Definition: graph.h:559
                          +
                          const N & node(size_t index) const
                          Definition: graph.h:551
                          +
                          size_t numNodes() const
                          Definition: graph.h:543
                          + +
                          bool isCompleted() const
                          Definition: graph.h:291
                          +
                          void forEachDependent(F func)
                          Definition: graph.h:274
                          +
                          void forEachDependent(F func) const
                          Definition: graph.h:263
                          +
                          bool setIncomplete() const
                          Definition: graph.h:301
                          +
                          void setCompleted() const
                          Definition: graph.h:314
                          +
                          void dependsOn(Ns &... nodes)
                          Definition: graph.h:246
                          +
                          size_t numPredecessors() const
                          Definition: graph.h:282
                          +
                          void run() const
                          Definition: graph.h:253
                          + + +
                          const N & node(size_t index) const
                          Definition: graph.h:434
                          +
                          N & addNode(T &&f)
                          Definition: graph.h:419
                          +
                          void forEachNode(F func)
                          Definition: graph.h:463
                          +
                          void forEachNode(F func) const
                          Definition: graph.h:451
                          +
                          N & node(size_t index)
                          Definition: graph.h:442
                          +
                          size_t numNodes() const
                          Definition: graph.h:426
                          + diff --git a/graph__executor_8cpp_source.html b/graph__executor_8cpp_source.html index fe42505..aaac41e 100644 --- a/graph__executor_8cpp_source.html +++ b/graph__executor_8cpp_source.html @@ -284,11 +284,11 @@
                          183template DISPENSO_DLL_ACCESS void ForwardPropagator::operator()<BiPropGraph>(const BiPropGraph&);
                          184
                          185} // namespace dispenso
                          - +
                          void schedule(F &&f, bool skipRecheck=false)
                          Definition: task_set.h:213
                          DISPENSO_DLL_ACCESS bool wait()
                          Definition: task_set.cpp:55
                          - +
                          void operator()(TaskSetT &taskSet, const G &graph)
                          void operator()(const G &graph)
                          void parallel_for(TaskSetT &taskSet, StateContainer &states, const StateGen &defaultState, const ChunkedRange< IntegerT > &range, F &&f, ParForOptions options={})
                          Definition: parallel_for.h:344
                          diff --git a/hierarchy.html b/hierarchy.html index a04a9cb..bc7a4c6 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -132,7 +132,7 @@  Cdispenso::BiPropNode  Cdispenso::OnceFunction  Cdispenso::ParForOptions - Cdispenso::PoolAllocator + Cdispenso::PoolAllocatorT< kThreadSafe >  Cdispenso::ReserveTagS  Cdispenso::Resource< T >  Cdispenso::ResourcePool< T > diff --git a/hierarchy.js b/hierarchy.js index a585295..756c3d8 100644 --- a/hierarchy.js +++ b/hierarchy.js @@ -36,7 +36,7 @@ var hierarchy = ] ], [ "dispenso::OnceFunction", "classdispenso_1_1_once_function.html", null ], [ "dispenso::ParForOptions", "structdispenso_1_1_par_for_options.html", null ], - [ "dispenso::PoolAllocator", "classdispenso_1_1_pool_allocator.html", null ], + [ "dispenso::PoolAllocatorT< kThreadSafe >", "classdispenso_1_1_pool_allocator_t.html", null ], [ "dispenso::ReserveTagS", "structdispenso_1_1_reserve_tag_s.html", null ], [ "dispenso::Resource< T >", "classdispenso_1_1_resource.html", null ], [ "dispenso::ResourcePool< T >", "classdispenso_1_1_resource_pool.html", null ], diff --git a/navtreedata.js b/navtreedata.js index 41e09d6..cc04d98 100644 --- a/navtreedata.js +++ b/navtreedata.js @@ -45,7 +45,7 @@ var NAVTREE = var NAVTREEINDEX = [ "annotated.html", -"functions_rela.html" +"functions_p.html" ]; var SYNCONMSG = 'click to disable panel synchronisation'; diff --git a/navtreeindex0.js b/navtreeindex0.js index 140244f..2ac3c85 100644 --- a/navtreeindex0.js +++ b/navtreeindex0.js @@ -160,11 +160,13 @@ var NAVTREEINDEX0 = "classdispenso_1_1_once_function.html#a7bec1f15cb5ca710f21145b37783e052":[0,0,0,22,0], "classdispenso_1_1_parallel_for_executor.html":[0,0,0,23], "classdispenso_1_1_parallel_for_executor.html#ae59c8e5924faa0fe0ad03004b22f52db":[0,0,0,23,0], -"classdispenso_1_1_pool_allocator.html":[0,0,0,25], -"classdispenso_1_1_pool_allocator.html#a38a9be5293b77653b1560cb8e74b5bd4":[0,0,0,25,2], -"classdispenso_1_1_pool_allocator.html#a5c40ea70c1e81435ee7c9152fb9ce62a":[0,0,0,25,1], -"classdispenso_1_1_pool_allocator.html#a7a393687ca662206fea08d6d261cdd20":[0,0,0,25,0], -"classdispenso_1_1_pool_allocator.html#ae7121e9dcebfeb09a6a045d04455a582":[0,0,0,25,3], +"classdispenso_1_1_pool_allocator_t.html":[0,0,0,25], +"classdispenso_1_1_pool_allocator_t.html#a04ec8c4a58977f8ca6011431e1860036":[0,0,0,25,2], +"classdispenso_1_1_pool_allocator_t.html#a67dc4676c39f7226c23ac48ea1a58ad1":[0,0,0,25,3], +"classdispenso_1_1_pool_allocator_t.html#a6f1cf4cfc584a9eef84a3e5e4e92ad60":[0,0,0,25,1], +"classdispenso_1_1_pool_allocator_t.html#a811782e39e4b441b960bc35757af59c1":[0,0,0,25,5], +"classdispenso_1_1_pool_allocator_t.html#a82adb70b33422125a6f3de59a0b63d11":[0,0,0,25,0], +"classdispenso_1_1_pool_allocator_t.html#add24c6cf8e3ea586940a18acf7959a4d":[0,0,0,25,4], "classdispenso_1_1_r_w_lock.html":[0,0,0,29], "classdispenso_1_1_resource.html":[0,0,0,27], "classdispenso_1_1_resource.html#a61190270b880598f6f816905299fb858":[0,0,0,27,0], @@ -247,7 +249,5 @@ var NAVTREEINDEX0 = "functions_l.html":[0,3,0,9], "functions_m.html":[0,3,0,10], "functions_n.html":[0,3,0,11], -"functions_o.html":[0,3,0,12], -"functions_p.html":[0,3,0,13], -"functions_r.html":[0,3,0,14] +"functions_o.html":[0,3,0,12] }; diff --git a/navtreeindex1.js b/navtreeindex1.js index ad0ee13..837da77 100644 --- a/navtreeindex1.js +++ b/navtreeindex1.js @@ -1,5 +1,7 @@ var NAVTREEINDEX1 = { +"functions_p.html":[0,3,0,13], +"functions_r.html":[0,3,0,14], "functions_rela.html":[0,3,3], "functions_s.html":[0,3,0,15], "functions_t.html":[0,3,0,16], diff --git a/pool__allocator_8cpp_source.html b/pool__allocator_8cpp_source.html index f5717bb..72e64cb 100644 --- a/pool__allocator_8cpp_source.html +++ b/pool__allocator_8cpp_source.html @@ -110,75 +110,117 @@
                          9
                          10namespace dispenso {
                          11
                          - -
                          13 size_t chunkSize,
                          -
                          14 size_t allocSize,
                          -
                          15 std::function<void*(size_t)> allocFunc,
                          -
                          16 std::function<void(void*)> deallocFunc)
                          -
                          17 : chunkSize_(chunkSize),
                          -
                          18 allocSize_(allocSize),
                          -
                          19 chunksPerAlloc_(allocSize / chunkSize),
                          -
                          20 allocFunc_(std::move(allocFunc)),
                          -
                          21 deallocFunc_(std::move(deallocFunc)) {
                          -
                          22 // Start off with at least enough space to store at least one set of chunks.
                          -
                          23 chunks_.reserve(chunksPerAlloc_);
                          -
                          24}
                          -
                          25
                          - -
                          27 while (true) {
                          -
                          28 uint32_t allocId = backingAllocLock_.fetch_or(1, std::memory_order_acquire);
                          -
                          29
                          -
                          30 if (allocId == 0) {
                          -
                          31 if (chunks_.empty()) {
                          -
                          32 char* buffer = reinterpret_cast<char*>(allocFunc_(allocSize_));
                          -
                          33 backingAllocs_.push_back(buffer);
                          -
                          34 // Push n-1 values into the chunks_ buffer, and then return the nth.
                          -
                          35 for (size_t i = 0; i < chunksPerAlloc_ - 1; ++i) {
                          -
                          36 chunks_.push_back(buffer);
                          -
                          37 buffer += chunkSize_;
                          -
                          38 }
                          -
                          39 backingAllocLock_.store(0, std::memory_order_release);
                          -
                          40 return buffer;
                          -
                          41 }
                          -
                          42 char* back = chunks_.back();
                          -
                          43 chunks_.pop_back();
                          -
                          44 backingAllocLock_.store(0, std::memory_order_release);
                          -
                          45 return back;
                          -
                          46 } else {
                          -
                          47 std::this_thread::yield();
                          -
                          48 }
                          -
                          49 }
                          -
                          50}
                          -
                          51
                          -
                          52void PoolAllocator::dealloc(char* ptr) {
                          -
                          53 // For now do not release any memory back to the deallocFunc until destruction.
                          -
                          54 // TODO(bbudge): Consider cases where we haven't gotten below some threshold of ready chunks
                          -
                          55 // in a while. In that case, we could begin tracking allocations, and try to assemble entire
                          -
                          56 // starting allocations, possibly deferring a small amount to each alloc call. This would be
                          -
                          57 // slower, but would ensure we don't get into a situation where we need a bunch of memory up
                          -
                          58 // front, and then never again.
                          -
                          59
                          -
                          60 while (true) {
                          -
                          61 uint32_t allocId = backingAllocLock_.fetch_or(1, std::memory_order_acquire);
                          -
                          62 if (allocId == 0) {
                          -
                          63 chunks_.push_back(ptr);
                          -
                          64 backingAllocLock_.store(0, std::memory_order_release);
                          -
                          65 break;
                          -
                          66 }
                          -
                          67 }
                          -
                          68}
                          -
                          69
                          - -
                          71 for (char* backing : backingAllocs_) {
                          -
                          72 deallocFunc_(backing);
                          -
                          73 }
                          -
                          74}
                          +
                          12template <bool kThreadSafe>
                          + +
                          14 size_t chunkSize,
                          +
                          15 size_t allocSize,
                          +
                          16 std::function<void*(size_t)> allocFunc,
                          +
                          17 std::function<void(void*)> deallocFunc)
                          +
                          18 : chunkSize_(chunkSize),
                          +
                          19 allocSize_(allocSize),
                          +
                          20 chunksPerAlloc_(allocSize / chunkSize),
                          +
                          21 allocFunc_(std::move(allocFunc)),
                          +
                          22 deallocFunc_(std::move(deallocFunc)) {
                          +
                          23 // Start off with at least enough space to store at least one set of chunks.
                          +
                          24 chunks_.reserve(chunksPerAlloc_);
                          +
                          25}
                          +
                          26
                          +
                          27template <bool kThreadSafe>
                          + +
                          29 while (true) {
                          +
                          30 uint32_t allocId = 0;
                          +
                          31 if (kThreadSafe) {
                          +
                          32 allocId = backingAllocLock_.fetch_or(1, std::memory_order_acquire);
                          +
                          33 }
                          +
                          34
                          +
                          35 if (allocId == 0) {
                          +
                          36 if (chunks_.empty()) {
                          +
                          37 char* buffer;
                          +
                          38 if (backingAllocs2_.empty()) {
                          +
                          39 buffer = reinterpret_cast<char*>(allocFunc_(allocSize_));
                          +
                          40 } else {
                          +
                          41 buffer = backingAllocs2_.back();
                          +
                          42 backingAllocs2_.pop_back();
                          +
                          43 }
                          +
                          44 backingAllocs_.push_back(buffer);
                          +
                          45 // Push n-1 values into the chunks_ buffer, and then return the nth.
                          +
                          46 for (size_t i = 0; i < chunksPerAlloc_ - 1; ++i) {
                          +
                          47 chunks_.push_back(buffer);
                          +
                          48 buffer += chunkSize_;
                          +
                          49 }
                          +
                          50 if (kThreadSafe) {
                          +
                          51 backingAllocLock_.store(0, std::memory_order_release);
                          +
                          52 }
                          +
                          53 return buffer;
                          +
                          54 }
                          +
                          55 char* back = chunks_.back();
                          +
                          56 chunks_.pop_back();
                          +
                          57 if (kThreadSafe) {
                          +
                          58 backingAllocLock_.store(0, std::memory_order_release);
                          +
                          59 }
                          +
                          60 return back;
                          +
                          61 } else {
                          +
                          62 std::this_thread::yield();
                          +
                          63 }
                          +
                          64 }
                          +
                          65}
                          +
                          66
                          +
                          67template <bool kThreadSafe>
                          + +
                          69 // For now do not release any memory back to the deallocFunc until destruction.
                          +
                          70 // TODO(bbudge): Consider cases where we haven't gotten below some threshold of ready chunks
                          +
                          71 // in a while. In that case, we could begin tracking allocations, and try to assemble entire
                          +
                          72 // starting allocations, possibly deferring a small amount to each alloc call. This would be
                          +
                          73 // slower, but would ensure we don't get into a situation where we need a bunch of memory up
                          +
                          74 // front, and then never again.
                          75
                          -
                          76} // namespace dispenso
                          -
                          DISPENSO_DLL_ACCESS char * alloc()
                          -
                          DISPENSO_DLL_ACCESS ~PoolAllocator()
                          -
                          DISPENSO_DLL_ACCESS PoolAllocator(size_t chunkSize, size_t allocSize, std::function< void *(size_t)> allocFunc, std::function< void(void *)> deallocFunc)
                          -
                          DISPENSO_DLL_ACCESS void dealloc(char *ptr)
                          +
                          76 while (true) {
                          +
                          77 uint32_t allocId = 0;
                          +
                          78 if (kThreadSafe) {
                          +
                          79 allocId = backingAllocLock_.fetch_or(1, std::memory_order_acquire);
                          +
                          80 }
                          +
                          81 if (allocId == 0) {
                          +
                          82 chunks_.push_back(ptr);
                          +
                          83 if (kThreadSafe) {
                          +
                          84 backingAllocLock_.store(0, std::memory_order_release);
                          +
                          85 }
                          +
                          86 break;
                          +
                          87 }
                          +
                          88 }
                          +
                          89}
                          +
                          90
                          +
                          91template <bool kThreadSafe>
                          + +
                          93 chunks_.clear();
                          +
                          94 if (backingAllocs2_.size() < backingAllocs_.size()) {
                          +
                          95 std::swap(backingAllocs2_, backingAllocs_);
                          +
                          96 }
                          +
                          97 for (char* ba : backingAllocs_) {
                          +
                          98 backingAllocs2_.push_back(ba);
                          +
                          99 }
                          +
                          100 backingAllocs_.clear();
                          +
                          101}
                          +
                          102
                          +
                          103template <bool kThreadSafe>
                          + +
                          105 for (char* backing : backingAllocs_) {
                          +
                          106 deallocFunc_(backing);
                          +
                          107 }
                          +
                          108 for (char* backing : backingAllocs2_) {
                          +
                          109 deallocFunc_(backing);
                          +
                          110 }
                          +
                          111}
                          +
                          112
                          +
                          113template class PoolAllocatorT<false>;
                          +
                          114template class PoolAllocatorT<true>;
                          +
                          115
                          +
                          116} // namespace dispenso
                          + +
                          DISPENSO_DLL_ACCESS char * alloc()
                          +
                          DISPENSO_DLL_ACCESS void clear()
                          +
                          DISPENSO_DLL_ACCESS ~PoolAllocatorT()
                          +
                          DISPENSO_DLL_ACCESS PoolAllocatorT(size_t chunkSize, size_t allocSize, std::function< void *(size_t)> allocFunc, std::function< void(void *)> deallocFunc)
                          +
                          DISPENSO_DLL_ACCESS void dealloc(char *ptr)
                          diff --git a/pool__allocator_8h.html b/pool__allocator_8h.html index 4fbf0d9..4c5c600 100644 --- a/pool__allocator_8h.html +++ b/pool__allocator_8h.html @@ -97,7 +97,8 @@
                          pool_allocator.h File Reference
                          @@ -110,14 +111,54 @@ - + +

                          Classes

                          class  dispenso::PoolAllocator
                          class  dispenso::PoolAllocatorT< kThreadSafe >
                           
                          + + + + +

                          +Typedefs

                          using dispenso::PoolAllocator = PoolAllocatorT< true >
                           
                          using dispenso::NoLockPoolAllocator = PoolAllocatorT< false >
                           

                          Detailed Description

                          A pool allocator to help reduce calls to the underlying allocation and deallocation functions that can be provided custom backing allocation and deallocation functions, e.g. cudaMalloc, cudaFree.

                          Definition in file pool_allocator.h.

                          -
                          +

                          Typedef Documentation

                          + +

                          ◆ NoLockPoolAllocator

                          + +
                          +
                          + + + + +
                          using dispenso::NoLockPoolAllocator = typedef PoolAllocatorT<false>
                          +
                          + +

                          Definition at line 95 of file pool_allocator.h.

                          + +
                          +
                          + +

                          ◆ PoolAllocator

                          + +
                          +
                          + + + + +
                          using dispenso::PoolAllocator = typedef PoolAllocatorT<true>
                          +
                          + +

                          Definition at line 94 of file pool_allocator.h.

                          + +
                          +
                          + diff --git a/search/all_0.js b/search/all_0.js index 630a0a8..5815750 100644 --- a/search/all_0.js +++ b/search/all_0.js @@ -3,7 +3,7 @@ var searchData= ['acquire_0',['acquire',['../classdispenso_1_1_resource_pool.html#aa3dfd898745a3d729f6ab66311ffd443',1,'dispenso::ResourcePool']]], ['addnode_1',['addNode',['../classdispenso_1_1_subgraph_t.html#a3f314f17214ede38225e89be5cdd79ab',1,'dispenso::SubgraphT::addNode()'],['../classdispenso_1_1_graph_t.html#a13d24b1056de5324500d20702661fa7e',1,'dispenso::GraphT::addNode(T &&f)']]], ['addsubgraph_2',['addSubgraph',['../classdispenso_1_1_graph_t.html#adf47c5ba380b61e20df7ec680a1cca43',1,'dispenso::GraphT']]], - ['alloc_3',['alloc',['../classdispenso_1_1_pool_allocator.html#a38a9be5293b77653b1560cb8e74b5bd4',1,'dispenso::PoolAllocator']]], + ['alloc_3',['alloc',['../classdispenso_1_1_pool_allocator_t.html#a04ec8c4a58977f8ca6011431e1860036',1,'dispenso::PoolAllocatorT']]], ['allocsmallbuffer_4',['allocSmallBuffer',['../small__buffer__allocator_8h.html#ab83550597ed4347b3d89d15bb16cd49a',1,'dispenso']]], ['approxbytesallocatedsmallbuffer_5',['approxBytesAllocatedSmallBuffer',['../small__buffer__allocator_8h.html#ad883cfcdabda87d64afdab3d04f11a47',1,'dispenso']]], ['arrive_5fand_5fwait_6',['arrive_and_wait',['../classdispenso_1_1_latch.html#a20d9a291572a64adf4cb2c419f195292',1,'dispenso::Latch']]], diff --git a/search/all_10.js b/search/all_10.js index 5f0f2c9..adf8476 100644 --- a/search/all_10.js +++ b/search/all_10.js @@ -8,8 +8,9 @@ var searchData= ['threadpriority_5',['ThreadPriority',['../priority_8h.html#ad04637f316fbde5fba47d984c3700bb7',1,'dispenso']]], ['timedtask_6',['TimedTask',['../classdispenso_1_1_timed_task.html',1,'dispenso']]], ['timedtaskscheduler_7',['TimedTaskScheduler',['../classdispenso_1_1_timed_task_scheduler.html',1,'dispenso::TimedTaskScheduler'],['../classdispenso_1_1_timed_task_scheduler.html#afda120b230ff030f8f9af68c6f7899bc',1,'dispenso::TimedTaskScheduler::TimedTaskScheduler()']]], - ['try_5fwait_8',['try_wait',['../classdispenso_1_1_latch.html#abe26b747c7ddb5620585faad089b2d3f',1,'dispenso::Latch']]], - ['tryemplaceupdate_9',['tryEmplaceUpdate',['../classdispenso_1_1_async_request.html#a4fc2ef79cd8d2efd6cbab96b0ca8ef1d',1,'dispenso::AsyncRequest']]], - ['trywait_10',['tryWait',['../classdispenso_1_1_task_set.html#a17cf46f5790f1a818ac404167a796bd5',1,'dispenso::TaskSet::tryWait()'],['../classdispenso_1_1_concurrent_task_set.html#a5338ddfb4e5d98f769386b7b35b3f7ad',1,'dispenso::ConcurrentTaskSet::tryWait()']]], - ['tsan_5fannotations_2eh_11',['tsan_annotations.h',['../tsan__annotations_8h.html',1,'']]] + ['totalchunkcapacity_8',['totalChunkCapacity',['../classdispenso_1_1_pool_allocator_t.html#a811782e39e4b441b960bc35757af59c1',1,'dispenso::PoolAllocatorT']]], + ['try_5fwait_9',['try_wait',['../classdispenso_1_1_latch.html#abe26b747c7ddb5620585faad089b2d3f',1,'dispenso::Latch']]], + ['tryemplaceupdate_10',['tryEmplaceUpdate',['../classdispenso_1_1_async_request.html#a4fc2ef79cd8d2efd6cbab96b0ca8ef1d',1,'dispenso::AsyncRequest']]], + ['trywait_11',['tryWait',['../classdispenso_1_1_task_set.html#a17cf46f5790f1a818ac404167a796bd5',1,'dispenso::TaskSet::tryWait()'],['../classdispenso_1_1_concurrent_task_set.html#a5338ddfb4e5d98f769386b7b35b3f7ad',1,'dispenso::ConcurrentTaskSet::tryWait()']]], + ['tsan_5fannotations_2eh_12',['tsan_annotations.h',['../tsan__annotations_8h.html',1,'']]] ]; diff --git a/search/all_14.js b/search/all_14.js index 61303fd..4d90671 100644 --- a/search/all_14.js +++ b/search/all_14.js @@ -3,7 +3,7 @@ var searchData= ['_7econcurrenttaskset_0',['~ConcurrentTaskSet',['../classdispenso_1_1_concurrent_task_set.html#aaf3fa4c1b3da5fe5c542aa161dcf9478',1,'dispenso::ConcurrentTaskSet']]], ['_7econcurrentvector_1',['~ConcurrentVector',['../classdispenso_1_1_concurrent_vector.html#af180093482b0fdd9c89c1157cab07d5d',1,'dispenso::ConcurrentVector']]], ['_7efuture_2',['~Future',['../classdispenso_1_1_future.html#a14d27f2276dedd9e4e6d17b6fcfdb74f',1,'dispenso::Future']]], - ['_7epoolallocator_3',['~PoolAllocator',['../classdispenso_1_1_pool_allocator.html#a5c40ea70c1e81435ee7c9152fb9ce62a',1,'dispenso::PoolAllocator']]], + ['_7epoolallocatort_3',['~PoolAllocatorT',['../classdispenso_1_1_pool_allocator_t.html#a6f1cf4cfc584a9eef84a3e5e4e92ad60',1,'dispenso::PoolAllocatorT']]], ['_7eresourcepool_4',['~ResourcePool',['../classdispenso_1_1_resource_pool.html#a72c23146a6e1d6fdb38ec623f11106dd',1,'dispenso::ResourcePool']]], ['_7etaskset_5',['~TaskSet',['../classdispenso_1_1_task_set.html#a2fbdd27aa8ffcb216e51f45aad709f12',1,'dispenso::TaskSet']]], ['_7ethreadpool_6',['~ThreadPool',['../classdispenso_1_1_thread_pool.html#acd886dd712424330935b64959e8188af',1,'dispenso::ThreadPool']]], diff --git a/search/all_2.js b/search/all_2.js index d9ebf0c..d4263b7 100644 --- a/search/all_2.js +++ b/search/all_2.js @@ -8,13 +8,13 @@ var searchData= ['cbegin_5',['cbegin',['../classdispenso_1_1_concurrent_vector.html#a8157ca262ec71edddb03db8ad05f2b52',1,'dispenso::ConcurrentVector']]], ['cend_6',['cend',['../classdispenso_1_1_concurrent_vector.html#a699a704e271c79bf9a3d537b4a090607',1,'dispenso::ConcurrentVector']]], ['chunkedrange_7',['ChunkedRange',['../structdispenso_1_1_chunked_range.html#a488b20ac57d038c6088ba6289c05dd47',1,'dispenso::ChunkedRange::ChunkedRange(IntegerT s, IntegerT e, Auto)'],['../structdispenso_1_1_chunked_range.html#a8a59cc087d0646ce617c04259db26149',1,'dispenso::ChunkedRange::ChunkedRange(IntegerT s, IntegerT e, Static)'],['../structdispenso_1_1_chunked_range.html#a644b2269aed883922db39c928a009b16',1,'dispenso::ChunkedRange::ChunkedRange(IntegerT s, IntegerT e, IntegerT c)'],['../structdispenso_1_1_chunked_range.html',1,'dispenso::ChunkedRange< IntegerT >']]], - ['clear_8',['clear',['../classdispenso_1_1_graph_t.html#a23d36763edcc0162257ee176355ee1da',1,'dispenso::GraphT::clear()'],['../classdispenso_1_1_concurrent_vector.html#ae3f8595a52183e3a145cf8f4213250b1',1,'dispenso::ConcurrentVector::clear()'],['../classdispenso_1_1_subgraph_t.html#a2e39c55d6e04462971f93f349c5be3fe',1,'dispenso::SubgraphT::clear()']]], + ['clear_8',['clear',['../classdispenso_1_1_pool_allocator_t.html#a67dc4676c39f7226c23ac48ea1a58ad1',1,'dispenso::PoolAllocatorT::clear()'],['../classdispenso_1_1_concurrent_vector.html#ae3f8595a52183e3a145cf8f4213250b1',1,'dispenso::ConcurrentVector::clear()'],['../classdispenso_1_1_subgraph_t.html#a2e39c55d6e04462971f93f349c5be3fe',1,'dispenso::SubgraphT::clear()'],['../classdispenso_1_1_graph_t.html#a23d36763edcc0162257ee176355ee1da',1,'dispenso::GraphT::clear()']]], ['completed_9',['completed',['../classdispenso_1_1_completion_event.html#aadf4486fc37923878b4d732f0a7f47f4',1,'dispenso::CompletionEvent']]], ['completion_5fevent_2eh_10',['completion_event.h',['../completion__event_8h.html',1,'']]], ['completionevent_11',['CompletionEvent',['../classdispenso_1_1_completion_event.html',1,'dispenso']]], ['concurrent_5fobject_5farena_2eh_12',['concurrent_object_arena.h',['../concurrent__object__arena_8h.html',1,'']]], ['concurrent_5fvector_2eh_13',['concurrent_vector.h',['../concurrent__vector_8h.html',1,'']]], - ['concurrentobjectarena_14',['ConcurrentObjectArena',['../structdispenso_1_1_concurrent_object_arena.html#a97beaf8f43ab51528598d980d520bb24',1,'dispenso::ConcurrentObjectArena::ConcurrentObjectArena(const ConcurrentObjectArena< T, Index, alignment > &other)'],['../structdispenso_1_1_concurrent_object_arena.html#a727fe346168e1672195109502e9c60dc',1,'dispenso::ConcurrentObjectArena::ConcurrentObjectArena(ConcurrentObjectArena< T, Index, alignment > &&other) noexcept'],['../structdispenso_1_1_concurrent_object_arena.html#ac2e855dc6e3e325e4b9dff88de2ad597',1,'dispenso::ConcurrentObjectArena::ConcurrentObjectArena(const Index minBuffSize)'],['../structdispenso_1_1_concurrent_object_arena.html',1,'dispenso::ConcurrentObjectArena< T, Index, alignment >']]], + ['concurrentobjectarena_14',['ConcurrentObjectArena',['../structdispenso_1_1_concurrent_object_arena.html#ac2e855dc6e3e325e4b9dff88de2ad597',1,'dispenso::ConcurrentObjectArena::ConcurrentObjectArena(const Index minBuffSize)'],['../structdispenso_1_1_concurrent_object_arena.html#a727fe346168e1672195109502e9c60dc',1,'dispenso::ConcurrentObjectArena::ConcurrentObjectArena(ConcurrentObjectArena< T, Index, alignment > &&other) noexcept'],['../structdispenso_1_1_concurrent_object_arena.html#a97beaf8f43ab51528598d980d520bb24',1,'dispenso::ConcurrentObjectArena::ConcurrentObjectArena(const ConcurrentObjectArena< T, Index, alignment > &other)'],['../structdispenso_1_1_concurrent_object_arena.html',1,'dispenso::ConcurrentObjectArena< T, Index, alignment >']]], ['concurrenttaskset_15',['ConcurrentTaskSet',['../classdispenso_1_1_concurrent_task_set.html#a5e48f4df33cd5cf87b3973ffb9153f16',1,'dispenso::ConcurrentTaskSet::ConcurrentTaskSet()'],['../classdispenso_1_1_concurrent_task_set.html',1,'dispenso::ConcurrentTaskSet']]], ['concurrenttasksetexecutor_16',['ConcurrentTaskSetExecutor',['../classdispenso_1_1_concurrent_task_set_executor.html',1,'dispenso']]], ['concurrentvector_17',['ConcurrentVector',['../classdispenso_1_1_concurrent_vector.html#a520f78b3837308ae0bf5042bc02db374',1,'dispenso::ConcurrentVector::ConcurrentVector(size_t startSize)'],['../classdispenso_1_1_concurrent_vector.html#af0f4f336438d230d23cc088c2e650b3a',1,'dispenso::ConcurrentVector::ConcurrentVector(ConcurrentVector &&other)'],['../classdispenso_1_1_concurrent_vector.html#a54dc4ebacd3d78bb0f3d6aa59d60efcf',1,'dispenso::ConcurrentVector::ConcurrentVector(const ConcurrentVector &other)'],['../classdispenso_1_1_concurrent_vector.html#a9c2fcc7dc242363af82ec208c23be729',1,'dispenso::ConcurrentVector::ConcurrentVector(std::initializer_list< T > l)'],['../classdispenso_1_1_concurrent_vector.html#a969ceec28f12a4454fa08578ad8679d1',1,'dispenso::ConcurrentVector::ConcurrentVector(size_type startSize, InIterator start, InIterator end)'],['../classdispenso_1_1_concurrent_vector.html#ad7d74051f6a7341625a2749da507da7b',1,'dispenso::ConcurrentVector::ConcurrentVector(InIterator start, InIterator end)'],['../classdispenso_1_1_concurrent_vector.html#a205540e4da8eba5f90a311154df24d47',1,'dispenso::ConcurrentVector::ConcurrentVector(size_t startSize, const T &defaultValue)'],['../classdispenso_1_1_concurrent_vector.html#ae4d0bc2c37e42d74abbd221ba7d6ca3b',1,'dispenso::ConcurrentVector::ConcurrentVector(size_t startCapacity, ReserveTagS)'],['../classdispenso_1_1_concurrent_vector.html#a479d98beb884647f48dcd11226b9db80',1,'dispenso::ConcurrentVector::ConcurrentVector()'],['../classdispenso_1_1_concurrent_vector.html',1,'dispenso::ConcurrentVector< T, Traits, SizeTraits >']]], diff --git a/search/all_3.js b/search/all_3.js index 7600158..4ecf81a 100644 --- a/search/all_3.js +++ b/search/all_3.js @@ -1,6 +1,6 @@ var searchData= [ - ['dealloc_0',['dealloc',['../classdispenso_1_1_pool_allocator.html#ae7121e9dcebfeb09a6a045d04455a582',1,'dispenso::PoolAllocator']]], + ['dealloc_0',['dealloc',['../classdispenso_1_1_pool_allocator_t.html#add24c6cf8e3ea586940a18acf7959a4d',1,'dispenso::PoolAllocatorT']]], ['deallocsmallbuffer_1',['deallocSmallBuffer',['../small__buffer__allocator_8h.html#a1ba6120f1467502c75d6e8bd3d8131ec',1,'dispenso']]], ['default_5fcapacity_2',['default_capacity',['../classdispenso_1_1_concurrent_vector.html#a8ce7e4f78d13c0660b9de99ac96a11df',1,'dispenso::ConcurrentVector']]], ['defaultchunking_3',['defaultChunking',['../structdispenso_1_1_par_for_options.html#a2cfd7b948697c97874c727940529d1d8',1,'dispenso::ParForOptions']]], diff --git a/search/all_d.js b/search/all_d.js index 471f526..35a381d 100644 --- a/search/all_d.js +++ b/search/all_d.js @@ -8,7 +8,7 @@ var searchData= ['pipeline_5',['pipeline',['../pipeline_8h.html#a5438114dce2544c8cdab8100309478ab',1,'dispenso::pipeline(ThreadPool &pool, Stages &&... sIn)'],['../pipeline_8h.html#a9a0289cbbb678c03532bdf458da1401b',1,'dispenso::pipeline(Stages &&... sIn)']]], ['pipeline_2eh_6',['pipeline.h',['../pipeline_8h.html',1,'']]], ['pool_5fallocator_2eh_7',['pool_allocator.h',['../pool__allocator_8h.html',1,'']]], - ['poolallocator_8',['PoolAllocator',['../classdispenso_1_1_pool_allocator.html',1,'dispenso::PoolAllocator'],['../classdispenso_1_1_pool_allocator.html#a7a393687ca662206fea08d6d261cdd20',1,'dispenso::PoolAllocator::PoolAllocator()']]], + ['poolallocatort_8',['PoolAllocatorT',['../classdispenso_1_1_pool_allocator_t.html',1,'dispenso::PoolAllocatorT< kThreadSafe >'],['../classdispenso_1_1_pool_allocator_t.html#a82adb70b33422125a6f3de59a0b63d11',1,'dispenso::PoolAllocatorT::PoolAllocatorT()']]], ['pop_5fback_9',['pop_back',['../classdispenso_1_1_concurrent_vector.html#a6df17279a0127ce60af3abb56121678b',1,'dispenso::ConcurrentVector']]], ['priority_2eh_10',['priority.h',['../priority_8h.html',1,'']]], ['push_5fback_11',['push_back',['../classdispenso_1_1_concurrent_vector.html#a1306ac315f6e7062a6b1ee39e2978b22',1,'dispenso::ConcurrentVector::push_back(T &&val)'],['../classdispenso_1_1_concurrent_vector.html#a0cc5821267defcaf8eaec2bb77ae19ff',1,'dispenso::ConcurrentVector::push_back(const T &val)']]] diff --git a/search/classes_a.js b/search/classes_a.js index 2e9d522..a11c937 100644 --- a/search/classes_a.js +++ b/search/classes_a.js @@ -2,5 +2,5 @@ var searchData= [ ['parallelforexecutor_0',['ParallelForExecutor',['../classdispenso_1_1_parallel_for_executor.html',1,'dispenso']]], ['parforoptions_1',['ParForOptions',['../structdispenso_1_1_par_for_options.html',1,'dispenso']]], - ['poolallocator_2',['PoolAllocator',['../classdispenso_1_1_pool_allocator.html',1,'dispenso']]] + ['poolallocatort_2',['PoolAllocatorT',['../classdispenso_1_1_pool_allocator_t.html',1,'dispenso']]] ]; diff --git a/search/functions_0.js b/search/functions_0.js index 463623d..96d2295 100644 --- a/search/functions_0.js +++ b/search/functions_0.js @@ -3,7 +3,7 @@ var searchData= ['acquire_0',['acquire',['../classdispenso_1_1_resource_pool.html#aa3dfd898745a3d729f6ab66311ffd443',1,'dispenso::ResourcePool']]], ['addnode_1',['addNode',['../classdispenso_1_1_subgraph_t.html#a3f314f17214ede38225e89be5cdd79ab',1,'dispenso::SubgraphT::addNode()'],['../classdispenso_1_1_graph_t.html#a13d24b1056de5324500d20702661fa7e',1,'dispenso::GraphT::addNode(T &&f)']]], ['addsubgraph_2',['addSubgraph',['../classdispenso_1_1_graph_t.html#adf47c5ba380b61e20df7ec680a1cca43',1,'dispenso::GraphT']]], - ['alloc_3',['alloc',['../classdispenso_1_1_pool_allocator.html#a38a9be5293b77653b1560cb8e74b5bd4',1,'dispenso::PoolAllocator']]], + ['alloc_3',['alloc',['../classdispenso_1_1_pool_allocator_t.html#a04ec8c4a58977f8ca6011431e1860036',1,'dispenso::PoolAllocatorT']]], ['allocsmallbuffer_4',['allocSmallBuffer',['../small__buffer__allocator_8h.html#ab83550597ed4347b3d89d15bb16cd49a',1,'dispenso']]], ['approxbytesallocatedsmallbuffer_5',['approxBytesAllocatedSmallBuffer',['../small__buffer__allocator_8h.html#ad883cfcdabda87d64afdab3d04f11a47',1,'dispenso']]], ['arrive_5fand_5fwait_6',['arrive_and_wait',['../classdispenso_1_1_latch.html#a20d9a291572a64adf4cb2c419f195292',1,'dispenso::Latch']]], diff --git a/search/functions_13.js b/search/functions_13.js index 61303fd..4d90671 100644 --- a/search/functions_13.js +++ b/search/functions_13.js @@ -3,7 +3,7 @@ var searchData= ['_7econcurrenttaskset_0',['~ConcurrentTaskSet',['../classdispenso_1_1_concurrent_task_set.html#aaf3fa4c1b3da5fe5c542aa161dcf9478',1,'dispenso::ConcurrentTaskSet']]], ['_7econcurrentvector_1',['~ConcurrentVector',['../classdispenso_1_1_concurrent_vector.html#af180093482b0fdd9c89c1157cab07d5d',1,'dispenso::ConcurrentVector']]], ['_7efuture_2',['~Future',['../classdispenso_1_1_future.html#a14d27f2276dedd9e4e6d17b6fcfdb74f',1,'dispenso::Future']]], - ['_7epoolallocator_3',['~PoolAllocator',['../classdispenso_1_1_pool_allocator.html#a5c40ea70c1e81435ee7c9152fb9ce62a',1,'dispenso::PoolAllocator']]], + ['_7epoolallocatort_3',['~PoolAllocatorT',['../classdispenso_1_1_pool_allocator_t.html#a6f1cf4cfc584a9eef84a3e5e4e92ad60',1,'dispenso::PoolAllocatorT']]], ['_7eresourcepool_4',['~ResourcePool',['../classdispenso_1_1_resource_pool.html#a72c23146a6e1d6fdb38ec623f11106dd',1,'dispenso::ResourcePool']]], ['_7etaskset_5',['~TaskSet',['../classdispenso_1_1_task_set.html#a2fbdd27aa8ffcb216e51f45aad709f12',1,'dispenso::TaskSet']]], ['_7ethreadpool_6',['~ThreadPool',['../classdispenso_1_1_thread_pool.html#acd886dd712424330935b64959e8188af',1,'dispenso::ThreadPool']]], diff --git a/search/functions_2.js b/search/functions_2.js index 1f0940b..de20b04 100644 --- a/search/functions_2.js +++ b/search/functions_2.js @@ -7,10 +7,10 @@ var searchData= ['cbegin_4',['cbegin',['../classdispenso_1_1_concurrent_vector.html#a8157ca262ec71edddb03db8ad05f2b52',1,'dispenso::ConcurrentVector']]], ['cend_5',['cend',['../classdispenso_1_1_concurrent_vector.html#a699a704e271c79bf9a3d537b4a090607',1,'dispenso::ConcurrentVector']]], ['chunkedrange_6',['ChunkedRange',['../structdispenso_1_1_chunked_range.html#a644b2269aed883922db39c928a009b16',1,'dispenso::ChunkedRange::ChunkedRange(IntegerT s, IntegerT e, IntegerT c)'],['../structdispenso_1_1_chunked_range.html#a8a59cc087d0646ce617c04259db26149',1,'dispenso::ChunkedRange::ChunkedRange(IntegerT s, IntegerT e, Static)'],['../structdispenso_1_1_chunked_range.html#a488b20ac57d038c6088ba6289c05dd47',1,'dispenso::ChunkedRange::ChunkedRange(IntegerT s, IntegerT e, Auto)']]], - ['clear_7',['clear',['../classdispenso_1_1_concurrent_vector.html#ae3f8595a52183e3a145cf8f4213250b1',1,'dispenso::ConcurrentVector::clear()'],['../classdispenso_1_1_subgraph_t.html#a2e39c55d6e04462971f93f349c5be3fe',1,'dispenso::SubgraphT::clear()'],['../classdispenso_1_1_graph_t.html#a23d36763edcc0162257ee176355ee1da',1,'dispenso::GraphT::clear()']]], + ['clear_7',['clear',['../classdispenso_1_1_pool_allocator_t.html#a67dc4676c39f7226c23ac48ea1a58ad1',1,'dispenso::PoolAllocatorT::clear()'],['../classdispenso_1_1_graph_t.html#a23d36763edcc0162257ee176355ee1da',1,'dispenso::GraphT::clear()'],['../classdispenso_1_1_concurrent_vector.html#ae3f8595a52183e3a145cf8f4213250b1',1,'dispenso::ConcurrentVector::clear()'],['../classdispenso_1_1_subgraph_t.html#a2e39c55d6e04462971f93f349c5be3fe',1,'dispenso::SubgraphT::clear()']]], ['completed_8',['completed',['../classdispenso_1_1_completion_event.html#aadf4486fc37923878b4d732f0a7f47f4',1,'dispenso::CompletionEvent']]], ['concurrentobjectarena_9',['ConcurrentObjectArena',['../structdispenso_1_1_concurrent_object_arena.html#ac2e855dc6e3e325e4b9dff88de2ad597',1,'dispenso::ConcurrentObjectArena::ConcurrentObjectArena(const Index minBuffSize)'],['../structdispenso_1_1_concurrent_object_arena.html#a97beaf8f43ab51528598d980d520bb24',1,'dispenso::ConcurrentObjectArena::ConcurrentObjectArena(const ConcurrentObjectArena< T, Index, alignment > &other)'],['../structdispenso_1_1_concurrent_object_arena.html#a727fe346168e1672195109502e9c60dc',1,'dispenso::ConcurrentObjectArena::ConcurrentObjectArena(ConcurrentObjectArena< T, Index, alignment > &&other) noexcept']]], ['concurrenttaskset_10',['ConcurrentTaskSet',['../classdispenso_1_1_concurrent_task_set.html#a5e48f4df33cd5cf87b3973ffb9153f16',1,'dispenso::ConcurrentTaskSet']]], - ['concurrentvector_11',['ConcurrentVector',['../classdispenso_1_1_concurrent_vector.html#a479d98beb884647f48dcd11226b9db80',1,'dispenso::ConcurrentVector::ConcurrentVector()'],['../classdispenso_1_1_concurrent_vector.html#ae4d0bc2c37e42d74abbd221ba7d6ca3b',1,'dispenso::ConcurrentVector::ConcurrentVector(size_t startCapacity, ReserveTagS)'],['../classdispenso_1_1_concurrent_vector.html#a520f78b3837308ae0bf5042bc02db374',1,'dispenso::ConcurrentVector::ConcurrentVector(size_t startSize)'],['../classdispenso_1_1_concurrent_vector.html#a205540e4da8eba5f90a311154df24d47',1,'dispenso::ConcurrentVector::ConcurrentVector(size_t startSize, const T &defaultValue)'],['../classdispenso_1_1_concurrent_vector.html#ad7d74051f6a7341625a2749da507da7b',1,'dispenso::ConcurrentVector::ConcurrentVector(InIterator start, InIterator end)'],['../classdispenso_1_1_concurrent_vector.html#a969ceec28f12a4454fa08578ad8679d1',1,'dispenso::ConcurrentVector::ConcurrentVector(size_type startSize, InIterator start, InIterator end)'],['../classdispenso_1_1_concurrent_vector.html#a9c2fcc7dc242363af82ec208c23be729',1,'dispenso::ConcurrentVector::ConcurrentVector(std::initializer_list< T > l)'],['../classdispenso_1_1_concurrent_vector.html#a54dc4ebacd3d78bb0f3d6aa59d60efcf',1,'dispenso::ConcurrentVector::ConcurrentVector(const ConcurrentVector &other)'],['../classdispenso_1_1_concurrent_vector.html#af0f4f336438d230d23cc088c2e650b3a',1,'dispenso::ConcurrentVector::ConcurrentVector(ConcurrentVector &&other)']]], + ['concurrentvector_11',['ConcurrentVector',['../classdispenso_1_1_concurrent_vector.html#ae4d0bc2c37e42d74abbd221ba7d6ca3b',1,'dispenso::ConcurrentVector::ConcurrentVector(size_t startCapacity, ReserveTagS)'],['../classdispenso_1_1_concurrent_vector.html#af0f4f336438d230d23cc088c2e650b3a',1,'dispenso::ConcurrentVector::ConcurrentVector(ConcurrentVector &&other)'],['../classdispenso_1_1_concurrent_vector.html#a54dc4ebacd3d78bb0f3d6aa59d60efcf',1,'dispenso::ConcurrentVector::ConcurrentVector(const ConcurrentVector &other)'],['../classdispenso_1_1_concurrent_vector.html#a9c2fcc7dc242363af82ec208c23be729',1,'dispenso::ConcurrentVector::ConcurrentVector(std::initializer_list< T > l)'],['../classdispenso_1_1_concurrent_vector.html#a969ceec28f12a4454fa08578ad8679d1',1,'dispenso::ConcurrentVector::ConcurrentVector(size_type startSize, InIterator start, InIterator end)'],['../classdispenso_1_1_concurrent_vector.html#ad7d74051f6a7341625a2749da507da7b',1,'dispenso::ConcurrentVector::ConcurrentVector(InIterator start, InIterator end)'],['../classdispenso_1_1_concurrent_vector.html#a205540e4da8eba5f90a311154df24d47',1,'dispenso::ConcurrentVector::ConcurrentVector(size_t startSize, const T &defaultValue)'],['../classdispenso_1_1_concurrent_vector.html#a520f78b3837308ae0bf5042bc02db374',1,'dispenso::ConcurrentVector::ConcurrentVector(size_t startSize)'],['../classdispenso_1_1_concurrent_vector.html#a479d98beb884647f48dcd11226b9db80',1,'dispenso::ConcurrentVector::ConcurrentVector()']]], ['count_5fdown_12',['count_down',['../classdispenso_1_1_latch.html#a32b1cd1f97ba95656204c9ba90de41fb',1,'dispenso::Latch']]] ]; diff --git a/search/functions_3.js b/search/functions_3.js index 5460982..1ecf833 100644 --- a/search/functions_3.js +++ b/search/functions_3.js @@ -1,6 +1,6 @@ var searchData= [ - ['dealloc_0',['dealloc',['../classdispenso_1_1_pool_allocator.html#ae7121e9dcebfeb09a6a045d04455a582',1,'dispenso::PoolAllocator']]], + ['dealloc_0',['dealloc',['../classdispenso_1_1_pool_allocator_t.html#add24c6cf8e3ea586940a18acf7959a4d',1,'dispenso::PoolAllocatorT']]], ['deallocsmallbuffer_1',['deallocSmallBuffer',['../small__buffer__allocator_8h.html#a1ba6120f1467502c75d6e8bd3d8131ec',1,'dispenso']]], ['default_5fcapacity_2',['default_capacity',['../classdispenso_1_1_concurrent_vector.html#a8ce7e4f78d13c0660b9de99ac96a11df',1,'dispenso::ConcurrentVector']]], ['dependson_3',['dependsOn',['../classdispenso_1_1_node.html#abfb52f4bd018eee8791499a9bd160c8a',1,'dispenso::Node']]], diff --git a/search/functions_c.js b/search/functions_c.js index dff578a..85f3b0c 100644 --- a/search/functions_c.js +++ b/search/functions_c.js @@ -2,7 +2,7 @@ var searchData= [ ['parallel_5ffor_0',['parallel_for',['../parallel__for_8h.html#a8201f4fc565c557f5cbaf6b4403991b1',1,'dispenso::parallel_for(TaskSetT &taskSet, StateContainer &states, const StateGen &defaultState, const ChunkedRange< IntegerT > &range, F &&f, ParForOptions options={})'],['../parallel__for_8h.html#acc7052102a8bc76b02f21b6c82264c18',1,'dispenso::parallel_for(TaskSetT &taskSet, const ChunkedRange< IntegerT > &range, F &&f, ParForOptions options={})'],['../parallel__for_8h.html#a7d469e66515688d74cc2ebcf9ff0cc54',1,'dispenso::parallel_for(const ChunkedRange< IntegerT > &range, F &&f, ParForOptions options={})'],['../parallel__for_8h.html#acd1434f629d379d54363d93c6970440a',1,'dispenso::parallel_for(StateContainer &states, const StateGen &defaultState, const ChunkedRange< IntegerT > &range, F &&f, ParForOptions options={})'],['../parallel__for_8h.html#a4c7907a22bed40a3cdb0890936e6e402',1,'dispenso::parallel_for(TaskSetT &taskSet, IntegerA start, IntegerB end, F &&f, ParForOptions options={})'],['../parallel__for_8h.html#a4b3adc98a791e37ef19708242b30d047',1,'dispenso::parallel_for(IntegerA start, IntegerB end, F &&f, ParForOptions options={})'],['../parallel__for_8h.html#ac28cb63caa4dc43f836ea3c4d03e9255',1,'dispenso::parallel_for(TaskSetT &taskSet, StateContainer &states, const StateGen &defaultState, IntegerA start, IntegerB end, F &&f, ParForOptions options={})'],['../parallel__for_8h.html#ac0f644b9ba92c8c5c0d86101bf5007fc',1,'dispenso::parallel_for(StateContainer &states, const StateGen &defaultState, IntegerA start, IntegerB end, F &&f, ParForOptions options={})']]], ['pipeline_1',['pipeline',['../pipeline_8h.html#a5438114dce2544c8cdab8100309478ab',1,'dispenso::pipeline(ThreadPool &pool, Stages &&... sIn)'],['../pipeline_8h.html#a9a0289cbbb678c03532bdf458da1401b',1,'dispenso::pipeline(Stages &&... sIn)']]], - ['poolallocator_2',['PoolAllocator',['../classdispenso_1_1_pool_allocator.html#a7a393687ca662206fea08d6d261cdd20',1,'dispenso::PoolAllocator']]], + ['poolallocatort_2',['PoolAllocatorT',['../classdispenso_1_1_pool_allocator_t.html#a82adb70b33422125a6f3de59a0b63d11',1,'dispenso::PoolAllocatorT']]], ['pop_5fback_3',['pop_back',['../classdispenso_1_1_concurrent_vector.html#a6df17279a0127ce60af3abb56121678b',1,'dispenso::ConcurrentVector']]], ['push_5fback_4',['push_back',['../classdispenso_1_1_concurrent_vector.html#a0cc5821267defcaf8eaec2bb77ae19ff',1,'dispenso::ConcurrentVector::push_back(const T &val)'],['../classdispenso_1_1_concurrent_vector.html#a1306ac315f6e7062a6b1ee39e2978b22',1,'dispenso::ConcurrentVector::push_back(T &&val)']]] ]; diff --git a/search/functions_f.js b/search/functions_f.js index ec10dac..6ff6375 100644 --- a/search/functions_f.js +++ b/search/functions_f.js @@ -4,7 +4,8 @@ var searchData= ['then_1',['then',['../classdispenso_1_1_future.html#aac1d6623d69295fc0a2d72fac46aebaf',1,'dispenso::Future']]], ['threadpool_2',['ThreadPool',['../classdispenso_1_1_thread_pool.html#a2442016e8a4924ca665d3993c1879b4d',1,'dispenso::ThreadPool']]], ['timedtaskscheduler_3',['TimedTaskScheduler',['../classdispenso_1_1_timed_task_scheduler.html#afda120b230ff030f8f9af68c6f7899bc',1,'dispenso::TimedTaskScheduler']]], - ['try_5fwait_4',['try_wait',['../classdispenso_1_1_latch.html#abe26b747c7ddb5620585faad089b2d3f',1,'dispenso::Latch']]], - ['tryemplaceupdate_5',['tryEmplaceUpdate',['../classdispenso_1_1_async_request.html#a4fc2ef79cd8d2efd6cbab96b0ca8ef1d',1,'dispenso::AsyncRequest']]], - ['trywait_6',['tryWait',['../classdispenso_1_1_task_set.html#a17cf46f5790f1a818ac404167a796bd5',1,'dispenso::TaskSet::tryWait()'],['../classdispenso_1_1_concurrent_task_set.html#a5338ddfb4e5d98f769386b7b35b3f7ad',1,'dispenso::ConcurrentTaskSet::tryWait()']]] + ['totalchunkcapacity_4',['totalChunkCapacity',['../classdispenso_1_1_pool_allocator_t.html#a811782e39e4b441b960bc35757af59c1',1,'dispenso::PoolAllocatorT']]], + ['try_5fwait_5',['try_wait',['../classdispenso_1_1_latch.html#abe26b747c7ddb5620585faad089b2d3f',1,'dispenso::Latch']]], + ['tryemplaceupdate_6',['tryEmplaceUpdate',['../classdispenso_1_1_async_request.html#a4fc2ef79cd8d2efd6cbab96b0ca8ef1d',1,'dispenso::AsyncRequest']]], + ['trywait_7',['tryWait',['../classdispenso_1_1_task_set.html#a17cf46f5790f1a818ac404167a796bd5',1,'dispenso::TaskSet::tryWait()'],['../classdispenso_1_1_concurrent_task_set.html#a5338ddfb4e5d98f769386b7b35b3f7ad',1,'dispenso::ConcurrentTaskSet::tryWait()']]] ];