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
29bfe077
Commit
29bfe077
authored
Jan 06, 2014
by
peastman
Browse files
Workaround for compilation error on some compilers
parent
8bdf0829
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
openmmapi/include/openmm/internal/vectorize.h
openmmapi/include/openmm/internal/vectorize.h
+6
-3
No files found.
openmmapi/include/openmm/internal/vectorize.h
View file @
29bfe077
...
@@ -55,8 +55,9 @@ public:
...
@@ -55,8 +55,9 @@ public:
return
val
;
return
val
;
}
}
float
operator
[](
int
i
)
const
{
float
operator
[](
int
i
)
const
{
int
resultBits
=
_mm_extract_ps
(
val
,
i
);
float
result
[
4
];
return
*
((
float
*
)
&
resultBits
);
store
(
result
);
return
result
[
i
];
}
}
void
store
(
float
*
v
)
const
{
void
store
(
float
*
v
)
const
{
_mm_storeu_ps
(
v
,
val
);
_mm_storeu_ps
(
v
,
val
);
...
@@ -131,7 +132,9 @@ public:
...
@@ -131,7 +132,9 @@ public:
return
val
;
return
val
;
}
}
int
operator
[](
int
i
)
const
{
int
operator
[](
int
i
)
const
{
return
_mm_extract_epi32
(
val
,
i
);
int
result
[
4
];
store
(
result
);
return
result
[
i
];
}
}
void
store
(
int
*
v
)
const
{
void
store
(
int
*
v
)
const
{
_mm_storeu_si128
((
__m128i
*
)
v
,
val
);
_mm_storeu_si128
((
__m128i
*
)
v
,
val
);
...
...
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