I have always assumed that renderscripts are threadsafe with forEach across an allocation. To aid in my debugging, can someone confirm this?
(I'm seeing a static array value check succeed, but using rsDebug shows that the check should have failed.
static uint32_t state[16];
static void f(); // modifies state.
/* snip... */
void
root(const uint32_t *in, uint32_t *out)
{
/* snip... */
f();
if(state[0] == 0)
{
rsDebug("state[0]", state[0]);
*out = 1;
}
}
I see printed state[0] with a nonzero value!)