deal.II version GIT relicensing-2291-g668cd86249 2024-12-24 11:30:00+00:00
\(\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\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
internal::AlignedVectorMoveConstruct< RandomAccessIterator, T > Class Template Reference
Inheritance diagram for internal::AlignedVectorMoveConstruct< RandomAccessIterator, T >:
Inheritance graph
[legend]

Public Member Functions

 AlignedVectorMoveConstruct (RandomAccessIterator source_begin, RandomAccessIterator source_end, T *const destination)
 
virtual void apply_to_subrange (const std::size_t begin, const std::size_t end) const override
 

Private Member Functions

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

Private Attributes

RandomAccessIterator source_
 
T *const destination_
 

Static Private Attributes

static const std::size_t minimum_parallel_grain_size
 

Detailed Description

template<typename RandomAccessIterator, typename T>
class internal::AlignedVectorMoveConstruct< RandomAccessIterator, T >

Like AlignedVectorCopyConstruct, but use the move-constructor of T to create new objects.

Definition at line 845 of file aligned_vector.h.

Constructor & Destructor Documentation

◆ AlignedVectorMoveConstruct()

template<typename RandomAccessIterator , typename T >
internal::AlignedVectorMoveConstruct< RandomAccessIterator, T >::AlignedVectorMoveConstruct ( RandomAccessIterator  source_begin,
RandomAccessIterator  source_end,
T *const  destination 
)
inline

Constructor. Issues a parallel call if there are sufficiently many elements, otherwise works in serial. Moves the data from the half-open interval between source_begin and source_end to array starting at destination (by calling the move constructor with placement new).

The data is moved between the two arrays by invoking the destructor on the source range (preparing for a subsequent call to free).

Definition at line 861 of file aligned_vector.h.

Member Function Documentation

◆ apply_to_subrange()

template<typename RandomAccessIterator , typename T >
virtual void internal::AlignedVectorMoveConstruct< RandomAccessIterator, T >::apply_to_subrange ( const std::size_t  begin,
const std::size_t  end 
) const
inlineoverridevirtual

This method moves elements from the source to the destination given in the constructor on a subrange given by two integers.

Implements parallel::ParallelForInteger.

Definition at line 882 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 743 of file parallel.h.

Member Data Documentation

◆ minimum_parallel_grain_size

template<typename RandomAccessIterator , typename T >
const std::size_t internal::AlignedVectorMoveConstruct< RandomAccessIterator, T >::minimum_parallel_grain_size
staticprivate
Initial value:
=
160000 / sizeof(T) + 1

Definition at line 848 of file aligned_vector.h.

◆ source_

template<typename RandomAccessIterator , typename T >
RandomAccessIterator internal::AlignedVectorMoveConstruct< RandomAccessIterator, T >::source_
private

Definition at line 903 of file aligned_vector.h.

◆ destination_

template<typename RandomAccessIterator , typename T >
T* const internal::AlignedVectorMoveConstruct< RandomAccessIterator, T >::destination_
private

Definition at line 904 of file aligned_vector.h.


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