IBAMR / IBSAMRAI2

SAMRAI 2.4.4 fork and associated patches.
Other
1 stars 1 forks source link

Upgrade all allocators to use aligned memory. #9

Open drwells opened 1 year ago

drwells commented 1 year ago

f6f96894b0ad114222f80467ab89b3562adcfb95 in #3 uses std::copy() which is helpful for two reasons:

  1. It assumes that memory regions don't overlap so we don't have a performance penalty from aliasing
  2. It usually resolves to a vectorized (AVX) version of memcpy()

We could probably improve performance across-the-board by using aligned memory everywhere and then annotating our loops (in C++ or Fortran) as such, e.g., with OpenMP's 'this memory is aligned' pragmas.

drwells commented 1 year ago

This wouldn't be too hard to do with SAMRAI because it centralizes memory allocation with its pool/arena classes.