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
bc9d57b3
Commit
bc9d57b3
authored
Mar 03, 2017
by
Guolin Ke
Browse files
fix one bug in 4bits_bin .
parent
1bade1e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
src/io/dataset_loader.cpp
src/io/dataset_loader.cpp
+3
-0
src/io/dense_nbits_bin.hpp
src/io/dense_nbits_bin.hpp
+1
-0
No files found.
src/io/dataset_loader.cpp
View file @
bc9d57b3
...
@@ -747,6 +747,9 @@ void DatasetLoader::ConstructBinMappersFromTextData(int rank, int num_machines,
...
@@ -747,6 +747,9 @@ void DatasetLoader::ConstructBinMappersFromTextData(int rank, int num_machines,
// find local feature bins and copy to buffer
// find local feature bins and copy to buffer
#pragma omp parallel for schedule(guided)
#pragma omp parallel for schedule(guided)
for
(
int
i
=
0
;
i
<
len
[
rank
];
++
i
)
{
for
(
int
i
=
0
;
i
<
len
[
rank
];
++
i
)
{
if
(
ignore_features_
.
count
(
start
[
rank
]
+
i
)
>
0
)
{
continue
;
}
BinType
bin_type
=
BinType
::
NumericalBin
;
BinType
bin_type
=
BinType
::
NumericalBin
;
if
(
categorical_features_
.
count
(
start
[
rank
]
+
i
))
{
if
(
categorical_features_
.
count
(
start
[
rank
]
+
i
))
{
bin_type
=
BinType
::
CategoricalBin
;
bin_type
=
BinType
::
CategoricalBin
;
...
...
src/io/dense_nbits_bin.hpp
View file @
bc9d57b3
...
@@ -214,6 +214,7 @@ public:
...
@@ -214,6 +214,7 @@ public:
OrderedBin
*
CreateOrderedBin
()
const
override
{
return
nullptr
;
}
OrderedBin
*
CreateOrderedBin
()
const
override
{
return
nullptr
;
}
void
FinishLoad
()
override
{
void
FinishLoad
()
override
{
if
(
buf_
.
empty
())
{
return
;
}
int
len
=
(
num_data_
+
1
)
/
2
;
int
len
=
(
num_data_
+
1
)
/
2
;
for
(
int
i
=
0
;
i
<
len
;
++
i
)
{
for
(
int
i
=
0
;
i
<
len
;
++
i
)
{
data_
[
i
]
|=
buf_
[
i
];
data_
[
i
]
|=
buf_
[
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