I’m trying to port a rather large code to GPU but I’m running in to some difficulties.
(1) Is it allowed to use the [/b]value attribute in module scope. By doing this does the compiler automatically know that the variable is a device variable, as the compiler throws up errors if I put both the device and the value**?
(2) 5 of the arrays I’m trying to copy over to the device are automatic arrays (their size is determined by an adjustable variable, dependent on the data inputted in other parts of the program), which is not allowed.
Would it be possible to get around this by allocating the array size, or is this still classed as being automatic? As I’m trying to save memory usage on the device I’d rather use a more efficient method than just setting a huge arrays.
Any suggestions or comments would be much appreciated.