So I know that openCL has a lot of restrictions when it comes to what kind of arguments it can accept being passed into a kernel. For instance, it doesn't support C++ class types and a struct can't have a pointer as an argument. However, can openCL support structs that have non-pointer structs as fields?
For instance if I did the following:
typedef struct
{
int a;
float b;
} MyStruct1;
typedef struct
{
float a;
MyStruct1 field;
} MyStruct2;
__kernel void MyKernel(const MyStruct2 *struct)
{
MyStruct1 innerStruct = struct->field;
//Do more stuff
}
^^Would that be legal in openCL? And if it is legal, are there any special memory issues that I should be aware of?