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
370c8403
Commit
370c8403
authored
May 29, 2013
by
Yutong Zhao
Browse files
add support for long long shuffles
parent
6943ef5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
platforms/cuda/src/kernels/nonbonded.cu
platforms/cuda/src/kernels/nonbonded.cu
+10
-0
No files found.
platforms/cuda/src/kernels/nonbonded.cu
View file @
370c8403
...
...
@@ -25,6 +25,16 @@ static __inline__ __device__ double real_shfl(double var, int srcLane) {
lo
=
__shfl
(
lo
,
srcLane
);
return
__hiloint2double
(
hi
,
lo
);
}
static
__inline__
__device__
long
long
real_shfl
(
long
long
var
,
int
srcLane
)
{
int
hi
,
lo
;
asm
volatile
(
"mov.b64 { %0, %1 }, %2;"
:
"=r"
(
lo
),
"=r"
(
hi
)
:
"l"
(
var
));
hi
=
__shfl
(
hi
,
srcLane
);
lo
=
__shfl
(
lo
,
srcLane
);
// unforunately there isn't an __nv_hiloint2long(hi,lo) intrinsic cast
int2
fuse
;
fuse
.
x
=
lo
;
fuse
.
y
=
hi
;
return
*
reinterpret_cast
<
long
long
*>
(
&
fuse
);
}
#endif
/**
...
...
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