Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Weiqun Zhang <[email protected]>
  • Loading branch information
ajnonaka and WeiqunZhang authored Nov 1, 2024
1 parent e6f6c39 commit 47db38b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 23 deletions.
10 changes: 0 additions & 10 deletions ExampleCodes/FFT/Basic/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,5 @@ include $(AMREX_HOME)/Src/Base/Make.package
include $(AMREX_HOME)/Src/FFT/Make.package
include Make.package

ifeq ($(USE_CUDA),TRUE)
libraries += -lcufft
else ifeq ($(USE_HIP),TRUE)
# Use rocFFT. ROC_PATH is defined in amrex
INCLUDE_LOCATIONS += $(ROC_PATH)/rocfft/include
LIBRARY_LOCATIONS += $(ROC_PATH)/rocfft/lib
LIBRARIES += -L$(ROC_PATH)/rocfft/lib -lrocfft
else
libraries += -lfftw3_mpi -lfftw3f -lfftw3
endif

include $(AMREX_HOME)/Tools/GNUMake/Make.rules
4 changes: 2 additions & 2 deletions ExampleCodes/FFT/Basic/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ int main (int argc, char* argv[])

const Box& bx = mfi.fabbox();

amrex::ParallelForRNG(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k, RandomEngine const& engine) noexcept
amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
{

// **********************************
Expand Down Expand Up @@ -154,7 +154,7 @@ int main (int argc, char* argv[])

const Box& bx = mfi.fabbox();

amrex::ParallelForRNG(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k, RandomEngine const& engine) noexcept
amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
{
phi_fft_realimag_ptr(i,j,k,0) = phi_fft_ptr(i,j,k).real();
phi_fft_realimag_ptr(i,j,k,1) = phi_fft_ptr(i,j,k).imag();
Expand Down
10 changes: 0 additions & 10 deletions ExampleCodes/FFT/Poisson/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,5 @@ include $(AMREX_HOME)/Src/Base/Make.package
include $(AMREX_HOME)/Src/FFT/Make.package
include Make.package

ifeq ($(USE_CUDA),TRUE)
libraries += -lcufft
else ifeq ($(USE_HIP),TRUE)
# Use rocFFT. ROC_PATH is defined in amrex
INCLUDE_LOCATIONS += $(ROC_PATH)/rocfft/include
LIBRARY_LOCATIONS += $(ROC_PATH)/rocfft/lib
LIBRARIES += -L$(ROC_PATH)/rocfft/lib -lrocfft
else
libraries += -lfftw3_mpi -lfftw3f -lfftw3
endif

include $(AMREX_HOME)/Tools/GNUMake/Make.rules
2 changes: 1 addition & 1 deletion ExampleCodes/FFT/Poisson/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int main (int argc, char* argv[])

const Box& bx = mfi.fabbox();

amrex::ParallelForRNG(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k, RandomEngine const& engine) noexcept
amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
{

// **********************************
Expand Down

0 comments on commit 47db38b

Please sign in to comment.