Suppose I have a 2D tensor A and a 1-D tensor C recording the length of each chunk.
For example, C[0]=4, means I want A[0:4]; C[1]=5, means I want A[4:9], so on so forth.
It is easy to manually iterate over the C to find all these chunks.
However, this is very slow.
I am wondering if there is efficient operation that can get these chunks in a faster way?