There are two memory-allocation modes available, indicated by the
keywords %static and %dynamic. When the mode is
set to static, HyCuda generates code to allocate all memory
when the final HyCudaAlgorithm-object is instantiated, and
frees the memory when the object is destroyed. For this to be
possible, the number of elements in each block of memory must be known
in advance, and be independent of runtime input. The memory-sizes (see
Section 2.2) can still be symbolic values, but these
should be defined (e.g. in an enum or by #define's)
by the user and pre-included (e.g. using %include) in order
to be seen by the allocation functions.
When the allocation-mode is set to %dynamic, array-sizes may
depend on the runtime input. Only when the process-member is
called on the object, to which the input and output parameters are
passed (Section 2.2.1), will the memory be
allocated. More on this on Section 2.2.
Joren Heit
2013-12-17