1 2 3 4 5 6 7 8 9 10 11 12
extern static const int N; struct S { int xs[N]; } RWStructuredBuffer<S> b; [numthreads(1, 1, 1)] void computeMain() { for(int i = 0; i < N; ++i) b[0].xs[i] *= N; }