![]() |
deal.II version 9.7.0
|
#include <deal.II/base/parallel.h>
Definition at line 735 of file parallel.h.
Public Member Functions | |
| TBBPartitioner () | |
| ~TBBPartitioner () | |
| std::shared_ptr< tbb::affinity_partitioner > | acquire_one_partitioner () |
| void | release_one_partitioner (const std::shared_ptr< tbb::affinity_partitioner > &p) |
Private Attributes | |
| std::shared_ptr< tbb::affinity_partitioner > | my_partitioner |
| bool | in_use |
| Threads::Mutex | mutex |
| parallel::internal::TBBPartitioner::TBBPartitioner | ( | ) |
Constructor.
Definition at line 73 of file parallel.cc.
| parallel::internal::TBBPartitioner::~TBBPartitioner | ( | ) |
Destructor. Check that the object is not in use any more, i.e., all loops have been completed.
Definition at line 80 of file parallel.cc.
| std::shared_ptr< tbb::affinity_partitioner > parallel::internal::TBBPartitioner::acquire_one_partitioner | ( | ) |
Return an affinity partitioner. In case the partitioner owned by the class is free, it is returned here. In case another thread has not released it yet, a new object is created. To free the partitioner again, return it by the release_one_partitioner() call.
Definition at line 91 of file parallel.cc.
| void parallel::internal::TBBPartitioner::release_one_partitioner | ( | const std::shared_ptr< tbb::affinity_partitioner > & | p | ) |
After using the partitioner in a tbb loop through acquire_one_partitioner(), this call makes the partitioner available again.
Definition at line 104 of file parallel.cc.
|
private |
The stored partitioner that can accumulate knowledge over several runs of tbb::parallel_for
Definition at line 773 of file parallel.h.
|
private |
A flag to indicate whether the partitioner has been acquired but not released yet, i.e., it is in use somewhere else.
Definition at line 779 of file parallel.h.
|
private |
A mutex to guard the access to the in_use flag.
Definition at line 784 of file parallel.h.