Fix cpplint errors
authorKai Li <kaili_kloud@163.com>
Mon, 31 Mar 2014 14:38:16 +0000 (22:38 +0800)
committerKai Li <kaili_kloud@163.com>
Tue, 1 Apr 2014 02:28:08 +0000 (10:28 +0800)
include/caffe/common.hpp
src/caffe/common.cpp

index d395bd7..19a3e63 100644 (file)
@@ -31,19 +31,21 @@ private:\
   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) \
@@ -139,7 +141,7 @@ class Caffe {
 };
 
 // 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.
index c2d5058..fe929b3 100644 (file)
@@ -147,7 +147,7 @@ const void* Caffe::RNG::generator() const {
   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";