Thanks, @ptrblck for the reply. It looks like it is along the lines of what I am expecting, but it is not totally behaving as desired. For the use case mentioned, I am expecting the 24 nonzero entries to be at the beginning of the first row. For the second row, the 24 nonzero entries would be in the middle (index 12 to index 36), while for the third row, the 24 nonzero entries would be at the end of the row (index 24 to index 48).
Thanks again!