Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
1f3895e9
Commit
1f3895e9
authored
Jul 27, 2020
by
Praetorius, Simon
Browse files
Merge branch 'issue/math_max_min' into 'master'
cleanup max and min in Math See merge request
!192
parents
47282811
fcc6632d
Changes
1
Hide whitespace changes
Inline
Side-by-side
amdis/common/Math.hpp
View file @
1f3895e9
...
...
@@ -43,8 +43,8 @@ namespace AMDiS
template
<
class
T0
,
class
T1
>
constexpr
auto
min
(
T0
a
,
T1
b
)
{
using
T
=
std
::
co
nditional_t
<
(
sizeof
(
T0
)
>
sizeof
(
T1
)),
T0
,
T1
>
;
return
a
<
b
?
T
(
a
)
:
T
(
b
)
;
using
T
=
std
::
co
mmon_type_t
<
T0
,
T1
>
;
return
T
(
a
)
<
T
(
b
)
?
a
:
b
;
}
template
<
class
T0
>
...
...
@@ -69,8 +69,8 @@ namespace AMDiS
template
<
class
T0
,
class
T1
>
constexpr
auto
max
(
T0
a
,
T1
b
)
{
using
T
=
std
::
co
nditional_t
<
(
sizeof
(
T0
)
>
sizeof
(
T1
)),
T0
,
T1
>
;
return
a
<
b
?
T
(
b
)
:
T
(
a
)
;
using
T
=
std
::
co
mmon_type_t
<
T0
,
T1
>
;
return
T
(
a
)
<
T
(
b
)
?
b
:
a
;
}
template
<
class
T0
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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