Fix parsing of 'launch' so that angle brackets can be removed.
Issue #6.
This commit is contained in:
@@ -43,5 +43,5 @@ uniform float result[])
|
||||
|
||||
uniform int span = N / 8; // 8 tasks
|
||||
|
||||
launch[N/span] < saxpy_ispc_task(N, span, scale, X, Y, result) >;
|
||||
launch[N/span] saxpy_ispc_task(N, span, scale, X, Y, result);
|
||||
}
|
||||
|
||||
27
tests_errors/old-launch-syntax.ispc
Normal file
27
tests_errors/old-launch-syntax.ispc
Normal file
@@ -0,0 +1,27 @@
|
||||
// "launch" expressions no longer take '<' '>' around function call expression.
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
static uniform float array[10000];
|
||||
|
||||
task void x(float f) {
|
||||
uniform int j;
|
||||
uniform int i = taskIndex;
|
||||
array[i] = i / 10000.;
|
||||
cfor (j = 0; j < 10000; ++j)
|
||||
array[i] = sin(array[i]);
|
||||
if (array[i] < .02)
|
||||
array[i] = i;
|
||||
}
|
||||
export void f_f(uniform float RET[], uniform float fFOO[]) {
|
||||
float f = fFOO[programIndex];
|
||||
launch[10000] < x(f) >;
|
||||
sync;
|
||||
RET[programIndex] = array[9999];
|
||||
}
|
||||
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = 9999.000000;
|
||||
}
|
||||
Reference in New Issue
Block a user