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
4292b168
"src/vscode:/vscode.git/clone" did not exist on "a8ee487aca35363fafa027e6b7695976045096b3"
Unverified
Commit
4292b168
authored
Jul 10, 2024
by
Nikita Titov
Committed by
GitHub
Jul 10, 2024
Browse files
fix cpp casting errors "Comparison of narrow type with wide type in loop condition" (#6533)
parent
6c76b6b7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
include/LightGBM/arrow.h
include/LightGBM/arrow.h
+1
-1
src/c_api.cpp
src/c_api.cpp
+2
-2
src/io/metadata.cpp
src/io/metadata.cpp
+1
-1
No files found.
include/LightGBM/arrow.h
View file @
4292b168
...
@@ -122,7 +122,7 @@ class ArrowChunkedArray {
...
@@ -122,7 +122,7 @@ class ArrowChunkedArray {
const
struct
ArrowSchema
*
schema
)
const
struct
ArrowSchema
*
schema
)
:
releases_arrow_
(
true
)
{
:
releases_arrow_
(
true
)
{
chunks_
.
reserve
(
n_chunks
);
chunks_
.
reserve
(
n_chunks
);
for
(
auto
k
=
0
;
k
<
n_chunks
;
++
k
)
{
for
(
int64_t
k
=
0
;
k
<
n_chunks
;
++
k
)
{
if
(
chunks
[
k
].
length
==
0
)
continue
;
if
(
chunks
[
k
].
length
==
0
)
continue
;
chunks_
.
push_back
(
&
chunks
[
k
]);
chunks_
.
push_back
(
&
chunks
[
k
]);
}
}
...
...
src/c_api.cpp
View file @
4292b168
...
@@ -1464,7 +1464,7 @@ int LGBM_DatasetCreateFromCSR(const void* indptr,
...
@@ -1464,7 +1464,7 @@ int LGBM_DatasetCreateFromCSR(const void* indptr,
}
}
OMP_INIT_EX
();
OMP_INIT_EX
();
#pragma omp parallel for num_threads(OMP_NUM_THREADS()) schedule(static)
#pragma omp parallel for num_threads(OMP_NUM_THREADS()) schedule(static)
for
(
int
i
=
0
;
i
<
nindptr
-
1
;
++
i
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
nindptr
-
1
)
;
++
i
)
{
OMP_LOOP_EX_BEGIN
();
OMP_LOOP_EX_BEGIN
();
const
int
tid
=
omp_get_thread_num
();
const
int
tid
=
omp_get_thread_num
();
auto
one_row
=
get_row_fun
(
i
);
auto
one_row
=
get_row_fun
(
i
);
...
@@ -1604,7 +1604,7 @@ int LGBM_DatasetCreateFromCSC(const void* col_ptr,
...
@@ -1604,7 +1604,7 @@ int LGBM_DatasetCreateFromCSC(const void* col_ptr,
}
}
OMP_INIT_EX
();
OMP_INIT_EX
();
#pragma omp parallel for num_threads(OMP_NUM_THREADS()) schedule(static)
#pragma omp parallel for num_threads(OMP_NUM_THREADS()) schedule(static)
for
(
int
i
=
0
;
i
<
ncol_ptr
-
1
;
++
i
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
ncol_ptr
-
1
)
;
++
i
)
{
OMP_LOOP_EX_BEGIN
();
OMP_LOOP_EX_BEGIN
();
const
int
tid
=
omp_get_thread_num
();
const
int
tid
=
omp_get_thread_num
();
int
feature_idx
=
ret
->
InnerFeatureIndex
(
i
);
int
feature_idx
=
ret
->
InnerFeatureIndex
(
i
);
...
...
src/io/metadata.cpp
View file @
4292b168
...
@@ -531,7 +531,7 @@ void Metadata::SetQueriesFromIterator(It first, It last) {
...
@@ -531,7 +531,7 @@ void Metadata::SetQueriesFromIterator(It first, It last) {
data_size_t
sum
=
0
;
data_size_t
sum
=
0
;
#pragma omp parallel for num_threads(OMP_NUM_THREADS()) schedule(static) reduction(+:sum)
#pragma omp parallel for num_threads(OMP_NUM_THREADS()) schedule(static) reduction(+:sum)
for
(
data_size_t
i
=
0
;
i
<
last
-
first
;
++
i
)
{
for
(
data_size_t
i
=
0
;
i
<
static_cast
<
data_size_t
>
(
last
-
first
)
;
++
i
)
{
sum
+=
first
[
i
];
sum
+=
first
[
i
];
}
}
if
(
num_data_
!=
sum
)
{
if
(
num_data_
!=
sum
)
{
...
...
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