Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
656d2676
Unverified
Commit
656d2676
authored
Jun 01, 2020
by
James Lamb
Committed by
GitHub
Jun 01, 2020
Browse files
re-order includes (fixes #3132) (#3133)
parent
f82e943c
Changes
77
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
91 additions
and
80 deletions
+91
-80
include/LightGBM/utils/threading.h
include/LightGBM/utils/threading.h
+4
-4
src/application/application.cpp
src/application/application.cpp
+9
-8
src/application/predictor.hpp
src/application/predictor.hpp
+6
-6
src/boosting/dart.hpp
src/boosting/dart.hpp
+2
-2
src/boosting/gbdt.cpp
src/boosting/gbdt.cpp
+5
-4
src/boosting/gbdt.h
src/boosting/gbdt.h
+6
-6
src/boosting/gbdt_model_text.cpp
src/boosting/gbdt_model_text.cpp
+5
-4
src/boosting/gbdt_prediction.cpp
src/boosting/gbdt_prediction.cpp
+2
-2
src/boosting/goss.hpp
src/boosting/goss.hpp
+4
-4
src/boosting/prediction_early_stop.cpp
src/boosting/prediction_early_stop.cpp
+4
-3
src/boosting/rf.hpp
src/boosting/rf.hpp
+3
-3
src/boosting/score_updater.hpp
src/boosting/score_updater.hpp
+3
-3
src/c_api.cpp
src/c_api.cpp
+9
-8
src/io/bin.cpp
src/io/bin.cpp
+6
-5
src/io/config.cpp
src/io/config.cpp
+3
-2
src/io/dataset.cpp
src/io/dataset.cpp
+7
-6
src/io/dataset_loader.cpp
src/io/dataset_loader.cpp
+3
-2
src/io/dense_bin.hpp
src/io/dense_bin.hpp
+2
-2
src/io/file_io.cpp
src/io/file_io.cpp
+4
-3
src/io/json11.cpp
src/io/json11.cpp
+4
-3
No files found.
include/LightGBM/utils/threading.h
View file @
656d2676
...
@@ -6,14 +6,14 @@
...
@@ -6,14 +6,14 @@
#ifndef LIGHTGBM_UTILS_THREADING_H_
#ifndef LIGHTGBM_UTILS_THREADING_H_
#define LIGHTGBM_UTILS_THREADING_H_
#define LIGHTGBM_UTILS_THREADING_H_
#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <algorithm>
#include <algorithm>
#include <functional>
#include <functional>
#include <vector>
#include <vector>
#include <LightGBM/meta.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/openmp_wrapper.h>
namespace
LightGBM
{
namespace
LightGBM
{
class
Threading
{
class
Threading
{
...
...
src/application/application.cpp
View file @
656d2676
...
@@ -2,6 +2,15 @@
...
@@ -2,6 +2,15 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
*/
#include <string>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <sstream>
#include <utility>
#include <LightGBM/application.h>
#include <LightGBM/application.h>
#include <LightGBM/boosting.h>
#include <LightGBM/boosting.h>
...
@@ -15,14 +24,6 @@
...
@@ -15,14 +24,6 @@
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
#include <LightGBM/utils/text_reader.h>
#include <string>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <sstream>
#include <utility>
#include "predictor.hpp"
#include "predictor.hpp"
namespace
LightGBM
{
namespace
LightGBM
{
...
...
src/application/predictor.hpp
View file @
656d2676
...
@@ -5,12 +5,6 @@
...
@@ -5,12 +5,6 @@
#ifndef LIGHTGBM_PREDICTOR_HPP_
#ifndef LIGHTGBM_PREDICTOR_HPP_
#define LIGHTGBM_PREDICTOR_HPP_
#define LIGHTGBM_PREDICTOR_HPP_
#include <LightGBM/boosting.h>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
#include <string>
#include <string>
#include <cstdio>
#include <cstdio>
#include <cstring>
#include <cstring>
...
@@ -21,6 +15,12 @@
...
@@ -21,6 +15,12 @@
#include <utility>
#include <utility>
#include <vector>
#include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/text_reader.h>
namespace
LightGBM
{
namespace
LightGBM
{
/*!
/*!
...
...
src/boosting/dart.hpp
View file @
656d2676
...
@@ -5,14 +5,14 @@
...
@@ -5,14 +5,14 @@
#ifndef LIGHTGBM_BOOSTING_DART_H_
#ifndef LIGHTGBM_BOOSTING_DART_H_
#define LIGHTGBM_BOOSTING_DART_H_
#define LIGHTGBM_BOOSTING_DART_H_
#include <LightGBM/boosting.h>
#include <string>
#include <string>
#include <algorithm>
#include <algorithm>
#include <cstdio>
#include <cstdio>
#include <fstream>
#include <fstream>
#include <vector>
#include <vector>
#include <LightGBM/boosting.h>
#include "gbdt.h"
#include "gbdt.h"
#include "score_updater.hpp"
#include "score_updater.hpp"
...
...
src/boosting/gbdt.cpp
View file @
656d2676
...
@@ -2,8 +2,13 @@
...
@@ -2,8 +2,13 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
*/
#include "gbdt.h"
#include "gbdt.h"
#include <chrono>
#include <ctime>
#include <sstream>
#include <LightGBM/metric.h>
#include <LightGBM/metric.h>
#include <LightGBM/network.h>
#include <LightGBM/network.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/objective_function.h>
...
@@ -11,10 +16,6 @@
...
@@ -11,10 +16,6 @@
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <chrono>
#include <ctime>
#include <sstream>
namespace
LightGBM
{
namespace
LightGBM
{
GBDT
::
GBDT
()
GBDT
::
GBDT
()
...
...
src/boosting/gbdt.h
View file @
656d2676
...
@@ -5,12 +5,6 @@
...
@@ -5,12 +5,6 @@
#ifndef LIGHTGBM_BOOSTING_GBDT_H_
#ifndef LIGHTGBM_BOOSTING_GBDT_H_
#define LIGHTGBM_BOOSTING_GBDT_H_
#define LIGHTGBM_BOOSTING_GBDT_H_
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/threading.h>
#include <string>
#include <string>
#include <algorithm>
#include <algorithm>
#include <cstdio>
#include <cstdio>
...
@@ -22,6 +16,12 @@
...
@@ -22,6 +16,12 @@
#include <utility>
#include <utility>
#include <vector>
#include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/threading.h>
#include "score_updater.hpp"
#include "score_updater.hpp"
namespace
LightGBM
{
namespace
LightGBM
{
...
...
src/boosting/gbdt_model_text.cpp
View file @
656d2676
...
@@ -2,16 +2,17 @@
...
@@ -2,16 +2,17 @@
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
*/
#include <string>
#include <sstream>
#include <vector>
#include <LightGBM/config.h>
#include <LightGBM/config.h>
#include <LightGBM/metric.h>
#include <LightGBM/metric.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/common.h>
#include <string>
#include <sstream>
#include <vector>
#include "gbdt.h"
#include "gbdt.h"
namespace
LightGBM
{
namespace
LightGBM
{
...
...
src/boosting/gbdt_prediction.cpp
View file @
656d2676
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
*/
#include "gbdt.h"
#include <LightGBM/objective_function.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include "gbdt.h"
namespace
LightGBM
{
namespace
LightGBM
{
void
GBDT
::
PredictRaw
(
const
double
*
features
,
double
*
output
,
const
PredictionEarlyStopInstance
*
early_stop
)
const
{
void
GBDT
::
PredictRaw
(
const
double
*
features
,
double
*
output
,
const
PredictionEarlyStopInstance
*
early_stop
)
const
{
...
...
src/boosting/goss.hpp
View file @
656d2676
...
@@ -5,10 +5,6 @@
...
@@ -5,10 +5,6 @@
#ifndef LIGHTGBM_BOOSTING_GOSS_H_
#ifndef LIGHTGBM_BOOSTING_GOSS_H_
#define LIGHTGBM_BOOSTING_GOSS_H_
#define LIGHTGBM_BOOSTING_GOSS_H_
#include <LightGBM/boosting.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/log.h>
#include <string>
#include <string>
#include <algorithm>
#include <algorithm>
#include <chrono>
#include <chrono>
...
@@ -16,6 +12,10 @@
...
@@ -16,6 +12,10 @@
#include <fstream>
#include <fstream>
#include <vector>
#include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/log.h>
#include "gbdt.h"
#include "gbdt.h"
#include "score_updater.hpp"
#include "score_updater.hpp"
...
...
src/boosting/prediction_early_stop.cpp
View file @
656d2676
...
@@ -2,15 +2,16 @@
...
@@ -2,15 +2,16 @@
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
*/
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/log.h>
#include <limits>
#include <limits>
#include <algorithm>
#include <algorithm>
#include <cmath>
#include <cmath>
#include <vector>
#include <vector>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/utils/log.h>
namespace
LightGBM
{
namespace
LightGBM
{
PredictionEarlyStopInstance
CreateNone
(
const
PredictionEarlyStopConfig
&
)
{
PredictionEarlyStopInstance
CreateNone
(
const
PredictionEarlyStopConfig
&
)
{
...
...
src/boosting/rf.hpp
View file @
656d2676
...
@@ -5,9 +5,6 @@
...
@@ -5,9 +5,6 @@
#ifndef LIGHTGBM_BOOSTING_RF_H_
#ifndef LIGHTGBM_BOOSTING_RF_H_
#define LIGHTGBM_BOOSTING_RF_H_
#define LIGHTGBM_BOOSTING_RF_H_
#include <LightGBM/boosting.h>
#include <LightGBM/metric.h>
#include <string>
#include <string>
#include <cstdio>
#include <cstdio>
#include <fstream>
#include <fstream>
...
@@ -15,6 +12,9 @@
...
@@ -15,6 +12,9 @@
#include <utility>
#include <utility>
#include <vector>
#include <vector>
#include <LightGBM/boosting.h>
#include <LightGBM/metric.h>
#include "gbdt.h"
#include "gbdt.h"
#include "score_updater.hpp"
#include "score_updater.hpp"
...
...
src/boosting/score_updater.hpp
View file @
656d2676
...
@@ -5,15 +5,15 @@
...
@@ -5,15 +5,15 @@
#ifndef LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_
#ifndef LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_
#define LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_
#define LIGHTGBM_BOOSTING_SCORE_UPDATER_HPP_
#include <cstring>
#include <vector>
#include <LightGBM/dataset.h>
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <LightGBM/meta.h>
#include <LightGBM/tree.h>
#include <LightGBM/tree.h>
#include <LightGBM/tree_learner.h>
#include <LightGBM/tree_learner.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <cstring>
#include <vector>
namespace
LightGBM
{
namespace
LightGBM
{
/*!
/*!
* \brief Used to store and update score for data
* \brief Used to store and update score for data
...
...
src/c_api.cpp
View file @
656d2676
...
@@ -2,6 +2,15 @@
...
@@ -2,6 +2,15 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
*/
#include <string>
#include <cstdio>
#include <functional>
#include <memory>
#include <mutex>
#include <stdexcept>
#include <vector>
#include <LightGBM/c_api.h>
#include <LightGBM/c_api.h>
#include <LightGBM/boosting.h>
#include <LightGBM/boosting.h>
...
@@ -18,14 +27,6 @@
...
@@ -18,14 +27,6 @@
#include <LightGBM/utils/random.h>
#include <LightGBM/utils/random.h>
#include <LightGBM/utils/threading.h>
#include <LightGBM/utils/threading.h>
#include <string>
#include <cstdio>
#include <functional>
#include <memory>
#include <mutex>
#include <stdexcept>
#include <vector>
#include "application/predictor.hpp"
#include "application/predictor.hpp"
namespace
LightGBM
{
namespace
LightGBM
{
...
...
src/io/bin.cpp
View file @
656d2676
...
@@ -2,17 +2,18 @@
...
@@ -2,17 +2,18 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
*/
#include <LightGBM/bin.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/file_io.h>
#include <algorithm>
#include <algorithm>
#include <cmath>
#include <cmath>
#include <cstdint>
#include <cstdint>
#include <cstring>
#include <cstring>
#include <LightGBM/bin.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/file_io.h>
#include "dense_bin.hpp"
#include "dense_bin.hpp"
#include "multi_val_dense_bin.hpp"
#include "multi_val_dense_bin.hpp"
#include "multi_val_sparse_bin.hpp"
#include "multi_val_sparse_bin.hpp"
...
...
src/io/config.cpp
View file @
656d2676
...
@@ -2,14 +2,15 @@
...
@@ -2,14 +2,15 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
*/
#include <limits>
#include <LightGBM/config.h>
#include <LightGBM/config.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/common.h>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/random.h>
#include <LightGBM/utils/random.h>
#include <limits>
namespace
LightGBM
{
namespace
LightGBM
{
void
Config
::
KV2Map
(
std
::
unordered_map
<
std
::
string
,
std
::
string
>*
params
,
const
char
*
kv
)
{
void
Config
::
KV2Map
(
std
::
unordered_map
<
std
::
string
,
std
::
string
>*
params
,
const
char
*
kv
)
{
...
...
src/io/dataset.cpp
View file @
656d2676
...
@@ -3,12 +3,6 @@
...
@@ -3,12 +3,6 @@
* Licensed under the MIT License. See LICENSE file in the project root for
* Licensed under the MIT License. See LICENSE file in the project root for
* license information.
* license information.
*/
*/
#include <LightGBM/dataset.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/threading.h>
#include <chrono>
#include <chrono>
#include <cstdio>
#include <cstdio>
...
@@ -16,6 +10,13 @@
...
@@ -16,6 +10,13 @@
#include <sstream>
#include <sstream>
#include <unordered_map>
#include <unordered_map>
#include <LightGBM/dataset.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/threading.h>
namespace
LightGBM
{
namespace
LightGBM
{
const
char
*
Dataset
::
binary_file_token
=
const
char
*
Dataset
::
binary_file_token
=
...
...
src/io/dataset_loader.cpp
View file @
656d2676
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
*/
#include <fstream>
#include <LightGBM/dataset_loader.h>
#include <LightGBM/dataset_loader.h>
#include <LightGBM/network.h>
#include <LightGBM/network.h>
...
@@ -10,8 +13,6 @@
...
@@ -10,8 +13,6 @@
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <fstream>
namespace
LightGBM
{
namespace
LightGBM
{
using
json11
::
Json
;
using
json11
::
Json
;
...
...
src/io/dense_bin.hpp
View file @
656d2676
...
@@ -6,12 +6,12 @@
...
@@ -6,12 +6,12 @@
#ifndef LIGHTGBM_IO_DENSE_BIN_HPP_
#ifndef LIGHTGBM_IO_DENSE_BIN_HPP_
#define LIGHTGBM_IO_DENSE_BIN_HPP_
#define LIGHTGBM_IO_DENSE_BIN_HPP_
#include <LightGBM/bin.h>
#include <cstdint>
#include <cstdint>
#include <cstring>
#include <cstring>
#include <vector>
#include <vector>
#include <LightGBM/bin.h>
namespace
LightGBM
{
namespace
LightGBM
{
template
<
typename
VAL_T
,
bool
IS_4BIT
>
template
<
typename
VAL_T
,
bool
IS_4BIT
>
...
...
src/io/file_io.cpp
View file @
656d2676
...
@@ -3,14 +3,15 @@
...
@@ -3,14 +3,15 @@
* Licensed under the MIT License. See LICENSE file in the project root for
* Licensed under the MIT License. See LICENSE file in the project root for
* license information.
* license information.
*/
*/
#include <LightGBM/utils/file_io.h>
#include <LightGBM/utils/log.h>
#include <algorithm>
#include <algorithm>
#include <sstream>
#include <sstream>
#include <unordered_map>
#include <unordered_map>
#include <LightGBM/utils/file_io.h>
#include <LightGBM/utils/log.h>
#ifdef USE_HDFS
#ifdef USE_HDFS
#include <hdfs.h>
#include <hdfs.h>
#endif
#endif
...
...
src/io/json11.cpp
View file @
656d2676
...
@@ -18,15 +18,16 @@
...
@@ -18,15 +18,16 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* THE SOFTWARE.
*/
*/
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/log.h>
#include <cmath>
#include <cmath>
#include <cstdio>
#include <cstdio>
#include <cstdlib>
#include <cstdlib>
#include <limits>
#include <limits>
#include <LightGBM/utils/json11.h>
#include <LightGBM/utils/log.h>
namespace
json11
{
namespace
json11
{
static
const
int
max_depth
=
200
;
static
const
int
max_depth
=
200
;
...
...
Prev
1
2
3
4
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment