/**
* A mutex that guards the following scratch arrays.
*/
- mutable Threads::Mutex mutex;
+ mutable std::mutex mutex;
/**
* Auxiliary values for the usual Function interface.
/**
* A mutex for accelerator object.
*/
- mutable Threads::Mutex acc_mutex;
+ mutable std::mutex acc_mutex;
};
} // namespace Functions
/**
* Thread mutex for supporting evaluation in multi-threaded contexts.
*/
- mutable Threads::Mutex mutex;
+ mutable std::mutex mutex;
};
} // namespace Functions
/**
* A mutex to guard the access to the in_use flag.
*/
- dealii::Threads::Mutex mutex;
+ std::mutex mutex;
#endif
};
} // namespace internal
* A lock that makes sure that this class gives reasonable results even when
* used with several threads.
*/
- Threads::Mutex mutex;
+ std::mutex mutex;
};
/**
* A mutex to be used to guard access to the variables below.
*/
- mutable Threads::Mutex cache_mutex;
+ mutable std::mutex cache_mutex;
/**
* If a shape function is computed at a single point, we must compute all of
/**
* Mutex for protecting initialization of restriction and embedding matrix.
*/
- mutable Threads::Mutex mutex;
+ mutable std::mutex mutex;
friend class FE_Enriched<dim, spacedim>;
};
/**
* A variable to guard access to the fe_values variable.
*/
- mutable Threads::Mutex fe_values_mutex;
+ mutable std::mutex fe_values_mutex;
void
compute_data(const UpdateFlags update_flags,
/**
* A variable to guard access to the fe_values variable.
*/
- mutable Threads::Mutex fe_values_mutex;
+ mutable std::mutex fe_values_mutex;
};
};
* A mutex variable used to guard access to the member variables of this
* structure;
*/
- Threads::Mutex mutex;
+ std::mutex mutex;
/**
* Copy operator. This is needed because the default copy operator of this
- * class is deleted (since Threads::Mutex is not copyable) and hence the
+ * class is deleted (since std::mutex is not copyable) and hence the
* default copy operator of the enclosing class is also deleted.
*
* The implementation here simply does nothing -- TemporaryData objects
* update_ghost_values functions give reasonable results also when used
* with several threads.
*/
- mutable Threads::Mutex mutex;
+ mutable std::mutex mutex;
/**
* A helper function that clears the compress_requests and
/**
* Thread mutex.
*/
- mutable Threads::Mutex mutex;
+ mutable std::mutex mutex;
};
* A mutex to avoid that multiple vmult() invocations by different threads
* overwrite the temporary vectors.
*/
- mutable Threads::Mutex mutex;
+ mutable std::mutex mutex;
/**
* Initializes the factors theta and delta based on an eigenvalue
/**
* Thread mutex.
*/
- mutable Threads::Mutex mutex;
+ mutable std::mutex mutex;
};
// ----------------------- inline functions ----------------------------
* If not in MT mode, then the class used here is empty, and we can as well
* get away with it.
*/
- Threads::Mutex lock;
+ std::mutex lock;
/**
* Flag by which the @p alert function signifies that the data has been
* Mutex to synchronize access to internal data of this object from multiple
* threads.
*/
- static Threads::Mutex mutex;
+ static std::mutex mutex;
};
template <typename VectorType>
-Threads::Mutex GrowingVectorMemory<VectorType>::mutex;
+std::mutex GrowingVectorMemory<VectorType>::mutex;
static constexpr unsigned int bucket_size_threading = 256;
void
- compute_row_lengths(const unsigned int begin,
- const unsigned int end,
- const DoFInfo & dof_info,
- std::vector<Threads::Mutex> &mutexes,
- std::vector<unsigned int> & row_lengths)
+ compute_row_lengths(const unsigned int begin,
+ const unsigned int end,
+ const DoFInfo & dof_info,
+ std::vector<std::mutex> & mutexes,
+ std::vector<unsigned int> &row_lengths)
{
std::vector<unsigned int> scratch;
const unsigned int n_components = dof_info.start_components.back();
const unsigned int end,
const DoFInfo & dof_info,
const std::vector<unsigned int> &row_lengths,
- std::vector<Threads::Mutex> & mutexes,
+ std::vector<std::mutex> & mutexes,
dealii::SparsityPattern & connectivity_dof)
{
std::vector<unsigned int> scratch;
++n_rows;
// first determine row lengths
- std::vector<unsigned int> row_lengths(n_rows);
- std::vector<Threads::Mutex> mutexes(
- n_rows / internal::bucket_size_threading + 1);
+ std::vector<unsigned int> row_lengths(n_rows);
+ std::vector<std::mutex> mutexes(n_rows / internal::bucket_size_threading +
+ 1);
parallel::apply_to_subranges(0,
task_info.n_active_cells,
[this,