A method for encoding a sparse matrix into a data structure on a computing system including a computation device including a plurality of parallel processing units, the data structure including a first array, a second array (604, 606) and a third array, the method comprising: receiving the sparse matrix; traversing a set of designated rows of the sparse matrix according to a deterministic sequence until all non-zero elements in the sparse matrix have been placed in the first array; each time a row of the set is traversed according to the deterministic sequence, placing a next non-zero element in that row in the first array, wherein each row in the set has a first non-zero element placed in the first array before a second element from that row is placed in the first array; if all non-zero elements for a given row of the set of designated rows have been placed in the first array, replacing the given row in the set of designated rows with a next unprocessed row of the sparse matrix; and each time a next non-zero element is placed in the first array, placing a column index of that next non-zero element in a corresponding position in the second array, or placing an address to which a vector value at a column index of that next non-zero element has been mapped in a data buffer in a corresponding position in the second array, the elements and corresponding indices of a sparse vector being mapped to addresses of the data buffer, and the sparse vector being selected to perform a computation with the sparse matrix; for each row of the sparse matrix, placing a value corresponding to the number of non-zero elements in that row into the third array or placing a value corresponding to a position in the first array of a first non-zero element in that row into the third array; and outputting, to a storage device of the computing system, the data structure in which the sparse matrix is encoded; wherein the sparse matrix is utilized by the computation device to perform the computation with the sparse vector, and the number of designated rows in the set corresponds to the number of parallel processing units of the computation device. receiving the sparse matrix; traversing a set of designated rows of the sparse matrix according to a deterministic sequence until all non-zero elements in the sparse matrix have been placed in the first array; each time a row of the set is traversed according to the deterministic sequence, placing a next non-zero element in that row in the first array, wherein each row in the set has a first non-zero element placed in the first array before a second element from that row is placed in the first array; if all non-zero elements for a given row of the set of designated rows have been placed in the first array, replacing the given row in the set of designated rows with a next unprocessed row of the sparse matrix; and each time a next non-zero element is placed in the first array, placing a column index of that next non-zero element in a corresponding position in the second array, or placing an address to which a vector value at a column index of that next non-zero element has been mapped in a data buffer in a corresponding position in the second array, the elements and corresponding indices of a sparse vector being mapped to addresses of the data buffer, and the sparse vector being selected to perform a computation with the sparse matrix; for each row of the sparse matrix, placing a value corresponding to the number of non-zero elements in that row into the third array or placing a value corresponding to a position in the first array of a first non-zero element in that row into the third array; and outputting, to a storage device of the computing system, the data structure in which the sparse matrix is encoded; wherein the sparse matrix is utilized by the computation device to perform the computation with the sparse vector, and the number of designated rows in the set corresponds to the number of parallel processing units of the computation device.