inner_common.h 1.9 KB
Newer Older
W
wangguibao 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// 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
W
wangguibao 已提交
15

W
wangguibao 已提交
16 17
#include <error.h>
#include <getopt.h>
W
wangguibao 已提交
18
#include <pthread.h>
W
wangguibao 已提交
19 20
#include <stdint.h>
#include <stdlib.h>
W
wangguibao 已提交
21
#include <strings.h>
W
wangguibao 已提交
22 23
#include <sys/types.h>
#include <unistd.h>
W
wangguibao 已提交
24

W
wangguibao 已提交
25 26
#include <typeinfo>

W
wangguibao 已提交
27 28 29 30
#include "boost/algorithm/string.hpp"  // for boost::split&trim
#include "boost/function.hpp"
#include "boost/unordered_map.hpp"
#include "google/protobuf/text_format.h"
W
wangguibao 已提交
31

W
wangguibao 已提交
32
#include "gflags/gflags.h"
W
wangguibao 已提交
33

W
wangguibao 已提交
34 35 36 37 38
#ifdef BCLOUD
#include "baidu/rpc/channel.h"
#include "baidu/rpc/policy/giano_authenticator.h"
#include "baidu/rpc/server.h"
#include "base/comlog_sink.h"
W
wangguibao 已提交
39
#include "base/logging.h"
W
wangguibao 已提交
40 41
#include "base/object_pool.h"
#include "base/time.h"
W
wangguibao 已提交
42
#include "bthread.h"  // NOLINT
W
wangguibao 已提交
43
#else
W
wangguibao 已提交
44 45 46
#include "brpc/channel.h"
#include "brpc/policy/giano_authenticator.h"
#include "brpc/server.h"
W
wangguibao 已提交
47
#include "bthread/bthread.h"
W
wangguibao 已提交
48 49 50
#include "butil/logging.h"
#include "butil/object_pool.h"
#include "butil/time.h"
W
wangguibao 已提交
51
#endif
W
wangguibao 已提交
52

W
wangguibao 已提交
53 54
#include "glog/raw_logging.h"

B
barrierye 已提交
55
#include "core/configure/general_model_config.pb.h"
G
guru4elephant 已提交
56 57
#include "core/configure/include/configure_parser.h"
#include "core/configure/server_configure.pb.h"
W
wangguibao 已提交
58

G
guru4elephant 已提交
59 60 61
#include "core/predictor/common/constant.h"
#include "core/predictor/common/types.h"
#include "core/predictor/common/utils.h"
W
wangguibao 已提交
62 63 64 65 66

#ifdef BCLOUD
namespace brpc = baidu::rpc;
namespace butil = base;
#endif