summaryrefslogtreecommitdiff
path: root/tests/rotate_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rotate_test.py')
-rw-r--r--tests/rotate_test.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/rotate_test.py b/tests/rotate_test.py
index 8c2cfcb..92eff84 100644
--- a/tests/rotate_test.py
+++ b/tests/rotate_test.py
@@ -1,3 +1,4 @@
+import os
import numpy as np
from pycuda import autoinit
from pycuda.compiler import SourceModule
@@ -16,9 +17,12 @@ def rotate(x, phi, n):
print 'device %s' % autoinit.device.name()
-source = open('../linalg.h').read() + open('../matrix.h').read() + \
- open('../rotate.h').read() + open('rotate_test.cu').read()
-mod = SourceModule(source, no_extern_c=True, arch='sm_13')
+current_directory = os.path.split(os.path.realpath(__file__))[0]
+source_directory = current_directory + '/../src'
+
+source = open(current_directory + '/rotate_test.cu').read()
+
+mod = SourceModule(source, options=['-I' + source_directory], no_extern_c=True, cache_dir=False)
rotate_gpu = mod.get_function('rotate')