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

#include <vectorization.h>

Inheritance diagram for internal::AlignedVectorMove< T >:
[legend]

Public Member Functions

 AlignedVectorMove (T *source_begin, T *source_end, T *destination, bool copy_only=false)
 
virtual void apply_to_subrange (const std::size_t begin, const std::size_t end) const
 

Private Attributes

T * source_
 
T * destination_
 
const bool copy_only_
 

Static Private Attributes

static const std::size_t minimum_parallel_grain_size = 160000/sizeof(T)+1
 

Additional Inherited Members

- Private Member Functions inherited from parallel::ParallelForInteger
virtual ~ParallelForInteger ()
 
void apply_parallel (const std::size_t begin, const std::size_t end, const std::size_t minimum_parallel_grain_size) const
 

Detailed Description

template<typename T>
class internal::AlignedVectorMove< T >

Move and class that actually issues the copy commands in AlignedVector. This class is based on the specialized for loop base class ParallelForLoop in parallel.h whose purpose is the following: When calling a parallel for loop on AlignedVector with apply_to_subranges, it generates different code for every different argument we might choose (as it is templated). This gives a lot of code (e.g. it triples the memory required for compiling the file matrix_free.cc and the final object size is several times larger) which is completely useless. Therefore, this class channels all copy commands through one call to apply_to_subrange for all possible types, which makes the copy operation much cleaner (thanks to a virtual function, whose cost is negligible in this context).

Definition at line 1418 of file vectorization.h.

Constructor & Destructor Documentation

template<typename T>
internal::AlignedVectorMove< T >::AlignedVectorMove ( T *  source_begin,
T *  source_end,
T *  destination,
bool  copy_only = false 
)
inline

Constructor. Issues a parallel call if there are sufficiently many elements, otherwise work in serial. Copies the data from source to destination and then calls destructor on the source. If the optional argument is set to true, the source is left untouched instead.

Definition at line 1431 of file vectorization.h.

Member Function Documentation

template<typename T>
virtual void internal::AlignedVectorMove< T >::apply_to_subrange ( const std::size_t  begin,
const std::size_t  end 
) const
inlinevirtual

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 1453 of file vectorization.h.


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