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
tsoc
openmm
Commits
352f5605
"plugins/amoeba/vscode:/vscode.git/clone" did not exist on "df265df8845de7e9e25169d457c0d416e1dc6ff0"
Commit
352f5605
authored
May 02, 2020
by
Marc Marí
Browse files
Return masks as ivec4 in ARM vectorization implementation
parent
f83289a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
18 deletions
+33
-18
openmmapi/include/openmm/internal/vectorize_neon.h
openmmapi/include/openmm/internal/vectorize_neon.h
+33
-18
No files found.
openmmapi/include/openmm/internal/vectorize_neon.h
View file @
352f5605
...
@@ -157,24 +157,13 @@ public:
...
@@ -157,24 +157,13 @@ public:
fvec4
operator
|
(
fvec4
other
)
const
{
fvec4
operator
|
(
fvec4
other
)
const
{
return
vreinterpretq_f32_u32
(
vorrq_u32
(
vreinterpretq_u32_f32
(
val
),
vreinterpretq_u32_f32
(
other
)));
return
vreinterpretq_f32_u32
(
vorrq_u32
(
vreinterpretq_u32_f32
(
val
),
vreinterpretq_u32_f32
(
other
)));
}
}
fvec4
operator
==
(
fvec4
other
)
const
{
return
vcvtq_f32_s32
(
vreinterpretq_s32_u32
(
vceqq_f32
(
val
,
other
)));
ivec4
operator
==
(
fvec4
other
)
const
;
}
ivec4
operator
!=
(
fvec4
other
)
const
;
fvec4
operator
!=
(
fvec4
other
)
const
{
ivec4
operator
>
(
fvec4
other
)
const
;
return
vcvtq_f32_s32
(
vreinterpretq_s32_u32
(
vmvnq_u32
(
vceqq_f32
(
val
,
other
))));
// not(equals(val, other))
ivec4
operator
<
(
fvec4
other
)
const
;
}
ivec4
operator
>=
(
fvec4
other
)
const
;
fvec4
operator
>
(
fvec4
other
)
const
{
ivec4
operator
<=
(
fvec4
other
)
const
;
return
vcvtq_f32_s32
(
vreinterpretq_s32_u32
(
vcgtq_f32
(
val
,
other
)));
}
fvec4
operator
<
(
fvec4
other
)
const
{
return
vcvtq_f32_s32
(
vreinterpretq_s32_u32
(
vcltq_f32
(
val
,
other
)));
}
fvec4
operator
>=
(
fvec4
other
)
const
{
return
vcvtq_f32_s32
(
vreinterpretq_s32_u32
(
vcgeq_f32
(
val
,
other
)));
}
fvec4
operator
<=
(
fvec4
other
)
const
{
return
vcvtq_f32_s32
(
vreinterpretq_s32_u32
(
vcleq_f32
(
val
,
other
)));
}
operator
ivec4
()
const
;
operator
ivec4
()
const
;
/**
/**
...
@@ -281,6 +270,32 @@ inline ivec4 fvec4::expandBitsToMask(int bitmask) {
...
@@ -281,6 +270,32 @@ inline ivec4 fvec4::expandBitsToMask(int bitmask) {
bitmask
&
4
?
-
1
:
0
,
bitmask
&
4
?
-
1
:
0
,
bitmask
&
8
?
-
1
:
0
);
bitmask
&
8
?
-
1
:
0
);
}
}
// Comparison operators
inline
ivec4
fvec4
::
operator
==
(
fvec4
other
)
const
{
return
vreinterpretq_s32_u32
(
vceqq_f32
(
val
,
other
));
}
inline
ivec4
fvec4
::
operator
!=
(
fvec4
other
)
const
{
return
vreinterpretq_s32_u32
(
vmvnq_u32
(
vceqq_f32
(
val
,
other
)));
// not(equals(val, other))
}
inline
ivec4
fvec4
::
operator
>
(
fvec4
other
)
const
{
return
vreinterpretq_s32_u32
(
vcgtq_f32
(
val
,
other
));
}
inline
ivec4
fvec4
::
operator
<
(
fvec4
other
)
const
{
return
vreinterpretq_s32_u32
(
vcltq_f32
(
val
,
other
));
}
inline
ivec4
fvec4
::
operator
>=
(
fvec4
other
)
const
{
return
vreinterpretq_s32_u32
(
vcgeq_f32
(
val
,
other
));
}
inline
ivec4
fvec4
::
operator
<=
(
fvec4
other
)
const
{
return
vreinterpretq_s32_u32
(
vcleq_f32
(
val
,
other
));
}
// Functions that operate on fvec4s.
// Functions that operate on fvec4s.
static
inline
fvec4
min
(
fvec4
v1
,
fvec4
v2
)
{
static
inline
fvec4
min
(
fvec4
v1
,
fvec4
v2
)
{
...
...
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