diff options
author | kennyballou <kballou@onyx.boisestate.edu> | 2013-06-24 13:23:55 -0600 |
---|---|---|
committer | kennyballou <kballou@onyx.boisestate.edu> | 2013-06-24 13:23:55 -0600 |
commit | 2633043635ef2e2ce480d937fe79f65a793a2aa4 (patch) | |
tree | 665ce239484e54ac2080890cebe762d3bb37410e | |
parent | 9b91725fa3c986f92ef85d00ae591a5d9e95915a (diff) | |
download | xnt-2633043635ef2e2ce480d937fe79f65a793a2aa4.tar.gz xnt-2633043635ef2e2ce480d937fe79f65a793a2aa4.tar.xz |
Fix test program code
Make ``proper''
-rw-r--r-- | xnt/tests/compilercollectiontests.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xnt/tests/compilercollectiontests.py b/xnt/tests/compilercollectiontests.py index cb5b3fc..20d894f 100644 --- a/xnt/tests/compilercollectiontests.py +++ b/xnt/tests/compilercollectiontests.py @@ -97,7 +97,7 @@ class NvccTests(unittest.TestCase): with open("temp/hello.cu", "w") as test_code: test_code.write(""" __global__ void kernel(float *x) { - int idx = threadIdx.x; + int idx = blockIdx.x; x[idx] = 42; } int main() { @@ -109,6 +109,8 @@ class NvccTests(unittest.TestCase): kernel<<<128, 1>>>(dev_x); cudaMemcpy(x, dev_x, size, cudaMemcpyDeviceToHost); cudaFree(dev_x); + delete(x); + x = NULL; }""") def tearDown(self): """Test Case Teardown""" |