Unverified Commit 656d2676 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

re-order includes (fixes #3132) (#3133)

parent f82e943c
......@@ -5,13 +5,6 @@
#include "lightgbm_R.h"
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
#include <R_ext/Rdynload.h>
#include <string>
#include <cstdio>
#include <cstring>
......@@ -19,6 +12,13 @@
#include <utility>
#include <vector>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
#include <R_ext/Rdynload.h>
#define COL_MAJOR (0)
#define R_API_BEGIN() \
......
......@@ -5,12 +5,12 @@
#ifndef LIGHTGBM_APPLICATION_H_
#define LIGHTGBM_APPLICATION_H_
#include <LightGBM/config.h>
#include <LightGBM/meta.h>
#include <memory>
#include <vector>
#include <LightGBM/config.h>
#include <LightGBM/meta.h>
namespace LightGBM {
class DatasetLoader;
......
......@@ -5,10 +5,6 @@
#ifndef LIGHTGBM_BIN_H_
#define LIGHTGBM_BIN_H_
#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/file_io.h>
#include <limits>
#include <string>
#include <functional>
......@@ -16,6 +12,10 @@
#include <unordered_map>
#include <vector>
#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/file_io.h>
namespace LightGBM {
enum BinType {
......
......@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_BOOSTING_H_
#define LIGHTGBM_BOOSTING_H_
#include <LightGBM/config.h>
#include <LightGBM/meta.h>
#include <string>
#include <map>
#include <unordered_map>
#include <vector>
#include <LightGBM/config.h>
#include <LightGBM/meta.h>
namespace LightGBM {
/*! \brief forward declaration */
......
......@@ -13,12 +13,12 @@
#ifndef LIGHTGBM_C_API_H_
#define LIGHTGBM_C_API_H_
#include <LightGBM/export.h>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <LightGBM/export.h>
typedef void* DatasetHandle; /*!< \brief Handle of dataset. */
typedef void* BoosterHandle; /*!< \brief Handle of booster. */
......
......@@ -11,11 +11,6 @@
#ifndef LIGHTGBM_CONFIG_H_
#define LIGHTGBM_CONFIG_H_
#include <LightGBM/export.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
#include <string>
#include <algorithm>
#include <memory>
......@@ -23,6 +18,11 @@
#include <unordered_set>
#include <vector>
#include <LightGBM/export.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
namespace LightGBM {
/*! \brief Types of tasks */
......
......@@ -5,13 +5,6 @@
#ifndef LIGHTGBM_DATASET_H_
#define LIGHTGBM_DATASET_H_
#include <LightGBM/config.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/random.h>
#include <LightGBM/utils/text_reader.h>
#include <string>
#include <functional>
#include <memory>
......@@ -20,6 +13,13 @@
#include <utility>
#include <vector>
#include <LightGBM/config.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/random.h>
#include <LightGBM/utils/text_reader.h>
namespace LightGBM {
/*! \brief forward declaration */
......
......@@ -5,12 +5,12 @@
#ifndef LIGHTGBM_DATASET_LOADER_H_
#define LIGHTGBM_DATASET_LOADER_H_
#include <LightGBM/dataset.h>
#include <string>
#include <unordered_set>
#include <vector>
#include <LightGBM/dataset.h>
namespace LightGBM {
class DatasetLoader {
......
......@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_FEATURE_GROUP_H_
#define LIGHTGBM_FEATURE_GROUP_H_
#include <LightGBM/bin.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/random.h>
#include <cstdio>
#include <memory>
#include <vector>
#include <LightGBM/bin.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/random.h>
namespace LightGBM {
class Dataset;
......
......@@ -5,6 +5,9 @@
#ifndef LIGHTGBM_METRIC_H_
#define LIGHTGBM_METRIC_H_
#include <string>
#include <vector>
#include <LightGBM/config.h>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
......@@ -12,9 +15,6 @@
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/common.h>
#include <string>
#include <vector>
namespace LightGBM {
/*!
......
......@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_NETWORK_H_
#define LIGHTGBM_NETWORK_H_
#include <LightGBM/config.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/log.h>
#include <functional>
#include <memory>
#include <vector>
#include <LightGBM/config.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/log.h>
namespace LightGBM {
/*! \brief forward declaration */
......
......@@ -5,13 +5,13 @@
#ifndef LIGHTGBM_OBJECTIVE_FUNCTION_H_
#define LIGHTGBM_OBJECTIVE_FUNCTION_H_
#include <string>
#include <functional>
#include <LightGBM/config.h>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <string>
#include <functional>
namespace LightGBM {
/*!
* \brief The interface of Objective Function.
......
......@@ -5,11 +5,11 @@
#ifndef LIGHTGBM_PREDICTION_EARLY_STOP_H_
#define LIGHTGBM_PREDICTION_EARLY_STOP_H_
#include <LightGBM/export.h>
#include <string>
#include <functional>
#include <LightGBM/export.h>
namespace LightGBM {
struct PredictionEarlyStopInstance {
......
......@@ -5,15 +5,15 @@
#ifndef LIGHTGBM_TREE_H_
#define LIGHTGBM_TREE_H_
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <string>
#include <map>
#include <memory>
#include <unordered_map>
#include <vector>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
namespace LightGBM {
#define kCategoricalMask (1)
......
......@@ -5,13 +5,13 @@
#ifndef LIGHTGBM_TREE_LEARNER_H_
#define LIGHTGBM_TREE_LEARNER_H_
#include <string>
#include <vector>
#include <LightGBM/config.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/json11.h>
#include <string>
#include <vector>
namespace LightGBM {
using json11::Json;
......
......@@ -5,13 +5,13 @@
#ifndef LIGHTGBM_UTILS_ARRAY_AGRS_H_
#define LIGHTGBM_UTILS_ARRAY_AGRS_H_
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/threading.h>
#include <algorithm>
#include <utility>
#include <vector>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/threading.h>
namespace LightGBM {
/*!
......
......@@ -5,9 +5,6 @@
#ifndef LIGHTGBM_UTILS_COMMON_FUN_H_
#define LIGHTGBM_UTILS_COMMON_FUN_H_
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <limits>
#include <string>
#include <algorithm>
......@@ -26,6 +23,9 @@
#include <utility>
#include <vector>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
#if defined(_MSC_VER)
#include <malloc.h>
#elif MM_MALLOC
......
......@@ -6,16 +6,16 @@
#define LIGHTGBM_OPENMP_WRAPPER_H_
#ifdef _OPENMP
#include <LightGBM/utils/log.h>
#include <omp.h>
#include <exception>
#include <memory>
#include <mutex>
#include <stdexcept>
#include <vector>
#include <omp.h>
#include <LightGBM/utils/log.h>
inline int OMP_NUM_THREADS() {
int ret = 1;
#pragma omp parallel
......
......@@ -5,9 +5,6 @@
#ifndef LIGHTGBM_UTILS_PIPELINE_READER_H_
#define LIGHTGBM_UTILS_PIPELINE_READER_H_
#include <LightGBM/utils/file_io.h>
#include <LightGBM/utils/log.h>
#include <algorithm>
#include <cstdio>
#include <functional>
......@@ -16,6 +13,9 @@
#include <utility>
#include <vector>
#include <LightGBM/utils/file_io.h>
#include <LightGBM/utils/log.h>
namespace LightGBM {
/*!
......
......@@ -5,16 +5,16 @@
#ifndef LIGHTGBM_UTILS_TEXT_READER_H_
#define LIGHTGBM_UTILS_TEXT_READER_H_
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/pipeline_reader.h>
#include <LightGBM/utils/random.h>
#include <string>
#include <cstdio>
#include <functional>
#include <sstream>
#include <vector>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/pipeline_reader.h>
#include <LightGBM/utils/random.h>
namespace LightGBM {
const size_t kGbs = size_t(1024) * 1024 * 1024;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment