Skip to content
Snippets Groups Projects
Commit f2ace5de authored by Martin Bauer's avatar Martin Bauer
Browse files

Increased default Field alignment to 64 byte (AVX512 ready)

parent 3d6ee183
No related merge requests found
...@@ -254,14 +254,14 @@ namespace field { ...@@ -254,14 +254,14 @@ namespace field {
// Automatically select allocator if none was given // Automatically select allocator if none was given
if ( alloc == 0 ) if ( alloc == 0 )
{ {
const uint_t alignment = 32; const uint_t alignment = 64;
// aligned allocator only used (by default) if ... // aligned allocator only used (by default) if ...
if ( l == fzyx && // ... we use a structure of arrays layout if ( l == fzyx && // ... we use a structure of arrays layout
_xSize * sizeof(T) > alignment && // ... the inner coordinate is sufficiently large _xSize * sizeof(T) > alignment && // ... the inner coordinate is sufficiently large
sizeof(T) < alignment && // ... the stored data type is smaller than the alignment sizeof(T) < alignment && // ... the stored data type is smaller than the alignment
alignment % sizeof(T) == 0 ) // ... there is an integer number of elements fitting in one aligned line alignment % sizeof(T) == 0 ) // ... there is an integer number of elements fitting in one aligned line
alloc = make_shared<AllocateAligned<T,32> >(); alloc = make_shared<AllocateAligned<T,alignment> >();
else else
alloc = make_shared<StdFieldAlloc<T> > (); alloc = make_shared<StdFieldAlloc<T> > ();
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment