Skip to content

Commit eb9d793

Browse files
committed
🐛 Fixed macro for cufft #5
1 parent e6a5db3 commit eb9d793

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Plugin/Utilities/include/cuda_include.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
// use this macro if you want to check cuda function
77
#define CUDA_CHECK(ans) cudaAssert((ans), __FILE__, __LINE__)
88
#define CUDA_CHECK_RETURN(ans) {int ret = cudaAssert((ans), __FILE__, __LINE__); if(ret != 0)return ret;}
9-
#define CUFFT_CHECK(ans) { int ret = cufftAssert((int)(ans), __FILE__, __LINE__); return ret; }
9+
#define CUFFT_CHECK(ans) cufftAssert((int)(ans), __FILE__, __LINE__)
10+
#define CUFFT_CHECK_RETURN(ans) { int ret = cufftAssert((int)(ans), __FILE__, __LINE__); return ret; }
1011

1112

1213
inline int cudaAssert(cudaError_t code, const char* file, int line)
@@ -89,9 +90,8 @@ inline int cufftAssert(int cufftResult, const char* file, int line)
8990
sprintf_s(buffer, "Cufft error: %i %s %s %d\n", cufftResult, cufftInterpret.c_str(), file, line);
9091
std::string strError(buffer);
9192
Log::log().debugLogError(buffer);
92-
return -1;
9393
}
94-
return 0;
94+
return cufftResult;
9595

9696
}
9797

0 commit comments

Comments
 (0)