This seems like a relatively simple question, but I've sourced out pages on Google that says it is OK to do so, and I've sourced out pages that says it's NOT. Which is it, in short?

OBVIOUSLY, you can't have structs with pointers in it, because you have a memory arena conflict (GPU memory vs host memory), but what about if it's just a struct full of doubles (I have the cl_khr_fp64 extension enabled)?

Better yet, my exact problem: What if it's a struct of type OUTER, which contains 3 structs of type INNER, which each contain 3 doubles (so 9 doubles is the size of struct OUTER). I feel this should be allowed as it's just contiguous memory and the OpenCL env. is aware of how large the struct is via the struct definitions, and it's copied onto the GPU from the host via a size parameter in WriteBuffer.

So is it allowed? Or do I have to pass in a pointer to 9 doubles? The reason I want to use structs (obvious encapsulation) is because the types don't always match, so it's easier to throw 5 doubles and 3 ints into a struct than to have a casting fit void* array and it is certainly more flexible if you want to add...but if I can't, I can't.

I'm having memory issues, and I believe this may be the root (I'm packaging numbers in structs, both the GPU and host are aware of them, no pointers).

Thanks in advance.