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
OpenDAS
dgl
Commits
5e78e070
Unverified
Commit
5e78e070
authored
Nov 22, 2023
by
Muhammed Fatih BALIN
Committed by
GitHub
Nov 23, 2023
Browse files
[Misc] Fix signed unsigned comparison warning (#6602)
parent
1b3f14b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/array/cuda/utils.h
src/array/cuda/utils.h
+4
-1
No files found.
src/array/cuda/utils.h
View file @
5e78e070
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
#include <dgl/runtime/ndarray.h>
#include <dgl/runtime/ndarray.h>
#include <dmlc/logging.h>
#include <dmlc/logging.h>
#include <type_traits>
#include "../../runtime/cuda/cuda_common.h"
#include "../../runtime/cuda/cuda_common.h"
#include "dgl_cub.cuh"
#include "dgl_cub.cuh"
...
@@ -46,7 +48,8 @@ int _NumberOfBits(const T& range) {
...
@@ -46,7 +48,8 @@ int _NumberOfBits(const T& range) {
}
}
int
bits
=
1
;
int
bits
=
1
;
while
(
bits
<
static_cast
<
int
>
(
sizeof
(
T
)
*
8
)
&&
(
1ull
<<
bits
)
<
range
)
{
const
auto
urange
=
static_cast
<
std
::
make_unsigned_t
<
T
>>
(
range
);
while
(
bits
<
static_cast
<
int
>
(
sizeof
(
T
)
*
8
)
&&
(
1ull
<<
bits
)
<
urange
)
{
++
bits
;
++
bits
;
}
}
...
...
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