diff --git a/Src/Base/AMReX_GpuComplex.H b/Src/Base/AMReX_GpuComplex.H index 205788375f4..274da82604d 100644 --- a/Src/Base/AMReX_GpuComplex.H +++ b/Src/Base/AMReX_GpuComplex.H @@ -20,9 +20,12 @@ T norm (const GpuComplex& a_z) noexcept; * work in device code with Cuda yet. * * Should be bit-wise compatible with std::complex. + * + * GpuComplex is aligned to its size (stricter than std::complex) to allow for + * coalesced memory accesses with nvidia GPUs. */ template -struct GpuComplex +struct alignas(2*sizeof(T)) GpuComplex { using value_type = T;