Classes | |
class | atomic |
class | BlockedRange |
class | BoolAcquire |
class | NonConcurrentThread |
class | RangeBody |
class | recursive_mutex |
class | scalable_allocator |
class | spin_mutex |
class | split |
class | task_scheduler_init |
Typedefs | |
typedef NonConcurrentThread | Thread |
typedef tbb::task_scheduler_init | task_scheduler_init |
typedef tbb::split | split |
typedef tbb::spin_mutex | spin_mutex |
typedef tbb::recursive_mutex | recursive_mutex |
Functions | |
template<typename Range , typename Body > | |
void | parallel_for (const Range &range, const Body &body) |
template<typename Range , typename Body , typename Partitioner > | |
void | parallel_for (const Range &range, const Body &body, const Partitioner &) |
template<typename Range , typename Body > | |
void | parallel_reduce (const Range &range, Body &body) |
template<typename Range , typename Body , typename Partitioner > | |
void | parallel_reduce (const Range &range, Body &body, const Partitioner &) |
template<typename Range > | |
unsigned int | num_pthreads (Range &range) |
template<typename Range , typename Body > | |
void * | run_body (void *args) |
Variables | |
bool | in_threads = false |
spin_mutex | spin_mtx |
recursive_mutex | recursive_mtx |
The Threads namespace is for wrapper functions for common general multithreading algorithms and tasks.
typedef tbb::recursive_mutex libMesh::Threads::recursive_mutex |
Recursive mutex. Implements mutual exclusion by busy-waiting in user space for the lock to be acquired. The same thread can acquire the same lock multiple times
Definition at line 216 of file threads_tbb.h.
typedef tbb::spin_mutex libMesh::Threads::spin_mutex |
Spin mutex. Implements mutual exclusion by busy-waiting in user space for the lock to be acquired.
Definition at line 209 of file threads_tbb.h.
typedef tbb::split libMesh::Threads::split |
Dummy "splitting object" used to distinguish splitting constructors from copy constructors.
Definition at line 79 of file threads_tbb.h.
typedef tbb::task_scheduler_init libMesh::Threads::task_scheduler_init |
Scheduler to manage threads.
Definition at line 73 of file threads_tbb.h.
typedef tbb::tbb_thread libMesh::Threads::Thread |
Use the non-concurrent placeholder.
Use std::thread when available.
Thread object abstraction that provides a basic constructor and support for join().
Definition at line 43 of file threads_none.h.
unsigned int libMesh::Threads::num_pthreads | ( | Range & | range | ) |
|
inline |
Execute the provided function object in parallel on the specified range.
Definition at line 73 of file threads_none.h.
References in_threads.
Referenced by libMesh::FEMSystem::assemble_qoi_derivative(), libMesh::FEMSystem::assembly(), libMesh::MeshCommunication::assign_global_indices(), libMesh::System::boundary_project_vector(), libMesh::MeshCommunication::check_for_duplicate_global_indices(), libMesh::DofMap::create_dof_constraints(), libMesh::WeightedPatchRecoveryErrorEstimator::estimate_error(), libMesh::PatchRecoveryErrorEstimator::estimate_error(), libMesh::FEMSystem::postprocess(), libMesh::System::project_vector(), and libMesh::System::projection_matrix().
|
inline |
Execute the provided function object in parallel on the specified range with the specified partitioner.
Definition at line 87 of file threads_none.h.
References in_threads.
|
inline |
Execute the provided reduction operation in parallel on the specified range.
Definition at line 101 of file threads_none.h.
References in_threads.
Referenced by libMesh::FEMSystem::assemble_qoi(), libMesh::DofMap::build_sparsity(), libMesh::MeshTools::create_bounding_box(), libMesh::MeshTools::create_local_bounding_box(), libMesh::MeshTools::create_nodal_bounding_box(), libMesh::MeshTools::create_processor_bounding_box(), libMesh::MeshTools::create_subdomain_bounding_box(), libMesh::MeshTools::total_weight(), and libMesh::MeshTools::weight().
|
inline |
Execute the provided reduction operation in parallel on the specified range with the specified partitioner.
Definition at line 115 of file threads_none.h.
References in_threads.
void* libMesh::Threads::run_body | ( | void * | args | ) |
Definition at line 229 of file threads_pthread.h.
References libMesh::Threads::RangeBody< Range, Body >::body, and libMesh::Threads::RangeBody< Range, Body >::range.
bool libMesh::Threads::in_threads = false |
A boolean which is true iff we are in a Threads:: function It may be useful to assert(!Threadsin_threads) in any code which is known to not be thread-safe.
Definition at line 31 of file threads.C.
Referenced by parallel_for(), parallel_reduce(), libMesh::MeshBase::point_locator(), and libMesh::MeshBase::sub_point_locator().
Threads::recursive_mutex libMesh::Threads::recursive_mtx |
Threads::spin_mutex libMesh::Threads::spin_mtx |
A convenient spin mutex object which can be used for obtaining locks.
Definition at line 29 of file threads.C.
Referenced by libMesh::FEAbstract::compute_node_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::ReferenceCounter::increment_constructor_count(), libMesh::ReferenceCounter::increment_destructor_count(), libMesh::VectorSetAction< Val >::insert(), libMesh::MatrixFillAction< ValIn, ValOut >::insert(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), and libMesh::BoundaryProjectSolution::operator()().