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)
71template <
typename Range,
typename Body>
77 "Requested n_threads (" <<
n_threads <<
") exceeds the "
89template <
typename Range,
typename Body,
typename Partitioner>
95 "Requested n_threads (" <<
n_threads <<
") exceeds the "
107template <
typename Range,
typename Body>
113 "Requested n_threads (" <<
n_threads <<
") exceeds the "
125template <
typename Range,
typename Body,
typename Partitioner>
131 "Requested n_threads (" <<
n_threads <<
") exceeds the "
192 operator T & () {
return _val; }
The Partitioner class provides a uniform interface for partitioning algorithms.
Simple compatibility class for std::thread 'concurrent' execution.
We use a class to turn Threads::in_threads on and off, to be exception-safe.
Defines atomic operations which can only be executed on a single thread at a time.
void acquire(recursive_mutex &)
scoped_lock(recursive_mutex &)
void acquire(spin_mutex &)
scoped_lock(spin_mutex &)
Dummy "splitting object" used to distinguish splitting constructors from copy constructors.
Scheduler to manage threads.
void initialize(int=automatic)
static const int automatic
task_scheduler_init(int=automatic)
bool in_threads
A boolean which is true iff we are in a Threads:: function It may be useful to assert(!...
NonConcurrentThread Thread
Use the non-concurrent placeholder.
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.
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.
The libMesh namespace provides an interface to certain functionality in the library.