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
9b263735
Unverified
Commit
9b263735
authored
Aug 06, 2020
by
Guolin Ke
Committed by
GitHub
Aug 06, 2020
Browse files
fix the omp index in window
parent
1dbe5e99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/boosting/goss.hpp
src/boosting/goss.hpp
+3
-2
No files found.
src/boosting/goss.hpp
View file @
9b263735
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <algorithm>
#include <algorithm>
#include <chrono>
#include <chrono>
#include <cstdio>
#include <cstdio>
#include <cstdint>
#include <fstream>
#include <fstream>
#include <vector>
#include <vector>
...
@@ -59,9 +60,9 @@ class GOSS: public GBDT {
...
@@ -59,9 +60,9 @@ class GOSS: public GBDT {
if
(
gradients
!=
nullptr
)
{
if
(
gradients
!=
nullptr
)
{
// use customized objective function
// use customized objective function
CHECK
(
hessians
!=
nullptr
&&
objective_function_
==
nullptr
);
CHECK
(
hessians
!=
nullptr
&&
objective_function_
==
nullptr
);
size
_t
total_size
=
static_cast
<
size
_t
>
(
num_data_
)
*
num_tree_per_iteration_
;
int64
_t
total_size
=
static_cast
<
int64
_t
>
(
num_data_
)
*
num_tree_per_iteration_
;
#pragma omp parallel for schedule(static)
#pragma omp parallel for schedule(static)
for
(
size
_t
i
=
0
;
i
<
total_size
;
++
i
)
{
for
(
int64
_t
i
=
0
;
i
<
total_size
;
++
i
)
{
gradients_
[
i
]
=
gradients
[
i
];
gradients_
[
i
]
=
gradients
[
i
];
hessians_
[
i
]
=
hessians
[
i
];
hessians_
[
i
]
=
hessians
[
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