Rename curand_availability_logged according to the Google style guide
authorKai Li <kaili_kloud@163.com>
Tue, 10 Jun 2014 01:26:31 +0000 (09:26 +0800)
committerKai Li <kaili_kloud@163.com>
Fri, 20 Jun 2014 09:29:43 +0000 (17:29 +0800)
src/caffe/common.cpp

index f560069..88fd3a9 100644 (file)
@@ -50,7 +50,7 @@ void Caffe::set_random_seed(const unsigned int seed) {
   // Curand seed
   // Yangqing's note: simply setting the generator seed does not seem to
   // work on the tesla K20s, so I wrote the ugly reset thing below.
-  static bool curand_availability_logged = false;
+  static bool g_curand_availability_logged = false;
   if (Get().curand_generator_) {
     CURAND_CHECK(curandDestroyGenerator(curand_generator()));
     CURAND_CHECK(curandCreateGenerator(&Get().curand_generator_,
@@ -58,10 +58,10 @@ void Caffe::set_random_seed(const unsigned int seed) {
     CURAND_CHECK(curandSetPseudoRandomGeneratorSeed(curand_generator(),
         seed));
   } else {
-    if (!curand_availability_logged) {
+    if (!g_curand_availability_logged) {
         LOG(ERROR) <<
             "Curand not available. Skipping setting the curand seed.";
-        curand_availability_logged = true;
+        g_curand_availability_logged = true;
     }
   }
   // RNG seed