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
41c9df69
Commit
41c9df69
authored
Dec 05, 2017
by
Guolin Ke
Browse files
fix a warning
parent
699d4381
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/treelearner/serial_tree_learner.cpp
src/treelearner/serial_tree_learner.cpp
+1
-1
No files found.
src/treelearner/serial_tree_learner.cpp
View file @
41c9df69
...
@@ -244,7 +244,7 @@ void SerialTreeLearner::BeforeTrain() {
...
@@ -244,7 +244,7 @@ void SerialTreeLearner::BeforeTrain() {
// initialize used features
// initialize used features
std
::
memset
(
is_feature_used_
.
data
(),
0
,
sizeof
(
int8_t
)
*
num_features_
);
std
::
memset
(
is_feature_used_
.
data
(),
0
,
sizeof
(
int8_t
)
*
num_features_
);
// Get used feature at current tree
// Get used feature at current tree
auto
sampled_indices
=
random_
.
Sample
(
valid_feature_indices_
.
size
(),
used_feature_cnt
);
auto
sampled_indices
=
random_
.
Sample
(
static_cast
<
int
>
(
valid_feature_indices_
.
size
()
)
,
used_feature_cnt
);
int
omp_loop_size
=
static_cast
<
int
>
(
sampled_indices
.
size
());
int
omp_loop_size
=
static_cast
<
int
>
(
sampled_indices
.
size
());
#pragma omp parallel for schedule(static, 512) if (omp_loop_size >= 1024)
#pragma omp parallel for schedule(static, 512) if (omp_loop_size >= 1024)
for
(
int
i
=
0
;
i
<
omp_loop_size
;
++
i
)
{
for
(
int
i
=
0
;
i
<
omp_loop_size
;
++
i
)
{
...
...
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