Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Classes | Static Private Attributes | List of all members
internals::ConstraintMatrixData< Number > Class Template Reference

#include <constraint_matrix.templates.h>

Classes

struct  ScratchData
 
class  ScratchDataAccessor
 

Static Private Attributes

static
Threads::ThreadLocalStorage
< ScratchData
scratch_data
 

Detailed Description

template<typename Number>
class internals::ConstraintMatrixData< Number >

Scratch data that is used during calls to distribute_local_to_global and add_entries_local_to_global. In order to avoid frequent memory allocation, we keep the data alive from one call to the next in a static variable. Since we want to allow for different number types in matrices, this is a template.

Since each thread gets its private version of scratch data out of the ThreadLocalStorage, no conflicting access can occur. For this to be valid, we need to make sure that no call within distribute_local_to_global is made that by itself can spawn tasks. Otherwise, we might end up in a situation where several threads fight for the data.

Access to the scratch data is only through the accessor class which handles the access as well as marking the data as used.

Definition at line 1655 of file constraint_matrix.templates.h.

Member Data Documentation

template<typename Number >
Threads::ThreadLocalStorage<ScratchData> internals::ConstraintMatrixData< Number >::scratch_data
staticprivate

The actual data object that contains a scratch data for each thread.

Definition at line 1766 of file constraint_matrix.templates.h.


The documentation for this class was generated from the following file: