cl_platform_id * platforms,
cl_uint * num_platforms)
{
+ if(UNLIKELY(platforms == NULL && num_platforms == NULL))
+ return CL_INVALID_VALUE;
+ if(UNLIKELY(num_entries == 0 && platforms != NULL))
+ return CL_INVALID_VALUE;
+
return cl_get_platform_ids(num_entries, platforms, num_platforms);
}
void * param_value,
size_t * param_value_size_ret)
{
+ /* Only one platform. This is easy */
+ if (UNLIKELY(platform != NULL && platform != intel_platform))
+ return CL_INVALID_PLATFORM;
+
return cl_get_platform_info(platform,
param_name,
param_value_size,
cl_platform_id * platforms,
cl_uint * num_platforms)
{
- return cl_get_platform_ids(num_entries, platforms, num_platforms);
+ return clGetPlatformIDs(num_entries, platforms, num_platforms);
}
struct _cl_icd_dispatch const cl_khr_icd_dispatch = {
{
if (num_platforms != NULL)
*num_platforms = 1;
- if (UNLIKELY(platforms == NULL))
- return CL_SUCCESS;
- if (UNLIKELY(num_entries == 0))
- return CL_INVALID_VALUE;
- if (UNLIKELY(num_platforms == NULL && platforms == NULL))
- return CL_SUCCESS;
-#if 0
- if (UNLIKELY(num_platforms == NULL && platforms != NULL))
- return CL_INVALID_VALUE;
-#endif
- if (UNLIKELY(num_platforms != NULL && platforms == NULL))
- return CL_INVALID_VALUE;
cl_intel_platform_extension_init(intel_platform);
/* Easy right now, only one platform is supported */
- *platforms = intel_platform;
+ if(platforms)
+ *platforms = intel_platform;
intel_platform->extensions_sz = strlen(intel_platform->extensions) + 1;
return CL_SUCCESS;
}
void * param_value,
size_t * param_value_size_ret)
{
- /* Only one platform. This is easy */
- if (UNLIKELY(platform != NULL && platform != intel_platform))
- return CL_INVALID_PLATFORM;
-
if (param_value == NULL) {
switch (param_name) {
GET_FIELD_SZ (PLATFORM_PROFILE, profile);