Reference documentation for deal.II version 9.3.3
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
internal::AlignedVectorDefaultInitialize< T, initialize_memory > Class Template Reference

#include <deal.II/base/aligned_vector.h>

Inheritance diagram for internal::AlignedVectorDefaultInitialize< T, initialize_memory >:
[legend]

Public Member Functions

 AlignedVectorDefaultInitialize (const std::size_t size, T *const destination)
 
virtual void apply_to_subrange (const std::size_t begin, const std::size_t end) const override
 

Private Member Functions

void default_construct_or_assign (const std::size_t begin, const std::size_t end, std::integral_constant< bool, false >) const
 
void default_construct_or_assign (const std::size_t begin, const std::size_t end, std::integral_constant< bool, true >) const
 
void apply_parallel (const std::size_t begin, const std::size_t end, const std::size_t minimum_parallel_grain_size) const
 

Private Attributes

T * destination_
 

Static Private Attributes

static const std::size_t minimum_parallel_grain_size
 

Detailed Description

template<typename T, bool initialize_memory>
class internal::AlignedVectorDefaultInitialize< T, initialize_memory >

Class that issues the set commands for AlignedVector.

Template Parameters
initialize_memorySets whether the set command should initialize memory (with a call to the copy constructor) or rather use the copy assignment operator. A template is necessary to select the appropriate operation since some classes might define only one of those two operations.

Definition at line 750 of file aligned_vector.h.

Constructor & Destructor Documentation

◆ AlignedVectorDefaultInitialize()

template<typename T , bool initialize_memory>
internal::AlignedVectorDefaultInitialize< T, initialize_memory >::AlignedVectorDefaultInitialize ( const std::size_t  size,
T *const  destination 
)
inline

Constructor. Issues a parallel call if there are sufficiently many elements, otherwise work in serial.

Definition at line 761 of file aligned_vector.h.

Member Function Documentation

◆ apply_to_subrange()

template<typename T , bool initialize_memory>
virtual void internal::AlignedVectorDefaultInitialize< T, initialize_memory >::apply_to_subrange ( const std::size_t  begin,
const std::size_t  end 
) const
inlineoverridevirtual

This initializes elements on a subrange given by two integers.

Implements parallel::ParallelForInteger.

Definition at line 778 of file aligned_vector.h.

◆ default_construct_or_assign() [1/2]

template<typename T , bool initialize_memory>
void internal::AlignedVectorDefaultInitialize< T, initialize_memory >::default_construct_or_assign ( const std::size_t  begin,
const std::size_t  end,
std::integral_constant< bool, false >   
) const
inlineprivate

Definition at line 799 of file aligned_vector.h.

◆ default_construct_or_assign() [2/2]

template<typename T , bool initialize_memory>
void internal::AlignedVectorDefaultInitialize< T, initialize_memory >::default_construct_or_assign ( const std::size_t  begin,
const std::size_t  end,
std::integral_constant< bool, true >   
) const
inlineprivate

Definition at line 809 of file aligned_vector.h.

◆ apply_parallel()

void parallel::ParallelForInteger::apply_parallel ( const std::size_t  begin,
const std::size_t  end,
const std::size_t  minimum_parallel_grain_size 
) const
inlineinherited

This function runs the for loop over the given range [lower,upper), possibly in parallel when end-begin is larger than the minimum parallel grain size. This function is marked const because it any operation that changes the data of a derived class will inherently not be thread-safe when several threads work with the same data simultaneously.

Definition at line 839 of file parallel.h.

Member Data Documentation

◆ minimum_parallel_grain_size

template<typename T , bool initialize_memory>
const std::size_t internal::AlignedVectorDefaultInitialize< T, initialize_memory >::minimum_parallel_grain_size
staticprivate
Initial value:
=
160000 / sizeof(T) + 1
static const char T

Definition at line 753 of file aligned_vector.h.

◆ destination_

template<typename T , bool initialize_memory>
T* internal::AlignedVectorDefaultInitialize< T, initialize_memory >::destination_
mutableprivate

Definition at line 795 of file aligned_vector.h.


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