Nice! You can optimize it a little further by interchanging the loops for 'col' and 'k', because then 'x' needs to be loaded only once. Right now you might get loaded multiple times.