A Method for Programming Matrix Algorithms in Array Processors