Size of memory and loops for intermediate results
[LOOPS,ROWS,LAST] = PRMEM(M,K)
Assume that an array of the size [M x K] has to be processed. The numbers of LOOPS and ROWS are determined which are needed such that ROWS*K < GLOBALPRMEMORY (a global variable that is initialized in this routine, if necessary). The final number of rows for the last loop is returned in LAST.
[M,K] = size(A);