summaryrefslogtreecommitdiff
path: root/tests/matrix_test.py
diff options
context:
space:
mode:
authorAnthony LaTorre <telatorre@gmail.com>2011-05-15 18:35:41 -0400
committerAnthony LaTorre <telatorre@gmail.com>2011-05-15 18:35:41 -0400
commit2aa342458d1278487f9ca47ff0111e74b20d63ef (patch)
tree63f2bfbbc1f971525cf1f79c06e74d969484eaa2 /tests/matrix_test.py
parent8ea783d053e817568b3e7d04f28a6fd2583f18cf (diff)
downloadchroma-2aa342458d1278487f9ca47ff0111e74b20d63ef.tar.gz
chroma-2aa342458d1278487f9ca47ff0111e74b20d63ef.tar.bz2
chroma-2aa342458d1278487f9ca47ff0111e74b20d63ef.zip
cleanup. fixed tests
Diffstat (limited to 'tests/matrix_test.py')
-rw-r--r--tests/matrix_test.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/matrix_test.py b/tests/matrix_test.py
index bc4115e..c843025 100644
--- a/tests/matrix_test.py
+++ b/tests/matrix_test.py
@@ -1,3 +1,4 @@
+import os
import numpy as np
from pycuda import autoinit
from pycuda.compiler import SourceModule
@@ -8,10 +9,12 @@ float3 = gpuarray.vec.float3
print 'device %s' % autoinit.device.name()
-source = open('../matrix.h').read() + open('../linalg.h').read() + \
- open('matrix_test.cu').read()
+current_directory = os.path.split(os.path.realpath(__file__))[0]
+source_directory = current_directory + '/../src'
-mod = SourceModule(source, no_extern_c=True, arch='sm_13')
+source = open(current_directory + '/matrix_test.cu').read()
+
+mod = SourceModule(source, options=['-I' + source_directory], no_extern_c=True, cache_dir=False)
det = mod.get_function('det')
inv = mod.get_function('inv')