-
please merge modification in error.h in master branch.
-
mentioned in commit a8b50fc157a6da27f0b43cc2442a7682b0e11f52
-
Status changed to merged
Showing
1 changed file
Show diff stats
stim/cuda/cudatools/error.h
@@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
3 | 3 | ||
4 | #include <stdio.h> | 4 | #include <stdio.h> |
5 | #include <iostream> | 5 | #include <iostream> |
6 | -using namespace std; | ||
7 | #include "cuda_runtime.h" | 6 | #include "cuda_runtime.h" |
8 | #include "device_launch_parameters.h" | 7 | #include "device_launch_parameters.h" |
9 | #include "cufft.h" | 8 | #include "cufft.h" |
@@ -17,25 +16,24 @@ static void cuHandleError( cudaError_t err, const char *file, int line ) { | @@ -17,25 +16,24 @@ static void cuHandleError( cudaError_t err, const char *file, int line ) { | ||
17 | } | 16 | } |
18 | } | 17 | } |
19 | #define HANDLE_ERROR( err ) (cuHandleError( err, __FILE__, __LINE__ )) | 18 | #define HANDLE_ERROR( err ) (cuHandleError( err, __FILE__, __LINE__ )) |
20 | - | ||
21 | static void cufftHandleError( cufftResult err, const char*file, int line ) | 19 | static void cufftHandleError( cufftResult err, const char*file, int line ) |
22 | { | 20 | { |
23 | if (err != CUFFT_SUCCESS) | 21 | if (err != CUFFT_SUCCESS) |
24 | { | 22 | { |
25 | if(err == CUFFT_INVALID_PLAN) | 23 | if(err == CUFFT_INVALID_PLAN) |
26 | - cout<<"The plan parameter is not a valid handle."<<endl; | 24 | + std::cout<<"The plan parameter is not a valid handle."<<std::endl; |
27 | else if(err == CUFFT_ALLOC_FAILED) | 25 | else if(err == CUFFT_ALLOC_FAILED) |
28 | - cout<<"Allocation failed."<<endl; | 26 | + std::cout<<"Allocation failed."<<std::endl; |
29 | else if(err == CUFFT_INVALID_VALUE) | 27 | else if(err == CUFFT_INVALID_VALUE) |
30 | - cout<<"At least one of the parameters idata, odata, and direction is not valid."<<endl; | 28 | + std::cout<<"At least one of the parameters idata, odata, and direction is not valid."<<std::endl; |
31 | else if(err == CUFFT_INTERNAL_ERROR) | 29 | else if(err == CUFFT_INTERNAL_ERROR) |
32 | - cout<<"An internal driver error was detected."<<endl; | 30 | + std::cout<<"An internal driver error was detected."<<std::endl; |
33 | else if(err == CUFFT_EXEC_FAILED) | 31 | else if(err == CUFFT_EXEC_FAILED) |
34 | - cout<<"CUFFT failed to execute the transform on the GPU."<<endl; | 32 | + std::cout<<"CUFFT failed to execute the transform on the GPU."<<std::endl; |
35 | else if(err == CUFFT_SETUP_FAILED) | 33 | else if(err == CUFFT_SETUP_FAILED) |
36 | - cout<<"The CUFFT library failed to initialize."<<endl; | 34 | + std::cout<<"The CUFFT library failed to initialize."<<std::endl; |
37 | else | 35 | else |
38 | - cout<<"Unknown error: "<<err<<endl; | 36 | + std::cout<<"Unknown error: "<<err<<std::endl; |
39 | 37 | ||
40 | } | 38 | } |
41 | } | 39 | } |