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
ba2217ae
Commit
ba2217ae
authored
Nov 07, 2016
by
Guolin Ke
Committed by
GitHub
Nov 07, 2016
Browse files
fix bug when splitting sparse bin with passed num_data=0 (#68)
parent
ab5ab8a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/io/sparse_bin.hpp
src/io/sparse_bin.hpp
+2
-0
No files found.
src/io/sparse_bin.hpp
View file @
ba2217ae
...
@@ -59,6 +59,8 @@ public:
...
@@ -59,6 +59,8 @@ public:
data_size_t
Split
(
unsigned
int
threshold
,
data_size_t
*
data_indices
,
data_size_t
num_data
,
data_size_t
Split
(
unsigned
int
threshold
,
data_size_t
*
data_indices
,
data_size_t
num_data
,
data_size_t
*
lte_indices
,
data_size_t
*
gt_indices
)
const
override
{
data_size_t
*
lte_indices
,
data_size_t
*
gt_indices
)
const
override
{
// not need to split
if
(
num_data
<=
0
)
{
return
0
;
}
const
auto
fast_pair
=
fast_index_
[(
data_indices
[
0
])
>>
fast_index_shift_
];
const
auto
fast_pair
=
fast_index_
[(
data_indices
[
0
])
>>
fast_index_shift_
];
data_size_t
j
=
fast_pair
.
first
;
data_size_t
j
=
fast_pair
.
first
;
data_size_t
cur_pos
=
fast_pair
.
second
;
data_size_t
cur_pos
=
fast_pair
.
second
;
...
...
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