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
5db397d0
Commit
5db397d0
authored
May 29, 2013
by
peastman
Browse files
Merge pull request #13 from proteneer/master
Add support for long long shuffle
parents
c589f1cc
370c8403
Changes
1
Show 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 @
5db397d0
...
@@ -25,6 +25,16 @@ static __inline__ __device__ double real_shfl(double var, int srcLane) {
...
@@ -25,6 +25,16 @@ static __inline__ __device__ double real_shfl(double var, int srcLane) {
lo
=
__shfl
(
lo
,
srcLane
);
lo
=
__shfl
(
lo
,
srcLane
);
return
__hiloint2double
(
hi
,
lo
);
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
#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