Input/Output
The
io-specifiers tell HyCuda which variables will be used as
input or output. When a variable is marked as input (i),
output (o) or both (io), HyCuda assumes that these
variables already exist on the CPU. Two structs will be declared,
Input and Output, containing pointers that should be
initialized by the programmer and passed to process to
execute the algorithm. HyCuda will make sure that the output will be
readily available (on the CPU) when the algorithm returns.
More precisely, both Input and Output contain
std::pair's of pointers and sizes (size_t). For
example:
struct Input
{
std::pair<float*, size_t> vec1;
// ...
}
The value passed as vec1.second will be assigned to the
symbolic memorysize specified in the HyCuda spec-file as the size of
vec1. See also Section 4 for a detailed
example.
Joren Heit
2013-12-17