common bugfix
authorYangqing Jia <jiayq84@gmail.com>
Fri, 13 Sep 2013 00:45:58 +0000 (17:45 -0700)
committerYangqing Jia <jiayq84@gmail.com>
Fri, 13 Sep 2013 00:45:58 +0000 (17:45 -0700)
src/caffeine/common.hpp

index d4c455a..2991011 100644 (file)
@@ -37,7 +37,7 @@ static std::ostream nullout(0);
 
 // TODO(Yangqing): make a better logging scheme
 #define CUDA_LOG_IF(condition) \
-    ((condition) != cudaSuccess) ? nullout : std::cout
+    ((condition) == cudaSuccess) ? nullout : std::cout
 
 #define CUDA_CHECK(condition) \
     CUDA_LOG_IF(condition) << "Check failed: " #condition " "
@@ -52,4 +52,4 @@ static std::ostream nullout(0);
 
 #endif  // NDEBUG
 
-#endif  // CAFFEINE_COMMON_HPP_
\ No newline at end of file
+#endif  // CAFFEINE_COMMON_HPP_