Next: In practice
Up: Implementation
Previous: Implementation
Contents
Several data buffers are needed in this problem. In particular,
transposition buffers are needed to go to/from the internal gridding
engine which works on velocity-first arrays. The buffers are:
- the table data buffer (size
),
- the table transposition/sorting buffer (size
) if (and only if) the transposition of the table (.bat)
and/or sorting (positions not sorted by Y offsets) are needed. The
same buffer is used for both tasks.
- the cube data buffer (size
),
- the cube transposition/sorting buffer (size
) if and only transposition of the cube is needed
(.lmv).
We call
the total amount of memory
allocated to the buffers. Note that they all scale as
. Some
other allocatable buffers are involved (e.g. X, Y, W columns read from
the table) but they are neglictible in front of the data size, and
they do not scale as
.
The command XY_MAP needs memory space to allocate these
buffers. However, it does not allocate freely the memory: it ensures
they fit in a limited memory space (VOLATILE_MEMORY, we do not
consider here the way it is defined).
If
VOLATILE_MEMORY, the 4 buffers above fit in the
dedicated memory space. We are in the best case where all the problem
fits in memory. In particular, the output cube fits in memory and will
be written at once, whatever its order.
If
VOLATILE_MEMORY, the 4 buffers do not fit in the
dedicated memory space. The problem will be iterated by blocks of
channels along its velocity dimension. There will be
iterations,
the buffers being divided by the same and correct amount. But, in this
case, there are 2 possibilities:
At this stage,
is the minimum (floating point) number of divisions
needed. The number of channels processed per division is then:
 |
(4) |
Rounding to an integer number of channels is obviously needed as the
internal engine can not process fraction of channels. Down-rounding is
used because up-rounding could mean using more than VOLATILE_MEMORY per division. Because of the integer rounding, the
actual number of divisions which will be performed is finally:
 |
(5) |
Note that the last division may process less channels than the other
ones, because the total number of channels
may not be a multiple
of
.
Next: In practice
Up: Implementation
Previous: Implementation
Contents
Gildas manager
2023-06-01