From 21674efec0dfb436b6d7c461d7474297b844793b Mon Sep 17 00:00:00 2001 From: Yutian Li Date: Mon, 10 Aug 2015 23:32:17 +0800 Subject: [PATCH] [storage] use if --- include/mxnet/cuda_utils.h | 4 ++-- src/storage/gpu_storage.cc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/mxnet/cuda_utils.h b/include/mxnet/cuda_utils.h index 17c78aaf432c..5329649f63bb 100644 --- a/include/mxnet/cuda_utils.h +++ b/include/mxnet/cuda_utils.h @@ -8,7 +8,7 @@ #include -#ifdef MXNET_USE_CUDA +#if MXNET_USE_CUDA #include #include @@ -100,7 +100,7 @@ inline const char* CurandGetErrorString(curandStatus_t status) { #endif // MXNET_USE_CUDA -#ifdef MXNET_USE_CUDNN +#if MXNET_USE_CUDNN #include diff --git a/src/storage/gpu_storage.cc b/src/storage/gpu_storage.cc index cc30d9038644..d0f2b83b2815 100644 --- a/src/storage/gpu_storage.cc +++ b/src/storage/gpu_storage.cc @@ -3,7 +3,7 @@ */ #include "./gpu_storage.h" #include "mxnet/cuda_utils.h" -#ifdef MXNET_USE_CUDA +#if MXNET_USE_CUDA #include #endif // MXNET_USE_CUDA @@ -12,7 +12,7 @@ namespace storage { void* GpuStorage::Alloc(size_t size) { void* ret; -#ifdef MXNET_USE_CUDA +#if MXNET_USE_CUDA CUDA_CALL(cudaMalloc(&ret, size)); #else // MXNET_USE_CUDA LOG(FATAL) << "Please compile with CUDA enabled"; @@ -21,7 +21,7 @@ void* GpuStorage::Alloc(size_t size) { } void GpuStorage::Free(void* ptr) { -#ifdef MXNET_USE_CUDA +#if MXNET_USE_CUDA CUDA_CALL(cudaFree(ptr)); #else // MXNET_USE_CUDA LOG(FATAL) << "Please compile with CUDA enabled";