提交 5a938488 编写于 作者: D dangyifei

modify header and ifdefind

上级 982d3e34
# 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
add_subdirectory(cube-server)
add_subdirectory(cube-api)
add_subdirectory(cube-builder)
......@@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_BUILDER_JOB_H_
#define CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_BUILDER_JOB_H_
#pragma once
#include <iostream>
#include <string>
......@@ -56,5 +55,3 @@ class Job {
void mapFileLocal(Job job,
string file,
vector<CROVLBuilderIncremental*> reduces);
#endif // CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_BUILDER_JOB_H_
......@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_CROVL_BUILDER_INCREMENT_H_
#define CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_CROVL_BUILDER_INCREMENT_H_
#pragma once
#include <string>
#include <vector>
......@@ -111,5 +111,3 @@ class CROVLBuilderIncremental {
bool write_cur_meta_to_local();
};
#endif // CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_CROVL_BUILDER_INCREMENT_H_
......@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_CURL_SIMPLE_H_
#define CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_CURL_SIMPLE_H_
#pragma once
#include <curl/curl.h>
#include <stdio.h>
#include <map>
......@@ -67,5 +67,3 @@ class CurlSimple {
private:
CURL *_p_curl;
};
#endif // CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_CURL_SIMPLE_H_
......@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_DEFINE_H_
#define CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_DEFINE_H_
#pragma once
#include <iostream>
#include <string>
#include <vector>
......@@ -60,5 +60,4 @@ class RecordReader {
virtual int next(Record* record) = 0;
virtual int close() = 0;
}; // class RecordReader
#endif // CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_DEFINE_H_
}; // class RecordReader
......@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_RAW_READER_H_
#define CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_RAW_READER_H_
#pragma once
#include <fstream>
#include <string>
#include "butil/logging.h"
......@@ -122,4 +122,3 @@ class FileRawReader : public RawReader {
std::string _path{""};
std::ifstream _reader;
};
#endif // CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_RAW_READER_H_
......@@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_SEQFILE_READER_H_
#define CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_SEQFILE_READER_H_
#pragma once
#include <memory>
#include <string>
......@@ -44,4 +43,3 @@ class SequenceFileRecordReader : public RecordReader {
};
typedef std::shared_ptr<SequenceFileRecordReader> SequenceFileRecordReaderPtr;
#endif // CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_SEQFILE_READER_H_
......@@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_UTIL_H_
#define CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_UTIL_H_
#pragma once
#include <iostream>
#include <string>
......@@ -30,5 +29,3 @@ bool checkDirectory(const std::string folder);
void CmdTarfiles(const std::string folder);
void CmdMd5sum(const std::string folder);
#endif // CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_UTIL_H_
......@@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_VTEXT_H_
#define CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_VTEXT_H_
#pragma once
#include <string>
#include "cube-builder/define.h"
......@@ -86,5 +85,3 @@ class VString {
return true;
}
};
#endif // CUBE_CUBE_BUILDER_INCLUDE_CUBE_BUILDER_VTEXT_H_
......@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "../include/cube-builder/builder_job.h"
#include "cube-builder/builder_job.h"
#include <stdio.h>
#include <iostream>
#include "../include/cube-builder/seqfile_reader.h"
#include "../include/cube-builder/util.h"
#include "butil/logging.h"
#include "cube-builder/seqfile_reader.h"
#include "cube-builder/util.h"
using std::string;
void Job::set_shard_num(int num) { shard_num = num; }
......
......@@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "../include/cube-builder/crovl_builder_increment.h"
#include "cube-builder/crovl_builder_increment.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <fstream>
#include <iostream>
#include "../include/cube-builder/curl_simple.h"
#include "../include/cube-builder/define.h"
#include "../include/cube-builder/util.h"
#include "boost/lexical_cast.hpp"
#include "cube-builder/curl_simple.h"
#include "cube-builder/define.h"
#include "cube-builder/util.h"
#include "json/json.h"
static const uint64_t MB = 1048576;
......
......@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "../include/cube-builder/curl_simple.h"
#include "cube-builder/curl_simple.h"
#include <json/json.h>
#include <stdio.h>
#include <stdlib.h>
......
......@@ -16,10 +16,10 @@
#include <time.h>
#include <iostream>
#include <vector>
#include "../include/cube-builder/builder_job.h"
#include "../include/cube-builder/crovl_builder_increment.h"
#include "../include/cube-builder/util.h"
#include "butil/logging.h"
#include "cube-builder/builder_job.h"
#include "cube-builder/crovl_builder_increment.h"
#include "cube-builder/util.h"
DEFINE_string(dict_name, "", "dict name, no need");
DEFINE_string(input_path, "", "source data input path");
......
......@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "../include/cube-builder/seqfile_reader.h"
#include "cube-builder/seqfile_reader.h"
#include <arpa/inet.h>
#include "../include/cube-builder/vtext.h"
#include "butil/logging.h"
#include "cube-builder/vtext.h"
int SequenceFileRecordReader::open() {
if (_raw_reader->open() != 0) {
......
......@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "../include/cube-builder/util.h"
#include "cube-builder/util.h"
#include <dirent.h>
#include <stdlib.h>
#include <string.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册