"include/vscode:/vscode.git/clone" did not exist on "dcd6693f5b931044dd88a8573ca7c014f51cc405"
Unverified Commit ac5f5e56 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

Revert "re-order includes (fixes #3132) (#3133)" (#3153)

This reverts commit 656d2676.
parent 675b552d
...@@ -5,13 +5,6 @@ ...@@ -5,13 +5,6 @@
#include "lightgbm_R.h" #include "lightgbm_R.h"
#include <string>
#include <cstdio>
#include <cstring>
#include <memory>
#include <utility>
#include <vector>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/utils/openmp_wrapper.h>
...@@ -19,6 +12,13 @@ ...@@ -19,6 +12,13 @@
#include <R_ext/Rdynload.h> #include <R_ext/Rdynload.h>
#include <string>
#include <cstdio>
#include <cstring>
#include <memory>
#include <utility>
#include <vector>
#define COL_MAJOR (0) #define COL_MAJOR (0)
#define R_API_BEGIN() \ #define R_API_BEGIN() \
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
#ifndef LIGHTGBM_APPLICATION_H_ #ifndef LIGHTGBM_APPLICATION_H_
#define LIGHTGBM_APPLICATION_H_ #define LIGHTGBM_APPLICATION_H_
#include <memory>
#include <vector>
#include <LightGBM/config.h> #include <LightGBM/config.h>
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
#include <memory>
#include <vector>
namespace LightGBM { namespace LightGBM {
class DatasetLoader; class DatasetLoader;
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
#ifndef LIGHTGBM_BIN_H_ #ifndef LIGHTGBM_BIN_H_
#define 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 <limits>
#include <string> #include <string>
#include <functional> #include <functional>
...@@ -12,10 +16,6 @@ ...@@ -12,10 +16,6 @@
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/file_io.h>
namespace LightGBM { namespace LightGBM {
enum BinType { enum BinType {
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_BOOSTING_H_ #ifndef LIGHTGBM_BOOSTING_H_
#define LIGHTGBM_BOOSTING_H_ #define LIGHTGBM_BOOSTING_H_
#include <LightGBM/config.h>
#include <LightGBM/meta.h>
#include <string> #include <string>
#include <map> #include <map>
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <LightGBM/config.h>
#include <LightGBM/meta.h>
namespace LightGBM { namespace LightGBM {
/*! \brief forward declaration */ /*! \brief forward declaration */
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
#ifndef LIGHTGBM_C_API_H_ #ifndef LIGHTGBM_C_API_H_
#define LIGHTGBM_C_API_H_ #define LIGHTGBM_C_API_H_
#include <LightGBM/export.h>
#include <cstdint> #include <cstdint>
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
#include <LightGBM/export.h>
typedef void* DatasetHandle; /*!< \brief Handle of dataset. */ typedef void* DatasetHandle; /*!< \brief Handle of dataset. */
typedef void* BoosterHandle; /*!< \brief Handle of booster. */ typedef void* BoosterHandle; /*!< \brief Handle of booster. */
......
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
#ifndef LIGHTGBM_CONFIG_H_ #ifndef LIGHTGBM_CONFIG_H_
#define 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 <string>
#include <algorithm> #include <algorithm>
#include <memory> #include <memory>
...@@ -18,11 +23,6 @@ ...@@ -18,11 +23,6 @@
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
#include <LightGBM/export.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
namespace LightGBM { namespace LightGBM {
/*! \brief Types of tasks */ /*! \brief Types of tasks */
......
...@@ -5,6 +5,13 @@ ...@@ -5,6 +5,13 @@
#ifndef LIGHTGBM_DATASET_H_ #ifndef LIGHTGBM_DATASET_H_
#define 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 <string>
#include <functional> #include <functional>
#include <memory> #include <memory>
...@@ -13,13 +20,6 @@ ...@@ -13,13 +20,6 @@
#include <utility> #include <utility>
#include <vector> #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 { namespace LightGBM {
/*! \brief forward declaration */ /*! \brief forward declaration */
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
#ifndef LIGHTGBM_DATASET_LOADER_H_ #ifndef LIGHTGBM_DATASET_LOADER_H_
#define LIGHTGBM_DATASET_LOADER_H_ #define LIGHTGBM_DATASET_LOADER_H_
#include <LightGBM/dataset.h>
#include <string> #include <string>
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
#include <LightGBM/dataset.h>
namespace LightGBM { namespace LightGBM {
class DatasetLoader { class DatasetLoader {
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_FEATURE_GROUP_H_ #ifndef LIGHTGBM_FEATURE_GROUP_H_
#define LIGHTGBM_FEATURE_GROUP_H_ #define LIGHTGBM_FEATURE_GROUP_H_
#include <cstdio>
#include <memory>
#include <vector>
#include <LightGBM/bin.h> #include <LightGBM/bin.h>
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
#include <LightGBM/utils/random.h> #include <LightGBM/utils/random.h>
#include <cstdio>
#include <memory>
#include <vector>
namespace LightGBM { namespace LightGBM {
class Dataset; class Dataset;
......
...@@ -5,9 +5,6 @@ ...@@ -5,9 +5,6 @@
#ifndef LIGHTGBM_METRIC_H_ #ifndef LIGHTGBM_METRIC_H_
#define LIGHTGBM_METRIC_H_ #define LIGHTGBM_METRIC_H_
#include <string>
#include <vector>
#include <LightGBM/config.h> #include <LightGBM/config.h>
#include <LightGBM/dataset.h> #include <LightGBM/dataset.h>
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
...@@ -15,6 +12,9 @@ ...@@ -15,6 +12,9 @@
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
#include <LightGBM/utils/common.h> #include <LightGBM/utils/common.h>
#include <string>
#include <vector>
namespace LightGBM { namespace LightGBM {
/*! /*!
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_NETWORK_H_ #ifndef LIGHTGBM_NETWORK_H_
#define LIGHTGBM_NETWORK_H_ #define LIGHTGBM_NETWORK_H_
#include <functional>
#include <memory>
#include <vector>
#include <LightGBM/config.h> #include <LightGBM/config.h>
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
#include <LightGBM/utils/log.h> #include <LightGBM/utils/log.h>
#include <functional>
#include <memory>
#include <vector>
namespace LightGBM { namespace LightGBM {
/*! \brief forward declaration */ /*! \brief forward declaration */
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
#ifndef LIGHTGBM_OBJECTIVE_FUNCTION_H_ #ifndef LIGHTGBM_OBJECTIVE_FUNCTION_H_
#define LIGHTGBM_OBJECTIVE_FUNCTION_H_ #define LIGHTGBM_OBJECTIVE_FUNCTION_H_
#include <string>
#include <functional>
#include <LightGBM/config.h> #include <LightGBM/config.h>
#include <LightGBM/dataset.h> #include <LightGBM/dataset.h>
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
#include <string>
#include <functional>
namespace LightGBM { namespace LightGBM {
/*! /*!
* \brief The interface of Objective Function. * \brief The interface of Objective Function.
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
#ifndef LIGHTGBM_PREDICTION_EARLY_STOP_H_ #ifndef LIGHTGBM_PREDICTION_EARLY_STOP_H_
#define LIGHTGBM_PREDICTION_EARLY_STOP_H_ #define LIGHTGBM_PREDICTION_EARLY_STOP_H_
#include <LightGBM/export.h>
#include <string> #include <string>
#include <functional> #include <functional>
#include <LightGBM/export.h>
namespace LightGBM { namespace LightGBM {
struct PredictionEarlyStopInstance { struct PredictionEarlyStopInstance {
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
#ifndef LIGHTGBM_TREE_H_ #ifndef LIGHTGBM_TREE_H_
#define LIGHTGBM_TREE_H_ #define LIGHTGBM_TREE_H_
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <string> #include <string>
#include <map> #include <map>
#include <memory> #include <memory>
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
namespace LightGBM { namespace LightGBM {
#define kCategoricalMask (1) #define kCategoricalMask (1)
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
#ifndef LIGHTGBM_TREE_LEARNER_H_ #ifndef LIGHTGBM_TREE_LEARNER_H_
#define LIGHTGBM_TREE_LEARNER_H_ #define LIGHTGBM_TREE_LEARNER_H_
#include <string>
#include <vector>
#include <LightGBM/config.h> #include <LightGBM/config.h>
#include <LightGBM/meta.h> #include <LightGBM/meta.h>
#include <LightGBM/utils/json11.h> #include <LightGBM/utils/json11.h>
#include <string>
#include <vector>
namespace LightGBM { namespace LightGBM {
using json11::Json; using json11::Json;
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
#ifndef LIGHTGBM_UTILS_ARRAY_AGRS_H_ #ifndef LIGHTGBM_UTILS_ARRAY_AGRS_H_
#define 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 <algorithm>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/threading.h>
namespace LightGBM { namespace LightGBM {
/*! /*!
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
#ifndef LIGHTGBM_UTILS_COMMON_FUN_H_ #ifndef LIGHTGBM_UTILS_COMMON_FUN_H_
#define 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 <limits>
#include <string> #include <string>
#include <algorithm> #include <algorithm>
...@@ -23,9 +26,6 @@ ...@@ -23,9 +26,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
#if defined(_MSC_VER) #if defined(_MSC_VER)
#include <malloc.h> #include <malloc.h>
#elif MM_MALLOC #elif MM_MALLOC
......
...@@ -6,16 +6,16 @@ ...@@ -6,16 +6,16 @@
#define LIGHTGBM_OPENMP_WRAPPER_H_ #define LIGHTGBM_OPENMP_WRAPPER_H_
#ifdef _OPENMP #ifdef _OPENMP
#include <LightGBM/utils/log.h>
#include <omp.h>
#include <exception> #include <exception>
#include <memory> #include <memory>
#include <mutex> #include <mutex>
#include <stdexcept> #include <stdexcept>
#include <vector> #include <vector>
#include <omp.h>
#include <LightGBM/utils/log.h>
inline int OMP_NUM_THREADS() { inline int OMP_NUM_THREADS() {
int ret = 1; int ret = 1;
#pragma omp parallel #pragma omp parallel
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
#ifndef LIGHTGBM_UTILS_PIPELINE_READER_H_ #ifndef LIGHTGBM_UTILS_PIPELINE_READER_H_
#define 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 <algorithm>
#include <cstdio> #include <cstdio>
#include <functional> #include <functional>
...@@ -13,9 +16,6 @@ ...@@ -13,9 +16,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <LightGBM/utils/file_io.h>
#include <LightGBM/utils/log.h>
namespace LightGBM { namespace LightGBM {
/*! /*!
......
...@@ -5,16 +5,16 @@ ...@@ -5,16 +5,16 @@
#ifndef LIGHTGBM_UTILS_TEXT_READER_H_ #ifndef LIGHTGBM_UTILS_TEXT_READER_H_
#define 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 <string>
#include <cstdio> #include <cstdio>
#include <functional> #include <functional>
#include <sstream> #include <sstream>
#include <vector> #include <vector>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/pipeline_reader.h>
#include <LightGBM/utils/random.h>
namespace LightGBM { namespace LightGBM {
const size_t kGbs = size_t(1024) * 1024 * 1024; 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