# Buffer of arrays in HLSL compute shader

I'm trying to follow along with a tutorial that uses an OpenGL compute shader, but I'm using D3D11. What they do is:

layout (std430, binding = 0) buffer indices {
int j[];
};


I have no experience with this and very little with directX, but that looks like a buffer of integer arrays. I've looked around and read that the equivalent to this OpenGL buffer in D3D11 is an RWBuffer. Using a compute shader, this is what I've tried. Note, I didn't redefine them in my code as they appear here, I just listed them together here.

RWBuffer indices
{
int j[];
}

RWBuffer<{int j[];}> indices;

struct index
{
//requires explicit length, which is why this doesn't work
int j[];
}
RWStructuredBuffer<index> indices;


But, none of those worked. The end goal is to access them like so:

//id is SV_DispatchThreadID
indices.j[int(id.y)]


This seems like an inappropriately simple question to post, but I wasn't able to find documentation, even on MSDN, on defining buffers and what's allowed and not, etc.

RWBuffer<int> indices;

indices[int(id.y)]