Skip to content

Commit d3a0efb

Browse files
authored
Reorder includes. (dmlc#5749)
* Reorder includes. * R.
1 parent cd3d14a commit d3a0efb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+293
-263
lines changed

R-package/src/xgboost_R.cc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
// Copyright (c) 2014 by Contributors
2-
#include <dmlc/logging.h>
3-
#include <dmlc/omp.h>
4-
#include <xgboost/c_api.h>
2+
#include <cstring>
3+
#include <cstdio>
54
#include <vector>
65
#include <string>
76
#include <utility>
8-
#include <cstring>
9-
#include <cstdio>
107
#include <sstream>
11-
#include "./xgboost_R.h"
8+
9+
#include <dmlc/logging.h>
10+
#include <dmlc/omp.h>
11+
#include <xgboost/c_api.h>
12+
13+
#include "xgboost_R.h"
14+
1215

1316
/*!
1417
* \brief macro to annotate begin of api

include/xgboost/base.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
#ifndef XGBOOST_BASE_H_
77
#define XGBOOST_BASE_H_
88

9-
#include <dmlc/base.h>
10-
#include <dmlc/omp.h>
119
#include <cmath>
1210
#include <iostream>
1311
#include <vector>
1412
#include <string>
1513
#include <utility>
1614

15+
#include <dmlc/base.h>
16+
#include <dmlc/omp.h>
17+
1718
/*!
1819
* \brief string flag for R library, to leave hooks when needed.
1920
*/

include/xgboost/data.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
#ifndef XGBOOST_DATA_H_
88
#define XGBOOST_DATA_H_
99

10+
#include <memory>
11+
#include <numeric>
12+
#include <algorithm>
13+
#include <string>
14+
#include <utility>
15+
#include <vector>
16+
1017
#include <dmlc/base.h>
1118
#include <dmlc/data.h>
1219
#include <dmlc/serializer.h>
@@ -15,13 +22,6 @@
1522
#include <xgboost/span.h>
1623
#include <xgboost/host_device_vector.h>
1724

18-
#include <memory>
19-
#include <numeric>
20-
#include <algorithm>
21-
#include <string>
22-
#include <utility>
23-
#include <vector>
24-
2525
namespace xgboost {
2626
// forward declare dmatrix.
2727
class DMatrix;

include/xgboost/feature_map.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
#ifndef XGBOOST_FEATURE_MAP_H_
88
#define XGBOOST_FEATURE_MAP_H_
99

10-
#include <xgboost/logging.h>
11-
1210
#include <vector>
1311
#include <string>
1412
#include <cstring>
1513
#include <iostream>
1614

15+
#include <xgboost/logging.h>
16+
1717
namespace xgboost {
1818
/*!
1919
* \brief Feature map data structure to help text model dump.

include/xgboost/gbm.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
#ifndef XGBOOST_GBM_H_
99
#define XGBOOST_GBM_H_
1010

11-
#include <dmlc/registry.h>
12-
#include <dmlc/any.h>
13-
#include <xgboost/base.h>
14-
#include <xgboost/data.h>
15-
#include <xgboost/host_device_vector.h>
16-
#include <xgboost/model.h>
17-
1811
#include <vector>
1912
#include <utility>
2013
#include <string>
2114
#include <functional>
2215
#include <unordered_map>
2316
#include <memory>
2417

18+
#include <dmlc/registry.h>
19+
#include <dmlc/any.h>
20+
#include <xgboost/base.h>
21+
#include <xgboost/data.h>
22+
#include <xgboost/host_device_vector.h>
23+
#include <xgboost/model.h>
24+
2525
namespace xgboost {
2626

2727
class Json;

include/xgboost/generic_parameters.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#ifndef XGBOOST_GENERIC_PARAMETERS_H_
66
#define XGBOOST_GENERIC_PARAMETERS_H_
77

8+
#include <string>
9+
810
#include <xgboost/logging.h>
911
#include <xgboost/parameter.h>
1012

11-
#include <string>
12-
1313
namespace xgboost {
1414
struct GenericParameter : public XGBoostParameter<GenericParameter> {
1515
// Constant representing the device ID of CPU.

include/xgboost/json.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
#ifndef XGBOOST_JSON_H_
55
#define XGBOOST_JSON_H_
66

7-
#include <xgboost/logging.h>
8-
#include <xgboost/parameter.h>
9-
#include <string>
10-
117
#include <map>
128
#include <memory>
139
#include <vector>
1410
#include <functional>
1511
#include <utility>
12+
#include <string>
13+
14+
#include <xgboost/logging.h>
15+
#include <xgboost/parameter.h>
1616

1717
namespace xgboost {
1818

include/xgboost/json_io.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*/
44
#ifndef XGBOOST_JSON_IO_H_
55
#define XGBOOST_JSON_IO_H_
6-
#include <xgboost/json.h>
76

87
#include <memory>
98
#include <string>
@@ -14,6 +13,8 @@
1413
#include <sstream>
1514
#include <locale>
1615

16+
#include <xgboost/json.h>
17+
1718
namespace xgboost {
1819

1920
template <typename Allocator>

include/xgboost/learner.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
#ifndef XGBOOST_LEARNER_H_
99
#define XGBOOST_LEARNER_H_
1010

11+
#include <utility>
12+
#include <map>
13+
#include <memory>
14+
#include <string>
15+
#include <vector>
16+
1117
#include <dmlc/any.h>
1218
#include <rabit/rabit.h>
1319
#include <xgboost/base.h>
@@ -17,12 +23,6 @@
1723
#include <xgboost/host_device_vector.h>
1824
#include <xgboost/model.h>
1925

20-
#include <utility>
21-
#include <map>
22-
#include <memory>
23-
#include <string>
24-
#include <vector>
25-
2626
namespace xgboost {
2727

2828
class Metric;

include/xgboost/linear_updater.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
*/
44
#pragma once
55

6+
#include <functional>
7+
#include <string>
8+
#include <utility>
9+
#include <vector>
10+
611
#include <dmlc/registry.h>
712
#include <xgboost/base.h>
813
#include <xgboost/data.h>
914
#include <xgboost/generic_parameters.h>
1015
#include <xgboost/host_device_vector.h>
1116
#include <xgboost/model.h>
1217

13-
#include <functional>
14-
#include <string>
15-
#include <utility>
16-
#include <vector>
17-
18-
1918
namespace xgboost {
2019

2120
class Json;

0 commit comments

Comments
 (0)