-
Notifications
You must be signed in to change notification settings - Fork 410
Open
Labels
Description
At the moment, compiling amrex::Complex<>
as a ad-hoc SIMD fails on MSVC with
│ │ %PREFIX%\Library\include\AMReX_GpuComplex.H(28,8): error: requested alignment is not a power of 2
│ │ 28 | struct alignas(2*sizeof(T)) GpuComplex
│ │ | ^ ~~~~~~~~~~~
It is possible this is actually an alignment requirement in general (not only MSVC) and magic happens.
We might need to wait for mattkretz/vir-simd#42 / C++26 with a proper implementation, which will likely not be 2xSIMD but SIMDx2 layouted.
User code: this is currently used in ImpactX elements like Multipole.H
where the complex math is simple. For more involved complex math, we cannot yet vectorize.