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
e9cfece1
Commit
e9cfece1
authored
May 13, 2017
by
Guolin Ke
Browse files
fix #508
parent
5b0ae608
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/treelearner/feature_histogram.hpp
src/treelearner/feature_histogram.hpp
+8
-4
No files found.
src/treelearner/feature_histogram.hpp
View file @
e9cfece1
...
...
@@ -374,13 +374,17 @@ public:
}
uint64_t
num_total_bin
=
train_data
->
NumTotalBin
();
Log
::
Info
(
"Total Bins %d"
,
num_total_bin
);
int
old_cache_size
=
cache_
size
_
;
int
old_cache_size
=
static_cast
<
int
>
(
pool_
.
size
())
;
Reset
(
cache_size
,
total_size
);
pool_
.
resize
(
cache_size
);
data_
.
resize
(
cache_size
);
if
(
cache_size
>
old_cache_size
)
{
pool_
.
resize
(
cache_size
);
data_
.
resize
(
cache_size
);
}
OMP_INIT_EX
();
#pragma omp parallel for schedule(static)
for
(
int
i
=
old_cache_size
;
i
<
cache_size
_
;
++
i
)
{
for
(
int
i
=
old_cache_size
;
i
<
cache_size
;
++
i
)
{
OMP_LOOP_EX_BEGIN
();
pool_
[
i
].
reset
(
new
FeatureHistogram
[
train_data
->
num_features
()]);
data_
[
i
].
resize
(
num_total_bin
);
...
...
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