+testing works

This commit is contained in:
Evghenii
2014-01-06 18:13:06 +01:00
parent 277fd2f8eb
commit ee9d1ad26f
2 changed files with 4 additions and 4 deletions

View File

@@ -2,9 +2,9 @@
LLC=$HOME/usr/local/llvm/bin-trunk/bin/llc
ISPC=ispc
PTXCC=ptxcc
$(cat $1 |grep -v 'width'|$ISPC --target=nvptx --emit-llvm -o -|$LLC -march=nvptx64 -mcpu=sm_35 -o $1.ptx)
$($PTXCC $1.ptx -Xptxas=-v -o $1.ptx.o)
nvcc -o test_nvptx test_static_nvptx.cpp examples_ptx/nvcc_helpers.cu $1.ptx.o -arch=sm_35 -Iexamples_ptx/ -D_CUDA_ -lcudadevrt -DTEST_SIG=$2
$(cat $1 |grep -v 'width'|$ISPC --target=nvptx --emit-llvm -o -|$LLC -march=nvptx64 -mcpu=sm_35 -o $1.ptx) && \
$($PTXCC $1.ptx -Xptxas=-v -o $1.ptx.o) && \
nvcc -o test_nvptx test_static_nvptx.cpp examples_ptx/nvcc_helpers.cu examples_ptx/ispc_malloc.cpp $1.ptx.o -arch=sm_35 -Iexamples_ptx/ -D_CUDA_ -lcudadevrt -DTEST_SIG=$2

View File

@@ -103,7 +103,7 @@ int main(int argc, char *argv[]) {
#error "Unknown or unset TEST_SIG value"
#endif
float expected_result[64];
float *expected_result = new float[64];
memset(expected_result, 0, 64*sizeof(float));
result(expected_result);