1 of 1 people found this helpful
There is limitation that HW don't know address register with dynamic index. So arrays which are accessed with dynamic index go to global memory aka scratch registers. You can move them to local memory which is much faster. Or try build binary search tree function from select() function.
float4 v; int i; float b= select(select(v.x, v.y, i==0), select(v.z, v.w, i==2), i>=2);
I was using local memory before, but was searching for better way, i'll try your bin. tree suggestion.⇄Détecter la langue » English
One more question.
Am i right assuming that compiler always puts my uchar16 var; into global memory if i have instruction of next form:
var2 = shuffle(var, mask); // in case mask is not compile time constant
?⇄Détecter la langue » English