From 0f8aad2934f88540249da6d7e5c8e8ceeafd60ec Mon Sep 17 00:00:00 2001 From: tensor-tang Date: Tue, 19 Dec 2017 23:06:54 +0800 Subject: [PATCH] fix compile error --- paddle/gserver/layers/MKLPackedGemm.h | 3 ++- paddle/gserver/layers/MKLPackedRecurrentLayer.h | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/paddle/gserver/layers/MKLPackedGemm.h b/paddle/gserver/layers/MKLPackedGemm.h index 3c4c62eeb..91e2515e3 100644 --- a/paddle/gserver/layers/MKLPackedGemm.h +++ b/paddle/gserver/layers/MKLPackedGemm.h @@ -27,7 +27,7 @@ protected: size_t weightWidth_; public: - MKLPackedGemm(MatrixPtr weight) { + explicit MKLPackedGemm(MatrixPtr weight) { weightHeight_ = weight->getHeight(); weightWidth_ = weight->getWidth(); weightPacked_ = @@ -91,4 +91,5 @@ public: cblas_sgemm_free(weightTPacked_); } }; + } // namespace paddle diff --git a/paddle/gserver/layers/MKLPackedRecurrentLayer.h b/paddle/gserver/layers/MKLPackedRecurrentLayer.h index 719137f2d..b8727e0ff 100644 --- a/paddle/gserver/layers/MKLPackedRecurrentLayer.h +++ b/paddle/gserver/layers/MKLPackedRecurrentLayer.h @@ -12,6 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +#pragma once + #include #include "Layer.h" #include "MKLPackedGemm.h" @@ -128,4 +130,5 @@ protected: std::unique_ptr sgemm_packed_; }; -} + +} // namespace paddle -- GitLab