Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Reorder includes. (#5749)" #5771

Merged
merged 1 commit into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions R-package/src/xgboost_R.cc
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
// Copyright (c) 2014 by Contributors
#include <cstring>
#include <cstdio>
#include <dmlc/logging.h>
#include <dmlc/omp.h>
#include <xgboost/c_api.h>
#include <vector>
#include <string>
#include <utility>
#include <cstring>
#include <cstdio>
#include <sstream>

#include <dmlc/logging.h>
#include <dmlc/omp.h>
#include <xgboost/c_api.h>

#include "xgboost_R.h"

#include "./xgboost_R.h"

/*!
* \brief macro to annotate begin of api
Expand Down
5 changes: 2 additions & 3 deletions include/xgboost/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
#ifndef XGBOOST_BASE_H_
#define XGBOOST_BASE_H_

#include <dmlc/base.h>
#include <dmlc/omp.h>
#include <cmath>
#include <iostream>
#include <vector>
#include <string>
#include <utility>

#include <dmlc/base.h>
#include <dmlc/omp.h>

/*!
* \brief string flag for R library, to leave hooks when needed.
*/
Expand Down
14 changes: 7 additions & 7 deletions include/xgboost/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
#ifndef XGBOOST_DATA_H_
#define XGBOOST_DATA_H_

#include <memory>
#include <numeric>
#include <algorithm>
#include <string>
#include <utility>
#include <vector>

#include <dmlc/base.h>
#include <dmlc/data.h>
#include <dmlc/serializer.h>
Expand All @@ -22,6 +15,13 @@
#include <xgboost/span.h>
#include <xgboost/host_device_vector.h>

#include <memory>
#include <numeric>
#include <algorithm>
#include <string>
#include <utility>
#include <vector>

namespace xgboost {
// forward declare dmatrix.
class DMatrix;
Expand Down
4 changes: 2 additions & 2 deletions include/xgboost/feature_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
#ifndef XGBOOST_FEATURE_MAP_H_
#define XGBOOST_FEATURE_MAP_H_

#include <xgboost/logging.h>

#include <vector>
#include <string>
#include <cstring>
#include <iostream>

#include <xgboost/logging.h>

namespace xgboost {
/*!
* \brief Feature map data structure to help text model dump.
Expand Down
14 changes: 7 additions & 7 deletions include/xgboost/gbm.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
#ifndef XGBOOST_GBM_H_
#define XGBOOST_GBM_H_

#include <vector>
#include <utility>
#include <string>
#include <functional>
#include <unordered_map>
#include <memory>

#include <dmlc/registry.h>
#include <dmlc/any.h>
#include <xgboost/base.h>
#include <xgboost/data.h>
#include <xgboost/host_device_vector.h>
#include <xgboost/model.h>

#include <vector>
#include <utility>
#include <string>
#include <functional>
#include <unordered_map>
#include <memory>

namespace xgboost {

class Json;
Expand Down
4 changes: 2 additions & 2 deletions include/xgboost/generic_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#ifndef XGBOOST_GENERIC_PARAMETERS_H_
#define XGBOOST_GENERIC_PARAMETERS_H_

#include <string>

#include <xgboost/logging.h>
#include <xgboost/parameter.h>

#include <string>

namespace xgboost {
struct GenericParameter : public XGBoostParameter<GenericParameter> {
// Constant representing the device ID of CPU.
Expand Down
8 changes: 4 additions & 4 deletions include/xgboost/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#ifndef XGBOOST_JSON_H_
#define XGBOOST_JSON_H_

#include <xgboost/logging.h>
#include <xgboost/parameter.h>
#include <string>

#include <map>
#include <memory>
#include <vector>
#include <functional>
#include <utility>
#include <string>

#include <xgboost/logging.h>
#include <xgboost/parameter.h>

namespace xgboost {

Expand Down
3 changes: 1 addition & 2 deletions include/xgboost/json_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
#ifndef XGBOOST_JSON_IO_H_
#define XGBOOST_JSON_IO_H_
#include <xgboost/json.h>

#include <memory>
#include <string>
Expand All @@ -13,8 +14,6 @@
#include <sstream>
#include <locale>

#include <xgboost/json.h>

namespace xgboost {

template <typename Allocator>
Expand Down
12 changes: 6 additions & 6 deletions include/xgboost/learner.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
#ifndef XGBOOST_LEARNER_H_
#define XGBOOST_LEARNER_H_

#include <utility>
#include <map>
#include <memory>
#include <string>
#include <vector>

#include <dmlc/any.h>
#include <rabit/rabit.h>
#include <xgboost/base.h>
Expand All @@ -23,6 +17,12 @@
#include <xgboost/host_device_vector.h>
#include <xgboost/model.h>

#include <utility>
#include <map>
#include <memory>
#include <string>
#include <vector>

namespace xgboost {

class Metric;
Expand Down
11 changes: 6 additions & 5 deletions include/xgboost/linear_updater.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
*/
#pragma once

#include <functional>
#include <string>
#include <utility>
#include <vector>

#include <dmlc/registry.h>
#include <xgboost/base.h>
#include <xgboost/data.h>
#include <xgboost/generic_parameters.h>
#include <xgboost/host_device_vector.h>
#include <xgboost/model.h>

#include <functional>
#include <string>
#include <utility>
#include <vector>


namespace xgboost {

class Json;
Expand Down
12 changes: 6 additions & 6 deletions include/xgboost/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
#ifndef XGBOOST_LOGGING_H_
#define XGBOOST_LOGGING_H_

#include <sstream>
#include <map>
#include <string>
#include <utility>
#include <vector>

#include <dmlc/logging.h>
#include <dmlc/thread_local.h>

#include <xgboost/base.h>
#include <xgboost/parameter.h>

#include <sstream>
#include <map>
#include <string>
#include <utility>
#include <vector>

namespace xgboost {

class BaseLogger {
Expand Down
10 changes: 5 additions & 5 deletions include/xgboost/metric.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
#ifndef XGBOOST_METRIC_H_
#define XGBOOST_METRIC_H_

#include <vector>
#include <string>
#include <functional>
#include <utility>

#include <dmlc/registry.h>
#include <xgboost/model.h>
#include <xgboost/generic_parameters.h>
#include <xgboost/data.h>
#include <xgboost/base.h>
#include <xgboost/host_device_vector.h>

#include <vector>
#include <string>
#include <functional>
#include <utility>

namespace xgboost {
/*!
* \brief interface of evaluation metric used to evaluate model performance.
Expand Down
10 changes: 5 additions & 5 deletions include/xgboost/objective.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
#ifndef XGBOOST_OBJECTIVE_H_
#define XGBOOST_OBJECTIVE_H_

#include <vector>
#include <utility>
#include <string>
#include <functional>

#include <dmlc/registry.h>
#include <xgboost/base.h>
#include <xgboost/data.h>
#include <xgboost/model.h>
#include <xgboost/generic_parameters.h>
#include <xgboost/host_device_vector.h>

#include <vector>
#include <utility>
#include <string>
#include <functional>

namespace xgboost {

/*! \brief interface of objective function */
Expand Down
5 changes: 2 additions & 3 deletions include/xgboost/parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
#ifndef XGBOOST_PARAMETER_H_
#define XGBOOST_PARAMETER_H_

#include <string>
#include <type_traits>

#include <dmlc/parameter.h>
#include <xgboost/base.h>
#include <string>
#include <type_traits>

/*!
* \brief Specialization of FieldEntry for enum class (backed by int)
Expand Down
9 changes: 4 additions & 5 deletions include/xgboost/predictor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* performs predictions for a gradient booster.
*/
#pragma once
#include <xgboost/base.h>
#include <xgboost/data.h>
#include <xgboost/generic_parameters.h>
#include <xgboost/host_device_vector.h>

#include <functional>
#include <memory>
Expand All @@ -14,11 +18,6 @@
#include <vector>
#include <mutex>

#include <xgboost/base.h>
#include <xgboost/data.h>
#include <xgboost/generic_parameters.h>
#include <xgboost/host_device_vector.h>

// Forward declarations
namespace xgboost {
class TreeUpdater;
Expand Down
6 changes: 3 additions & 3 deletions include/xgboost/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
#ifndef XGBOOST_SPAN_H_
#define XGBOOST_SPAN_H_

#include <xgboost/base.h>
#include <xgboost/logging.h>

#include <cinttypes> // size_t
#include <limits> // numeric_limits
#include <iterator>
#include <type_traits>
#include <cstdio>

#include <xgboost/base.h>
#include <xgboost/logging.h>

/*!
* The version number 1910 is picked up from GSL.
*
Expand Down
16 changes: 8 additions & 8 deletions include/xgboost/tree_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@
#ifndef XGBOOST_TREE_MODEL_H_
#define XGBOOST_TREE_MODEL_H_

#include <limits>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <tuple>
#include <stack>

#include <dmlc/io.h>
#include <dmlc/parameter.h>

Expand All @@ -24,6 +16,14 @@
#include <xgboost/feature_map.h>
#include <xgboost/model.h>

#include <limits>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <tuple>
#include <stack>

namespace xgboost {

struct PathElement; // forward declaration
Expand Down
10 changes: 5 additions & 5 deletions include/xgboost/tree_updater.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
#ifndef XGBOOST_TREE_UPDATER_H_
#define XGBOOST_TREE_UPDATER_H_

#include <functional>
#include <vector>
#include <utility>
#include <string>

#include <dmlc/registry.h>
#include <xgboost/base.h>
#include <xgboost/data.h>
Expand All @@ -21,6 +16,11 @@
#include <xgboost/host_device_vector.h>
#include <xgboost/model.h>

#include <functional>
#include <vector>
#include <utility>
#include <string>

namespace xgboost {

class Json;
Expand Down
Loading