some changes
This commit is contained in:
@@ -271,8 +271,8 @@ def run_test(testname):
|
||||
print "Grepping: %s" % grep_cmd
|
||||
sp = subprocess.Popen(grep_cmd, shell=True)
|
||||
sp.communicate()
|
||||
ispc_cmd = ispc_exe_rel + " --woff %s -o %s --arch=%s --emit-asm --target=%s" % \
|
||||
(filename4ptx, obj_name, options.arch, options.target)
|
||||
ispc_cmd = ispc_exe_rel + " --woff %s -o %s --emit-asm --target=%s" % \
|
||||
(filename4ptx, obj_name, options.target)
|
||||
|
||||
# compile the ispc code, make the executable, and run it...
|
||||
(compile_error, run_error) = run_cmds([ispc_cmd, cc_cmd],
|
||||
|
||||
@@ -4,19 +4,27 @@ export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
struct Foo {
|
||||
uniform float udx[25][25];
|
||||
uniform float udx[32][32];
|
||||
};
|
||||
|
||||
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
||||
float a = aFOO[programIndex];
|
||||
#ifndef __NVPTX__
|
||||
uniform Foo f[5];
|
||||
#else __NVPTX__ /* too much shared memory allocated, nvcc fails to link */
|
||||
uniform Foo * uniform f = uniform new uniform Foo[5];
|
||||
#define _UNMALLOC
|
||||
#endif
|
||||
cfor (uniform int i = 0; i < 5; ++i)
|
||||
cfor (uniform int j = 0; j < 25; ++j)
|
||||
cfor (uniform int k = 0; k < 25; ++k)
|
||||
cfor (uniform int j = 0; j < 32; ++j)
|
||||
cfor (uniform int k = 0; k < 32; ++k)
|
||||
f[i].udx[j][k] = 1000*i+100*j+k;
|
||||
|
||||
int x = 1;
|
||||
RET[programIndex] = f[x+1].udx[b-4][programIndex];
|
||||
#ifdef _UNMALLOC
|
||||
delete f;
|
||||
#endif
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) { RET[programIndex] = 2100 +programIndex; }
|
||||
|
||||
Reference in New Issue
Block a user