From: Yangqing Jia Date: Mon, 23 Sep 2013 23:05:39 +0000 (-0700) Subject: more cpplint X-Git-Tag: submit/tizen/20180823.020014~1013 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61146518641e46d4d4e4cc95982c8c0c128cc9fc;p=platform%2Fupstream%2Fcaffeonacl.git more cpplint --- diff --git a/src/caffe/util/im2col.cpp b/src/caffe/util/im2col.cpp index 03c416c..db79bb2 100644 --- a/src/caffe/util/im2col.cpp +++ b/src/caffe/util/im2col.cpp @@ -51,7 +51,7 @@ void col2im_cpu(const Dtype* data_col, const int channels, int c_im = c / ksize / ksize; for (int h = 0; h < height_col; ++h) { for (int w = 0; w < width_col; ++w) { - data_im[(c_im * height + h * stride + h_offset) * width + w * stride + data_im[(c_im * height + h * stride + h_offset) * width + w * stride + w_offset] += data_col[(c * height_col + h) * width_col + w]; } } diff --git a/src/caffe/util/math_functions.cpp b/src/caffe/util/math_functions.cpp index 5a44468..ecb0fe0 100644 --- a/src/caffe/util/math_functions.cpp +++ b/src/caffe/util/math_functions.cpp @@ -37,12 +37,12 @@ void caffe_gpu_gemm(const CBLAS_TRANSPOSE TransA, // Note that cublas follows fortran order. int lda = (TransA == CblasNoTrans) ? K : M; int ldb = (TransB == CblasNoTrans) ? N : K; - cublasOperation_t cuTransA = + cublasOperation_t cuTransA = (TransA == CblasNoTrans) ? CUBLAS_OP_N : CUBLAS_OP_T; cublasOperation_t cuTransB = (TransB == CblasNoTrans) ? CUBLAS_OP_N : CUBLAS_OP_T; CUBLAS_CHECK(cublasSgemm(Caffe::cublas_handle(), cuTransB, cuTransA, - N, M, K, &alpha, B, ldb, A, lda, &beta, C, N)); + N, M, K, &alpha, B, ldb, A, lda, &beta, C, N)); } template <> @@ -53,12 +53,12 @@ void caffe_gpu_gemm(const CBLAS_TRANSPOSE TransA, // Note that cublas follows fortran order. int lda = (TransA == CblasNoTrans) ? K : M; int ldb = (TransB == CblasNoTrans) ? N : K; - cublasOperation_t cuTransA = + cublasOperation_t cuTransA = (TransA == CblasNoTrans) ? CUBLAS_OP_N : CUBLAS_OP_T; cublasOperation_t cuTransB = (TransB == CblasNoTrans) ? CUBLAS_OP_N : CUBLAS_OP_T; CUBLAS_CHECK(cublasDgemm(Caffe::cublas_handle(), cuTransB, cuTransA, - N, M, K, &alpha, B, ldb, A, lda, &beta, C, N)); + N, M, K, &alpha, B, ldb, A, lda, &beta, C, N)); } template <> @@ -124,7 +124,7 @@ void caffe_scal(const int N, const double alpha, double *X) { } template <> -void caffe_sqr(const int n, const float* a, float* y){ +void caffe_sqr(const int n, const float* a, float* y) { vsSqr(n, a, y); } @@ -173,7 +173,7 @@ void caffe_vRngUniform(const int n, double* r, template <> void caffe_vRngGaussian(const int n, float* r, const float a, - const float sigma){ + const float sigma) { VSL_CHECK(vsRngGaussian(VSL_RNG_METHOD_GAUSSIAN_BOXMULLER, Caffe::vsl_stream(), n, r, a, sigma)); } @@ -181,7 +181,7 @@ void caffe_vRngGaussian(const int n, float* r, const float a, template <> void caffe_vRngGaussian(const int n, double* r, const double a, - const double sigma){ + const double sigma) { VSL_CHECK(vdRngGaussian(VSL_RNG_METHOD_GAUSSIAN_BOXMULLER, Caffe::vsl_stream(), n, r, a, sigma)); } diff --git a/src/caffe/util/math_functions.hpp b/src/caffe/util/math_functions.hpp index 0c03c59..e06a3a7 100644 --- a/src/caffe/util/math_functions.hpp +++ b/src/caffe/util/math_functions.hpp @@ -43,7 +43,7 @@ template void caffe_copy(const int N, const Dtype *X, Dtype *Y); template -void caffe_scal (const int N, const Dtype alpha, Dtype *X); +void caffe_scal(const int N, const Dtype alpha, Dtype *X); template void caffe_sqr(const int N, const Dtype* a, Dtype* y);