Example charm++/matmul: generalize implementation body to varying sizes