Skip to content

Commit

Permalink
Revert "re-order includes (fixes #3132) (#3133)" (#3153)
Browse files Browse the repository at this point in the history
This reverts commit 656d267.
  • Loading branch information
StrikerRUS authored and ChipKerchner committed Jun 11, 2020
1 parent 40ef50c commit 02b3256
Show file tree
Hide file tree
Showing 77 changed files with 270 additions and 293 deletions.
14 changes: 7 additions & 7 deletions R-package/src/lightgbm_R.cpp
Expand Up @@ -5,20 +5,20 @@

#include "lightgbm_R.h"

#include <string>
#include <cstdio>
#include <cstring>
#include <memory>
#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>

#include <string>
#include <cstdio>
#include <cstring>
#include <memory>
#include <utility>
#include <vector>

#define COL_MAJOR (0)

#define R_API_BEGIN() \
Expand Down
6 changes: 3 additions & 3 deletions include/LightGBM/application.h
Expand Up @@ -5,12 +5,12 @@
#ifndef LIGHTGBM_APPLICATION_H_
#define LIGHTGBM_APPLICATION_H_

#include <memory>
#include <vector>

#include <LightGBM/config.h>
#include <LightGBM/meta.h>

#include <memory>
#include <vector>

namespace LightGBM {

class DatasetLoader;
Expand Down
8 changes: 4 additions & 4 deletions include/LightGBM/bin.h
Expand Up @@ -5,17 +5,17 @@
#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>
#include <sstream>
#include <unordered_map>
#include <vector>

#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/file_io.h>

namespace LightGBM {

enum BinType {
Expand Down
6 changes: 3 additions & 3 deletions include/LightGBM/boosting.h
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions include/LightGBM/c_api.h
Expand Up @@ -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. */
Expand Down
10 changes: 5 additions & 5 deletions include/LightGBM/config.h
Expand Up @@ -11,18 +11,18 @@
#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>
#include <unordered_map>
#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 */
Expand Down
14 changes: 7 additions & 7 deletions include/LightGBM/dataset.h
Expand Up @@ -5,6 +5,13 @@
#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>
Expand All @@ -13,13 +20,6 @@
#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 */
Expand Down
4 changes: 2 additions & 2 deletions include/LightGBM/dataset_loader.h
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions include/LightGBM/feature_group.h
Expand Up @@ -5,14 +5,14 @@
#ifndef LIGHTGBM_FEATURE_GROUP_H_
#define LIGHTGBM_FEATURE_GROUP_H_

#include <cstdio>
#include <memory>
#include <vector>

#include <LightGBM/bin.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/random.h>

#include <cstdio>
#include <memory>
#include <vector>

namespace LightGBM {

class Dataset;
Expand Down
6 changes: 3 additions & 3 deletions include/LightGBM/metric.h
Expand Up @@ -5,16 +5,16 @@
#ifndef LIGHTGBM_METRIC_H_
#define LIGHTGBM_METRIC_H_

#include <string>
#include <vector>

#include <LightGBM/config.h>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/common.h>

#include <string>
#include <vector>

namespace LightGBM {

/*!
Expand Down
8 changes: 4 additions & 4 deletions include/LightGBM/network.h
Expand Up @@ -5,14 +5,14 @@
#ifndef LIGHTGBM_NETWORK_H_
#define LIGHTGBM_NETWORK_H_

#include <functional>
#include <memory>
#include <vector>

#include <LightGBM/config.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/log.h>

#include <functional>
#include <memory>
#include <vector>

namespace LightGBM {

/*! \brief forward declaration */
Expand Down
6 changes: 3 additions & 3 deletions include/LightGBM/objective_function.h
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions include/LightGBM/prediction_early_stop.h
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions include/LightGBM/tree.h
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions include/LightGBM/tree_learner.h
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions include/LightGBM/utils/array_args.h
Expand Up @@ -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 {

/*!
Expand Down
3 changes: 3 additions & 0 deletions include/LightGBM/utils/common.h
Expand Up @@ -5,6 +5,9 @@
#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>
Expand Down
8 changes: 4 additions & 4 deletions include/LightGBM/utils/openmp_wrapper.h
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions include/LightGBM/utils/pipeline_reader.h
Expand Up @@ -5,6 +5,9 @@
#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>
Expand All @@ -13,9 +16,6 @@
#include <utility>
#include <vector>

#include <LightGBM/utils/file_io.h>
#include <LightGBM/utils/log.h>

namespace LightGBM {

/*!
Expand Down
8 changes: 4 additions & 4 deletions include/LightGBM/utils/text_reader.h
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions include/LightGBM/utils/threading.h
Expand Up @@ -6,14 +6,14 @@
#ifndef LIGHTGBM_UTILS_THREADING_H_
#define LIGHTGBM_UTILS_THREADING_H_

#include <algorithm>
#include <functional>
#include <vector>

#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/openmp_wrapper.h>

#include <algorithm>
#include <functional>
#include <vector>

namespace LightGBM {

class Threading {
Expand Down

0 comments on commit 02b3256

Please sign in to comment.