How to work with more than 1024 elements in a buffer in a compute shader ?

So the compute shader has a maximum of 1024 threads. How do I work on a buffer with more than 1024 elements ? Can I iterate an arbitrary amount of elements of a buffer in a single thread ?

the buffer and threads are independent you can do I*J loops of the same maths in every thread.
search online for compute buffer syntax with 2048 you will find some infos.

also i believe that the buffer length max of 2mn worksfine to input output arrays, and you can have x,y,z of the dispatchthreadID, so you can do threads in 3d, i.e. 1024.1024.1024 threads, except that unity free is perhaps limited to y.z. dimensions to be 1, check latest versoin to be sure they changed alot in v5.