__EMBEDDED_PROFILE__

Hi,

I read in the spec that the macro EMBEDDED_PROFILE must be added to the language to do embedded profile
where exactly in the .cl file does it need to be added?
and what is the syntax?

Thanks.

The spec states “The EMBEDDED_PROFILE macro is added to the language (refer to section 6.9). It will
be the integer constant 1 for OpenCL devices that implement the embedded profile and is
undefined otherwise.”

If EMBEDDED_PROFILE is defined then this is an indicator that your kernels are executing on the embedded profile. This allows you to write profile-specific code i.e. code path that will be executed on the embedded profile another code path for the full profile. Note that the embedded profile is a proper subset of the full profile.