aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXrocfftUtil.cpp
blob: cc12d6914495af9b02911fd3a913e1c273c189f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Copyright 2023 Luca Fedeli
 *
 * This file is part of WarpX.
 *
 * License: BSD-3-Clause-LBNL
 */

#include "WarpXrocfftUtil.H"

#include <AMReX_Config.H>

#if defined(AMREX_USE_HIP) && defined(WARPX_USE_PSATD)
#  if __has_include(<rocfft/rocfft.h>)  // ROCm 5.3+
#    include <rocfft/rocfft.h>
#  else
#    include <rocfft.h>
#  endif
#endif

void
utils::rocfft::setup()
{
#if defined(AMREX_USE_HIP) && defined(WARPX_USE_PSATD)
    rocfft_setup();
#endif
}

void
utils::rocfft::cleanup()
{
#if defined(AMREX_USE_HIP) && defined(WARPX_USE_PSATD)
    rocfft_cleanup();
#endif
}