Maybe we change the sequence of nesting the loops (first i_r-loop than j_x-loop), because of cache access optimization?