src/muParserTokenReader.cpp
)
-#IF(DEAL_II_WITH_THREADS)
-# DEAL_II_ADD_DEFINITIONS(obj_muparser "FP_USE_THREAD_SAFE_EVAL")
-#ENDIF()
+#DEAL_II_ADD_DEFINITIONS(obj_muparser "FP_USE_THREAD_SAFE_EVAL")
output_granularity,
"time interval for output");
-#ifdef DEAL_II_WITH_THREADS
asynchronous_writeback = true;
-#else
- asynchronous_writeback = false;
-#endif
add_parameter("asynchronous writeback",
asynchronous_writeback,
"Write out solution in a background thread performing IO");
// run in the background.
if (asynchronous_writeback)
{
-#ifdef DEAL_II_WITH_THREADS
background_thread_state = std::async(std::launch::async, output_worker);
-#else
- AssertThrow(
- false,
- ExcMessage(
- "\"asynchronous_writeback\" was set to true but deal.II was built "
- "without thread support (\"DEAL_II_WITH_THREADS=false\")."));
-#endif
}
else
{
#include <memory>
#include <tuple>
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
# include <tbb/blocked_range.h>
# include <tbb/parallel_for.h>
# include <tbb/parallel_reduce.h>
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
/**
* Encapsulate tbb::parallel_for.
*/
const Predicate & predicate,
const unsigned int grainsize)
{
-#ifndef DEAL_II_WITH_THREADS
+#ifndef DEAL_II_WITH_TBB
// make sure we don't get compiler
// warnings about unused arguments
(void)grainsize;
const Predicate & predicate,
const unsigned int grainsize)
{
-#ifndef DEAL_II_WITH_THREADS
+#ifndef DEAL_II_WITH_TBB
// make sure we don't get compiler
// warnings about unused arguments
(void)grainsize;
const Predicate & predicate,
const unsigned int grainsize)
{
-#ifndef DEAL_II_WITH_THREADS
+#ifndef DEAL_II_WITH_TBB
// make sure we don't get compiler
// warnings about unused arguments
(void)grainsize;
namespace internal
{
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
/**
* Take a range argument and call the given function with its begin and
* end.
const Function & f,
const unsigned int grainsize)
{
-#ifndef DEAL_II_WITH_THREADS
+#ifndef DEAL_II_WITH_TBB
// make sure we don't get compiler
// warnings about unused arguments
(void)grainsize;
namespace internal
{
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
/**
* A class that conforms to the Body requirements of the TBB
* parallel_reduce function. The first template argument denotes the type
const typename identity<RangeType>::type &end,
const unsigned int grainsize)
{
-#ifndef DEAL_II_WITH_THREADS
+#ifndef DEAL_II_WITH_TBB
// make sure we don't get compiler
// warnings about unused arguments
(void)grainsize;
*/
TBBPartitioner();
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
/**
* Destructor. Check that the object is not in use any more, i.e., all
* loops have been completed.
namespace parallel
{
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
namespace internal
{
const std::size_t end,
const std::size_t minimum_parallel_grain_size) const
{
-#ifndef DEAL_II_WITH_THREADS
+#ifndef DEAL_II_WITH_TBB
// make sure we don't get compiler
// warnings about unused arguments
(void)minimum_parallel_grain_size;
# include <deal.II/base/thread_local_storage.h>
# include <deal.II/base/thread_management.h>
-# ifdef DEAL_II_WITH_THREADS
+# ifdef DEAL_II_WITH_TBB
# include <tbb/pipeline.h>
# endif
*/
namespace WorkStream
{
-# ifdef DEAL_II_WITH_THREADS
+# ifdef DEAL_II_WITH_TBB
namespace internal
{
} // namespace internal
-# endif // DEAL_II_WITH_THREADS
+# endif // DEAL_II_WITH_TBB
/**
// we want to use TBB if we have support and if it is not disabled at
// runtime:
-# ifdef DEAL_II_WITH_THREADS
+# ifdef DEAL_II_WITH_TBB
if (MultithreadInfo::n_threads() == 1)
# endif
{
copier(copy_data);
}
}
-# ifdef DEAL_II_WITH_THREADS
+# ifdef DEAL_II_WITH_TBB
else // have TBB and use more than one thread
{
// Check that the copier exist
// we want to use TBB if we have support and if it is not disabled at
// runtime:
-# ifdef DEAL_II_WITH_THREADS
+# ifdef DEAL_II_WITH_TBB
if (MultithreadInfo::n_threads() == 1)
# endif
{
copier(copy_data);
}
}
-# ifdef DEAL_II_WITH_THREADS
+# ifdef DEAL_II_WITH_TBB
else // have TBB and use more than one thread
{
// loop over the various colors of what we're given
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
/**
* This struct takes the loop range from the tbb parallel for loop and
* translates it to the actual ranges of the for loop within the vector. It
const std::shared_ptr<::dealii::parallel::internal::TBBPartitioner>
&partitioner)
{
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
const size_type vec_size = end - start;
// only go to the parallel function in case there are at least 4 parallel
// items, otherwise the overhead is too large
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
/**
* This struct takes the loop range from the tbb parallel for loop and
* translates it to the actual ranges of the reduction loop inside the
const std::shared_ptr<::dealii::parallel::internal::TBBPartitioner>
&partitioner)
{
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
const size_type vec_size = end - start;
// only go to the parallel function in case there are at least 4 parallel
// items, otherwise the overhead is too large
#include <deal.II/matrix_free/face_setup_internal.h>
#include <deal.II/matrix_free/matrix_free.h>
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
# include <deal.II/base/parallel.h>
DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
// initialize the basic multithreading information that needs to be
// passed to the DoFInfo structure
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
if (additional_data.tasks_parallel_scheme != AdditionalData::none &&
MultithreadInfo::n_threads() > 1)
{
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
namespace internal
{
DynamicSparsityPattern &connectivity)
{
(void)connectivity;
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
// step 1: build map between the index in the matrix-free context and the
// one in the triangulation
tbb::concurrent_unordered_map<std::pair<unsigned int, unsigned int>,
{
namespace internal
{
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
TBBPartitioner::TBBPartitioner()
: my_partitioner(std::make_shared<tbb::affinity_partitioner>())
, in_use(false)
#include <deal.II/matrix_free/task_info.h>
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
# include <tbb/blocked_range.h>
# include <tbb/parallel_for.h>
# define TBB_SUPPRESS_DEPRECATED_MESSAGES 1
{
namespace MatrixFreeFunctions
{
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
// This defines the TBB data structures that are needed to schedule the
// partition-partition variant
const bool do_compress;
};
-#endif // DEAL_II_WITH_THREADS
+#endif // DEAL_II_WITH_TBB
funct.vector_update_ghosts_start();
-#ifdef DEAL_II_WITH_THREADS
+#ifdef DEAL_II_WITH_TBB
if (scheme != none)
{