Consider multiple platforms on the same system, e.g. Intel OpenCL SDK for targeting an Intel CPU, and Nvidia SDK for targeting an Nvidia GPU. Both platforms / devices shall be targeted in the same application.
#including cl.h gives me access to typedefs such as cl_int, cl_double etc.
Obviously however I can only #include cl.h of a single platform. But I don't see any guarantee that say cl_int of the Intel SDK map to the same host application type as cl_int of the Nvidia SDK.
My question is: Am I correct that in general there can be little done about that? Is there any technical way to get the guarantee that host code types match to all device code types correctly (without storing the host data individually for each platform of course)?
If there is no such solution (which I do suppose...), or if it is very expensive, is there some more or less straightforward way to make at least a compiletime / runtime check that host application types are identical for all platforms and host data can be distributed to any platform-device?