getnrmt#

Purpose#

Computes number of rows to read per iteration for a program that reads data from a disk file in a loop.

Format#

nr = getnrmt(nsets, ncols, row, rowfac, maxv)#
Parameters:
  • nsets (scalar) – estimate of the maximum number of duplicate copies of the data matrix read by readr to be kept in memory during each iteration of the loop.

  • ncols (scalar) – columns in the data file.

  • row (scalar) – if row is greater than 0, nr will be set to row.

  • rowfac (scalar) – nr will be reduced in size by this factor. If insufficient memory error is encountered, change this to a number less than one (e.g. 0.9).

  • maxv (scalar) – the largest number of elements allowed in any one matrix.

Returns:

nr (scalar) – number of rows readr() should read per iteration of the read loop.

Source#

gaussmt.src