From 91d24c5fa9f82ad4c1cda923100bed41bc5cff31 Mon Sep 17 00:00:00 2001 From: hedaoyuan Date: Tue, 31 Oct 2017 22:10:42 +0800 Subject: [PATCH] Bug fix. --- paddle/math/Matrix.h | 2 +- paddle/parameter/Parameter.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/paddle/math/Matrix.h b/paddle/math/Matrix.h index 31438c7c9b..ba5edb4030 100644 --- a/paddle/math/Matrix.h +++ b/paddle/math/Matrix.h @@ -2065,8 +2065,8 @@ public: }; class SharedCpuMatrix : public CpuMatrix { -#ifndef PADDLE_MOBILE_INFERENCE public: +#ifndef PADDLE_MOBILE_INFERENCE /* blockNum is number of partitions of the matrix */ SharedCpuMatrix(int blockNum, size_t height, size_t width, bool trans = false) : CpuMatrix(height, width, trans) { diff --git a/paddle/parameter/Parameter.cpp b/paddle/parameter/Parameter.cpp index 44fef2a2ad..3b0f09cea6 100644 --- a/paddle/parameter/Parameter.cpp +++ b/paddle/parameter/Parameter.cpp @@ -202,6 +202,7 @@ void Parameter::setMat(ParameterType pType, int matType) { } } #ifndef PADDLE_MOBILE_INFERENCE + // NOLINTNEXTLINE else if (matType == MAT_NORMAL_SHARED) { CHECK_EQ(height * width, bufs_[pType]->getSize()); size_t blockNum = 0; @@ -263,6 +264,7 @@ void Parameter::setMat(ParameterType pType, int matType) { mats_[pType] = std::make_shared(height, width); } #endif + // NOLINTNEXTLINE else { LOG(FATAL) << "Unsupported mat type" << matType; } -- GitLab