summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hoffmann <volker@cheleb.net>2014-07-04 14:53:09 +0200
committerVolker Hoffmann <volker@cheleb.net>2014-07-04 14:53:09 +0200
commitc2de57c043b93477a4fd01fbcaa364ec469134b2 (patch)
tree476853fbac9279e3e4cbaa82113190a8448ac641
parent85e3015c19e2e4eb57abe3d63da5b36669886e5d (diff)
test some boring variable not in shared memory to pass to device wfunction
-rw-r--r--functionTest.cu5
1 files changed, 3 insertions, 2 deletions
diff --git a/functionTest.cu b/functionTest.cu
index 38863ba..eac1ab6 100644
--- a/functionTest.cu
+++ b/functionTest.cu
@@ -6,12 +6,13 @@ template <int nthreads>
__device__ void f2(int idx, float x_s[nthreads])
{
__shared__ float y_s[nthreads];
+ int kk = 1;
y_s[idx] = x_s[idx];
__syncthreads();
if(idx>0) {
- printf("%i %.2e %.2e %.2e %.2e\n", idx, x_s[idx], x_s[idx-1], y_s[idx], y_s[idx-1]);
+ printf("%i %i %.2e %.2e %.2e %.2e\n", kk, idx, x_s[idx], x_s[idx-1], y_s[idx], y_s[idx-1]);
} else {
- printf("%i %.2e %.2e\n", idx, x_s[idx], y_s[idx]);
+ printf("%i %i %.2e %.2e\n", kk, idx, x_s[idx], y_s[idx]);
}
}