libMesh::Threads Namespace Reference
Classes | |
| class | BoolAcquire |
| class | Thread |
| class | atomic |
| class | task_scheduler_init |
| class | split |
| class | spin_mutex |
| class | recursive_mutex |
| class | BlockedRange |
| class | scalable_allocator |
Typedefs | |
| typedef std::thread | 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 &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 &partitioner) |
Variables | |
| bool | in_threads = false |
| spin_mutex | spin_mtx |
| recursive_mutex | recursive_mtx |
Detailed Description
The Threads namespace is for wrapper functions for common general multithreading algorithms and tasks.
Typedef Documentation
| typedef tbb::recursive_mutex libMesh::Threads::recursive_mutex |
| typedef tbb::spin_mutex libMesh::Threads::spin_mutex |
| typedef tbb::split libMesh::Threads::split |
| typedef tbb::task_scheduler_init libMesh::Threads::task_scheduler_init |
| typedef tbb::tbb_thread libMesh::Threads::Thread |
Function Documentation
| void libMesh::Threads::parallel_for | ( | const Range & | range, | |
| const Body & | body, | |||
| const Partitioner & | partitioner | |||
| ) | [inline] |
Exectue the provided function object in parallel on the specified range with the specified partitioner.
Definition at line 341 of file threads.h.
References in_threads.
00342 { 00343 BoolAcquire b(in_threads); 00344 body(range); 00345 }
| void libMesh::Threads::parallel_for | ( | const Range & | range, | |
| const Body & | body | |||
| ) | [inline] |
Exectue the provided function object in parallel on the specified range.
Definition at line 328 of file threads.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::DofMap::create_dof_constraints(), libMesh::WeightedPatchRecoveryErrorEstimator::estimate_error(), libMesh::PatchRecoveryErrorEstimator::estimate_error(), libMesh::FEMSystem::postprocess(), and libMesh::System::project_vector().
00329 { 00330 BoolAcquire b(in_threads); 00331 body(range); 00332 }
| void libMesh::Threads::parallel_reduce | ( | const Range & | range, | |
| Body & | body, | |||
| const Partitioner & | partitioner | |||
| ) | [inline] |
Exectue the provided reduction operation in parallel on the specified range with the specified partitioner.
Definition at line 367 of file threads.h.
References in_threads.
00368 { 00369 BoolAcquire b(in_threads); 00370 body(range); 00371 }
| void libMesh::Threads::parallel_reduce | ( | const Range & | range, | |
| Body & | body | |||
| ) | [inline] |
Exectue the provided reduction operation in parallel on the specified range.
Definition at line 354 of file threads.h.
References in_threads.
Referenced by libMesh::FEMSystem::assemble_qoi(), libMesh::MeshTools::bounding_box(), libMesh::DofMap::build_sparsity(), libMesh::MeshTools::processor_bounding_box(), libMesh::System::project_vector(), libMesh::MeshTools::total_weight(), and libMesh::MeshTools::weight().
00355 { 00356 BoolAcquire b(in_threads); 00357 body(range); 00358 }
Variable Documentation
| 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 33 of file threads.C.
Referenced by parallel_for(), parallel_reduce(), libMesh::MeshBase::point_locator(), and libMesh::MeshBase::sub_point_locator().
A spin mutex object which
Definition at line 31 of file threads.C.
Referenced by libMesh::FEAbstract::compute_node_constraints(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::ReferenceCounter::increment_constructor_count(), libMesh::ReferenceCounter::increment_destructor_count(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::BoundaryProjectSolution::operator()(), libMesh::ProjectFEMSolution::operator()(), libMesh::ProjectSolution::operator()(), and libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()().
Site Created By: libMesh Developers
Last modified: February 05 2013 19:55:49 UTC
Hosted By: