From c49f78f4cc0ca675fa6ef17c0edfd018d8718336 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 7 Apr 2023 14:30:50 -0700 Subject: [PATCH] ParticleTileData: No Restrict in Storage 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. --- 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;