From 3c8f77675b219e58380e4793dffe0cd63592e6a4 Mon Sep 17 00:00:00 2001 From: AlexanderSinn Date: Wed, 21 Feb 2024 19:04:09 +0100 Subject: [PATCH] =?UTF-8?q?Use=C2=A0amrex=20GpuComplex=20in=20diagnostics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/diagnostics/Diagnostic.H | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/diagnostics/Diagnostic.H b/src/diagnostics/Diagnostic.H index 4f1d221f0e..9c0c7664af 100644 --- a/src/diagnostics/Diagnostic.H +++ b/src/diagnostics/Diagnostic.H @@ -15,19 +15,6 @@ #include -// 16-byte alignment enables coalesced memory access which is significantly faster -struct alignas(2*sizeof(amrex::Real)) AlignedComplex { - amrex::Real real; - amrex::Real imag; - - AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE constexpr - AlignedComplex& operator+= (const AlignedComplex& rhs) { - real += rhs.real; - imag += rhs.imag; - return *this; - } -}; - /** \brief This struct holds data for one field diagnostic on one MR level */ struct FieldDiagnosticData @@ -50,7 +37,7 @@ struct FieldDiagnosticData amrex::Gpu::DeviceVector m_comps_output_idx; /** Vector over levels, all fields */ amrex::FArrayBox m_F; - using complex_type = AlignedComplex; + using complex_type = amrex::GpuComplex; /** FAB for laser */ amrex::BaseFab m_F_laser; amrex::Geometry m_geom_io; /**< Diagnostics geometry */