So that static array I mentioned last post just got a lot more interesting. At first, I thought it was an array of values that contained information about the Equidistant Surface for doing calculations on how much flux the observer actually sees. It does do this, but the way it does it is very different than what I thought. My intuition was that each array element was some value, and that it was static for ease of access by mulitiple programs. What it actually is, is an array of a struct that contains several doubles.
What this means is you specify values for each struct object for each array point, creating a collection of parameters for for every point in discrete space. It is very cool indeed, but I am now even more unsure of how to copy this static object to the GPU. I don't want to dismantle it, as it is such an elegant solution to the problem of defining all these variables for each point, but I have yet to find a way to preserve the array while transfering it over to CUDA. I might be able to get around the issue if each thread creates its own instance of the struct, but I don't know if that is possible, either. More information is coming soon.
What this means is you specify values for each struct object for each array point, creating a collection of parameters for for every point in discrete space. It is very cool indeed, but I am now even more unsure of how to copy this static object to the GPU. I don't want to dismantle it, as it is such an elegant solution to the problem of defining all these variables for each point, but I have yet to find a way to preserve the array while transfering it over to CUDA. I might be able to get around the issue if each thread creates its own instance of the struct, but I don't know if that is possible, either. More information is coming soon.
Comments
Post a Comment