Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions tests/test_how_cufft_works.cu
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE TEST_HOW_CUFFT_WORKS

#ifdef __CUDACC_VER_MAJOR__
#if __CUDACC_VER_MAJOR__ >= 9
#define __CUDACC_VER__ 90000
#endif
#endif
//#ifdef __CUDACC_VER_MAJOR__
//#if __CUDACC_VER_MAJOR__ >= 9
//#define __CUDACC_VER__ 90000
//#endif
//#endif

#include "boost/test/unit_test.hpp"
#include <numeric>
Expand Down Expand Up @@ -81,8 +81,6 @@ namespace fourierconvolution {
//FORWARD
cufftHandle fftPlanFwd;
CUFFT_ERROR(cufftPlan3d(&fftPlanFwd, shape[row_major::z], shape[row_major::y], shape[row_major::x], CUFFT_R2C));
if(CUDART_VERSION < 6050)
CUFFT_ERROR(cufftSetCompatibilityMode(fftPlanFwd,CUFFT_COMPATIBILITY_FFTW_PADDING));

CUFFT_ERROR(cufftExecR2C(fftPlanFwd, (cufftReal*)d_stack, (cufftComplex *)d_stack));
CUFFT_ERROR(cufftDestroy(fftPlanFwd));
Expand All @@ -96,8 +94,6 @@ namespace fourierconvolution {
//BACKWARD
cufftHandle fftPlanInv;
CUFFT_ERROR(cufftPlan3d(&fftPlanInv, shape[row_major::z], shape[row_major::y], shape[row_major::x], CUFFT_C2R));
if(CUDART_VERSION < 6050)
CUFFT_ERROR(cufftSetCompatibilityMode(fftPlanInv,CUFFT_COMPATIBILITY_FFTW_PADDING));

CUFFT_ERROR(cufftExecC2R(fftPlanInv, (cufftComplex*)d_stack, (cufftReal *)d_stack));
CUFFT_ERROR(cufftDestroy(fftPlanInv) );
Expand Down Expand Up @@ -151,8 +147,6 @@ namespace fourierconvolution {
//FORWARD
cufftHandle fftPlanFwd;
CUFFT_ERROR(cufftPlan3d(&fftPlanFwd, shape[row_major::z], shape[row_major::y], shape[row_major::x], CUFFT_R2C));
if(CUDART_VERSION < 6050)
CUFFT_ERROR(cufftSetCompatibilityMode(fftPlanFwd,CUFFT_COMPATIBILITY_FFTW_PADDING));
CUFFT_ERROR(cufftExecR2C(fftPlanFwd, d_real, d_complex));

//apply scale
Expand All @@ -164,8 +158,6 @@ namespace fourierconvolution {
//BACKWARD
cufftHandle fftPlanInv;
CUFFT_ERROR(cufftPlan3d(&fftPlanInv, shape[row_major::z], shape[row_major::y], shape[row_major::x], CUFFT_C2R));
if(CUDART_VERSION < 6050)
CUFFT_ERROR(cufftSetCompatibilityMode(fftPlanInv,CUFFT_COMPATIBILITY_FFTW_PADDING));

CUFFT_ERROR(cufftExecC2R(fftPlanInv, d_complex, d_real));

Expand Down