]> https://gitweb.dealii.org/ - dealii.git/commit
Combined add and inner product for vectors: add_and_dot
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sun, 26 Oct 2014 08:25:43 +0000 (09:25 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 31 Oct 2014 18:43:44 +0000 (12:43 -0600)
commitabcd2880e668632c64ab6797ecbba52ff994e78a
treec6660e3876bb2a760fb5b04e14abf88c3e30e02c
parent9deac931ddd1baaffc65ff566680ea464f05d9b9
Combined add and inner product for vectors: add_and_dot

- Implemented a new method add_and_dot for all vector classes (deal.II's vectors,
  block vectors, PETSc, Trilinos vectors)
- Specialized function for deal.II vector that does add_and_dot in one sweep over
  the data by a new AddAndDot struct that is passed to the accumulate function. This
  also extends the other structs for inner products and norms by one (unused) argument.
- New tests for this feature.
- Added new do_vectorized operation to all accumulation operations that uses the
  operations of VectorizedArray<double/float> for the sums. This helps to reduce the
  operations and thus increase performance when memory transfer is not the limit.
  This functionality is called in the regular part of the accumulate function which
  now sits in its own method 'accumulate_regular' (length divisible by 32). This
  functionality can unfortunately not be realized by the OPENMP_SIMD pragma recently
  introduced because that leads to non-reproducible results when the vector memory
  starts at different memory locations. VectorizedArray is only supported on some
  platforms and thus this functionality may not be available everywhere. However, good
  code will be generated unconditionally (except on old machines from around 2004-2008
  where unaligned reads also from aligned memory are slow, but those are not relevant
  any more).
- To implemented vectorized pow operations, I also added a std::pow function for
  VectorizedArray.
- The memory for parallel::distributed::Vector is now allocated to 64 byte boundaries
  just as is the memory of Vector<Number>.
29 files changed:
doc/news/changes.h
include/deal.II/base/vectorization.h
include/deal.II/lac/block_vector_base.h
include/deal.II/lac/parallel_block_vector.h
include/deal.II/lac/parallel_vector.h
include/deal.II/lac/parallel_vector.templates.h
include/deal.II/lac/petsc_vector_base.h
include/deal.II/lac/solver_bicgstab.h
include/deal.II/lac/solver_cg.h
include/deal.II/lac/solver_gmres.h
include/deal.II/lac/trilinos_vector_base.h
include/deal.II/lac/vector.h
include/deal.II/lac/vector.templates.h
source/lac/petsc_vector_base.cc
tests/lac/gmres_reorthogonalize_02.cc
tests/lac/gmres_reorthogonalize_02.compiler=Intel=no.release.output [deleted file]
tests/lac/gmres_reorthogonalize_02.compiler=Intel=yes.release.output [deleted file]
tests/lac/gmres_reorthogonalize_02.debug.output [deleted file]
tests/lac/gmres_reorthogonalize_02.output [new file with mode: 0644]
tests/lac/gmres_reorthogonalize_04.cc
tests/lac/gmres_reorthogonalize_04.compiler=Intel=no.release.output [deleted file]
tests/lac/gmres_reorthogonalize_04.debug.output [deleted file]
tests/lac/gmres_reorthogonalize_04.output [moved from tests/lac/gmres_reorthogonalize_04.compiler=Intel=yes.release.output with 70% similarity]
tests/lac/vector_accumulation_01.cc [moved from tests/lac/vector_accumulation.cc with 100% similarity]
tests/lac/vector_accumulation_01.output [moved from tests/lac/vector_accumulation.output with 100% similarity]
tests/lac/vector_accumulation_02.cc [new file with mode: 0644]
tests/lac/vector_accumulation_02.output [new file with mode: 0644]
tests/lac/vector_add_and_dot.cc [new file with mode: 0644]
tests/lac/vector_add_and_dot.output [new file with mode: 0644]

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.