5 Replies Latest reply on Apr 25, 2011 8:12 PM by nou

    inside-kernel __local defined variables

    bubu

      Is optimal to declare local memory in this way inside a kernel to avoid passing local memory pointers as kernel args, pls? I have the impression that __local variable arrays are mapped to global memory

       

      thx

      __kernel void MyKernel ( __global float4 *result ) { __local int a[128], b; __local float c[384]; /* ... do some operations with a, b, c and output result */ } vs __kernel void MyKernel ( __global float4 *result, __local int *a, __local int *b, __local float *c ) { /* ... do some operations with a, b, c and output result */ }