do { \
cudaError_t error = condition; \
CHECK_EQ(error, cudaSuccess) << cudaGetErrorString(error); \
- } while(0)
+ } while (0)
#define CUBLAS_CHECK(condition) \
do { \
cublasStatus_t status = condition; \
- CHECK_EQ(status, CUBLAS_STATUS_SUCCESS) << cublasGetErrorString(status); \
- } while(0)
+ CHECK_EQ(status, CUBLAS_STATUS_SUCCESS) \
+ << caffe::cublasGetErrorString(status); \
+ } while (0)
#define CURAND_CHECK(condition) \
do { \
curandStatus_t status = condition; \
- CHECK_EQ(status, CURAND_STATUS_SUCCESS) << curandGetErrorString(status); \
- } while(0)
+ CHECK_EQ(status, CURAND_STATUS_SUCCESS) \
+ << caffe::curandGetErrorString(status); \
+ } while (0)
// CUDA: grid stride looping
#define CUDA_KERNEL_LOOP(i, n) \
};
// NVIDIA_CUDA-5.5_Samples/common/inc/helper_cuda.h
-const char* cublasGetErrorString(cublasStatus_t& error);
+const char* cublasGetErrorString(cublasStatus_t error);
const char* curandGetErrorString(curandStatus_t error);
// CUDA: thread number configuration.
return &generator_->rng;
}
-const char* cublasGetErrorString(cublasStatus_t& error) {
+const char* cublasGetErrorString(cublasStatus_t error) {
switch (error) {
case CUBLAS_STATUS_SUCCESS:
return "CUBLAS_STATUS_SUCCESS";