fix out-of-bounds in AMD version of VectorAdd

This commit is contained in:
erwin.coumans
2010-06-25 00:40:20 +00:00
parent 5db1c008bd
commit b83e16b7ff
3 changed files with 6 additions and 1 deletions

View File

@@ -24,6 +24,8 @@ __kernel void VectorAdd(__global const float8* a, __global const float8* b, __gl
{
// get oct-float index into global data array
int iGID = get_global_id(0);
if (iGID>=100000)
return;
// read inputs into registers
float8 f8InA = a[iGID];