19 #ifndef LIBMESH_THREADS_NONE_H 20 #define LIBMESH_THREADS_NONE_H 24 #ifndef LIBMESH_SQUASH_HEADER_WARNING 25 # warning "This file is designed to be included through libmesh/threads.h" 28 #if !defined(LIBMESH_HAVE_TBB_API) && !defined(LIBMESH_HAVE_PTHREAD) 31 #define LIBMESH_TLS_TYPE(type) type 32 #define LIBMESH_TLS_REF(value) (value) 71 template <
typename Range,
typename Body>
77 "Requested n_threads (" <<
n_threads <<
") exceeds the " 89 template <
typename Range,
typename Body,
typename Partitioner>
95 "Requested n_threads (" <<
n_threads <<
") exceeds the " 107 template <
typename Range,
typename Body>
113 "Requested n_threads (" <<
n_threads <<
") exceeds the " 125 template <
typename Range,
typename Body,
typename Partitioner>
131 "Requested n_threads (" <<
n_threads <<
") exceeds the " 187 template <
typename T>
192 operator T & () {
return _val; }
201 #endif // !defined(LIBMESH_HAVE_TBB_API) && !defined(LIBMESH_HAVE_PTHREAD) 203 #endif // LIBMESH_SQUASH_HEADER_WARNING 205 #endif // LIBMESH_THREADS_NONE_H Simple compatibility class for std::thread 'concurrent' execution.
void parallel_for(const Range &range, const Body &body, unsigned int n_threads=libMesh::n_threads())
Execute the provided function object in parallel on the specified range.
void initialize(int=automatic)
We use a class to turn Threads::in_threads on and off, to be exception-safe.
Dummy "splitting object" used to distinguish splitting constructors from copy constructors.
The libMesh namespace provides an interface to certain functionality in the library.
bool in_threads
A boolean which is true iff we are in a Threads:: function It may be useful to assert(!Threadsin_thre...
void acquire(spin_mutex &)
The Partitioner class provides a uniform interface for partitioning algorithms.
scoped_lock(recursive_mutex &)
scoped_lock(spin_mutex &)
void parallel_reduce(const Range &range, Body &body, unsigned int n_threads=libMesh::n_threads())
Execute the provided reduction operation in parallel on the specified range.
Defines atomic operations which can only be executed on a single thread at a time.
static const int automatic
void acquire(recursive_mutex &)
Scheduler to manage threads.
task_scheduler_init(int=automatic)
NonConcurrentThread Thread
Use the non-concurrent placeholder.