Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Perkins
ducc
Commits
81a5a4b3
Commit
81a5a4b3
authored
Jan 10, 2020
by
Martin Reinecke
Browse files
fixes
parent
adcaefb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
mr_util/simd.h
View file @
81a5a4b3
...
...
@@ -163,7 +163,7 @@ template<typename T, size_t len> inline bool any_of(const vmask_<T, len> &mask)
template
<
typename
T
,
size_t
len
>
inline
bool
none_of
(
const
vmask_
<
T
,
len
>
&
mask
)
{
return
mask
.
bits
()
==
0
;
}
template
<
typename
T
,
size_t
len
>
inline
bool
all_of
(
const
vmask_
<
T
,
len
>
&
mask
)
{
return
mask
.
bits
()
==
(
1
<<
len
)
-
1
;
}
{
return
mask
.
bits
()
==
(
size_t
(
1
)
<<
len
)
-
1
;
}
template
<
typename
Op
,
typename
T
,
size_t
len
>
T
reduce
(
const
vtp
<
T
,
len
>
&
v
,
Op
op
)
{
T
res
=
v
[
0
];
...
...
@@ -221,7 +221,7 @@ template<> class helper_<float,8>
static
constexpr
size_t
len
=
8
;
public:
using
Tv
=
__m512
;
using
Tm
=
__mmask
8
;
using
Tm
=
__mmask
16
;
static
Tv
from_scalar
(
T
v
)
{
return
_mm512_set1_ps
(
v
);
}
static
Tv
abs
(
Tv
v
)
{
return
(
__m512
)
_mm512_andnot_epi32
((
__m512i
)
_mm512_set1_ps
(
-
0.
),(
__m512i
)
v
);
}
...
...
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