From 899035dcb958f6ba48a6015784defeb297c69ae5 Mon Sep 17 00:00:00 2001 From: liaogang Date: Tue, 20 Jun 2017 16:41:04 +0800 Subject: [PATCH] FIX: Add boost inc dir --- paddle/CMakeLists.txt | 2 +- paddle/function/NaiveConvOp.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/CMakeLists.txt b/paddle/CMakeLists.txt index 22e55d3b3b7..573bd937a35 100644 --- a/paddle/CMakeLists.txt +++ b/paddle/CMakeLists.txt @@ -18,8 +18,8 @@ add_subdirectory(strings) find_package(Boost QUIET) - if(Boost_FOUND) + include_directories(${Boost_INCLUDE_DIRS}) add_subdirectory(platform) add_subdirectory(framework) endif() diff --git a/paddle/function/NaiveConvOp.cpp b/paddle/function/NaiveConvOp.cpp index 70bd196a674..4348f0f775e 100644 --- a/paddle/function/NaiveConvOp.cpp +++ b/paddle/function/NaiveConvOp.cpp @@ -54,8 +54,8 @@ public: T inValue; const int inH = inStartH + fH; const int inW = inStartW + fW; - if ((inH >= 0 && inH < inputHeight) && - (inW >= 0 && inW < inputWidth)) { + if ((inH >= 0 && inH < (int)inputHeight) && + (inW >= 0 && inW < (int)inputWidth)) { size_t offsetInput = batch * inputChannels * inputHeight * inputWidth + inC * inputHeight * inputWidth + inH * inputWidth + inW; -- GitLab