Set/get size of memory usage
N = PRMEMORY(N)
N : The desired / retrieved maximum size data of matrices (in
This retoutine sets or retrieves a global variable GLOBALPRMEMORY that controls the maximum size of data matrices in PRTools. Routines like KNNC, KNN_MAP, PARZEN_MAP and TESTP make use of it by computing additional loops and avoiding to define very large distance matrices. The default for this maximum size is set to 50000000. For most computers there is no need to reduce it. There is not much speed up to be expected if it is enlarged.
PRMEMORY gives also the number of elements for which a conversion from datafiles to datasets is approved.
This facility is illustrated by the following example, using the routine PRMEM.
Assume that an array of the size [M x K] has to be computed. 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);