提交 c3d04200 编写于 作者: D DannyIsFunny

test=develop

上级 7543cce4
...@@ -154,7 +154,7 @@ class LITE_API Predictor { ...@@ -154,7 +154,7 @@ class LITE_API Predictor {
class CxxPaddleApiImpl : public lite_api::PaddlePredictor { class CxxPaddleApiImpl : public lite_api::PaddlePredictor {
public: public:
CxxPaddleApiImpl() {} CxxPaddleApiImpl() { raw_predictor_ = std::make_shared<Predictor>(); }
explicit CxxPaddleApiImpl(const std::shared_ptr<Predictor>& raw_predictor) explicit CxxPaddleApiImpl(const std::shared_ptr<Predictor>& raw_predictor)
: raw_predictor_(raw_predictor) {} : raw_predictor_(raw_predictor) {}
......
...@@ -80,7 +80,7 @@ std::vector<std::string> CxxPaddleApiImpl::GetInputNames() { ...@@ -80,7 +80,7 @@ std::vector<std::string> CxxPaddleApiImpl::GetInputNames() {
} }
std::vector<std::string> CxxPaddleApiImpl::GetParamNames() { std::vector<std::string> CxxPaddleApiImpl::GetParamNames() {
return raw_predictor_.GetParamNames(); return raw_predictor_->GetParamNames();
} }
std::vector<std::string> CxxPaddleApiImpl::GetOutputNames() { std::vector<std::string> CxxPaddleApiImpl::GetOutputNames() {
...@@ -114,7 +114,7 @@ std::unique_ptr<const lite_api::Tensor> CxxPaddleApiImpl::GetTensor( ...@@ -114,7 +114,7 @@ std::unique_ptr<const lite_api::Tensor> CxxPaddleApiImpl::GetTensor(
std::unique_ptr<lite_api::Tensor> CxxPaddleApiImpl::GetMutableTensor( std::unique_ptr<lite_api::Tensor> CxxPaddleApiImpl::GetMutableTensor(
const std::string &name) { const std::string &name) {
return std::unique_ptr<lite_api::Tensor>( return std::unique_ptr<lite_api::Tensor>(
new lite_api::Tensor(raw_predictor_.GetMutableTensor(name))); new lite_api::Tensor(raw_predictor_->GetMutableTensor(name)));
} }
std::unique_ptr<lite_api::Tensor> CxxPaddleApiImpl::GetInputByName( std::unique_ptr<lite_api::Tensor> CxxPaddleApiImpl::GetInputByName(
......
...@@ -358,6 +358,7 @@ function make_x86 { ...@@ -358,6 +358,7 @@ function make_x86 {
-DLITE_WITH_ARM=OFF \ -DLITE_WITH_ARM=OFF \
-DLITE_WITH_PYTHON=$BUILD_PYTHON \ -DLITE_WITH_PYTHON=$BUILD_PYTHON \
-DWITH_GPU=OFF \ -DWITH_GPU=OFF \
-DLITE_SHUTDOWN_LOG=ON \
-DLITE_WITH_PYTHON=${BUILD_PYTHON} \ -DLITE_WITH_PYTHON=${BUILD_PYTHON} \
-DLITE_BUILD_EXTRA=ON \ -DLITE_BUILD_EXTRA=ON \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册