HILA
|
Global variable class within hila namespace. More...
#include <globals.h>
Global variable class within hila namespace.
Special wrapper for "simple" types (elementary types, simple structs etc.). Implemented on gpus automatically using __constant__
memory. All global variables exist for the whole program lifetime.
Declaration is possible on top (file) level only, not inside functions!
For example
Assignment is not possible inside loops Only "full" assignment is possible, not e.g. by field records
The value of the variable is obtained with function-like "()" call
Variable can be used everywhere in the source file.
"extern" and "static" can be used, if there are several source files, with the usual meaning:
Declarations can be enclosed in namespaces:
Variables cannot be initialized in declaration, because (possible) GPUs are not initialized.