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
gaoqiong
MIGraphX
Commits
84897c47
Commit
84897c47
authored
Jun 19, 2023
by
Artur Wojcik
Browse files
generate
parent
3c648747
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/include/migraphx/generate.hpp
src/include/migraphx/generate.hpp
+2
-2
No files found.
src/include/migraphx/generate.hpp
View file @
84897c47
...
@@ -48,7 +48,7 @@ constexpr T normalize(unsigned long z)
...
@@ -48,7 +48,7 @@ constexpr T normalize(unsigned long z)
template
<
class
T
,
MIGRAPHX_REQUIRES
(
is_signed
<
T
>{}
and
not
is_floating_point
<
T
>
{})
>
template
<
class
T
,
MIGRAPHX_REQUIRES
(
is_signed
<
T
>{}
and
not
is_floating_point
<
T
>
{})
>
constexpr
T
normalize
(
unsigned
long
z
)
constexpr
T
normalize
(
unsigned
long
z
)
{
{
const
auto
max
=
1UL
<<
(
sizeof
(
T
)
*
5
);
const
auto
max
=
1UL
L
<<
(
sizeof
(
T
)
*
5
);
const
auto
half_max
=
max
/
2
;
const
auto
half_max
=
max
/
2
;
return
half_max
-
(
z
%
max
);
return
half_max
-
(
z
%
max
);
}
}
...
@@ -58,7 +58,7 @@ template <class T,
...
@@ -58,7 +58,7 @@ template <class T,
not
std
::
is_same
<
T
,
bool
>
{})
>
not
std
::
is_same
<
T
,
bool
>
{})
>
constexpr
T
normalize
(
unsigned
long
z
)
constexpr
T
normalize
(
unsigned
long
z
)
{
{
const
auto
max
=
1UL
<<
(
sizeof
(
T
)
*
5
);
const
auto
max
=
1UL
L
<<
(
sizeof
(
T
)
*
5
);
return
z
%
max
;
return
z
%
max
;
}
}
...
...
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