1. A non-transitory computer-readable storage medium embodying instructions that, when executed by a processing device, cause the processing device to perform a method for preconditioning, said method comprising: accessing a matrix comprising a plurality of coefficients of a system of linear equations; accessing coloring information corresponding to said matrix; and determining a diagonal matrix of a preconditioning matrix of said matrix based on said matrix and said coloring information corresponding to said matrix, wherein said determining comprises: assigning a plurality of execution threads to a plurality of elements of a respective color in said diagonal matrix; and computing said plurality of elements of said respective color by executing said plurality of execution threads in said processing device.