From 86ed7d2b5b104e5e42b0ca949aa42e203a790cc0 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 7 Apr 2023 16:27:17 -0700 Subject: [PATCH] ParticleTileData: No Restrict in Storage (#3245) ## Summary Remove the `restrict` qualifier from `GpuArray` members in `ParticleTileData`. We see compilation problems with, among others Clang 14.0.6 and AppleClang, for this construct. We expect that using `restrict` (`AMREX_RESTRICT`) on APIs as well as aliased pointers in these arrays before access should be sufficient to prevent that the compiler thinks that individual arrays alias each other in hot loops. ## Additional background - WarpX build regressions since 23.03, e.g., - https://github.com/conda-forge/warpx-feedstock/pull/63 - https://github.com/conda-forge/warpx-feedstock/pull/64 - https://github.com/ECP-WarpX/WarpX/pull/3817 - independently, about to be remove in https://github.com/AMReX-Codes/amrex/pull/2878 --- Src/Particle/AMReX_ParticleTile.H | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/Particle/AMReX_ParticleTile.H b/Src/Particle/AMReX_ParticleTile.H index 4374197d335..a0a762862d4 100644 --- a/Src/Particle/AMReX_ParticleTile.H +++ b/Src/Particle/AMReX_ParticleTile.H @@ -22,8 +22,8 @@ struct ParticleTileData Long m_size; ParticleType* AMREX_RESTRICT m_aos; - GpuArray m_rdata; - GpuArray m_idata; + GpuArray m_rdata; + GpuArray m_idata; int m_num_runtime_real; int m_num_runtime_int; @@ -170,8 +170,8 @@ struct ConstParticleTileData Long m_size; const ParticleType* AMREX_RESTRICT m_aos; - GpuArray m_rdata; - GpuArray m_idata; + GpuArray m_rdata; + GpuArray m_idata; int m_num_runtime_real; int m_num_runtime_int;