diff options
author | Yang Rong <rong.r.yang@intel.com> | 2014-06-21 00:15:44 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-06-20 17:35:03 +0800 |
commit | a1f9bd02b1cc41fdded1a13c9077ba7d4971d9e6 (patch) | |
tree | f0c6c0da9ac0640021e51ab24f5891db9bd251ea /src/cl_api.c | |
parent | 02cba1c31588ecc6c7e8b78b9a06417215d8011f (diff) | |
download | beignet-a1f9bd02b1cc41fdded1a13c9077ba7d4971d9e6.tar.gz |
Add some API's OpenCL 1.2 parameter support.
Support CL_PROGRAM_KERNEL_NAMES and CL_PROGRAM_NUM_KERNELS in API clGetProgramInfo,
and CL_DOUBLE_FP_CONFIG in API clGetDeviceInfo.
Also fix a bug of CL_MEM_HOST_PTR in API clGetMemObjectInfo.
v2:
also fix the utest get_mem_info.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'src/cl_api.c')
-rw-r--r-- | src/cl_api.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cl_api.c b/src/cl_api.c index b8b4cfa9..32f91d72 100644 --- a/src/cl_api.c +++ b/src/cl_api.c @@ -1061,12 +1061,17 @@ clGetProgramInfo(cl_program program, } else if (param_name == CL_PROGRAM_DEVICES) { cl_device_id dev_id = program->ctx->device; FILL_GETINFO_RET (cl_device_id, 1, &dev_id, CL_SUCCESS); + } else if (param_name == CL_PROGRAM_NUM_KERNELS) { + cl_uint kernels_num = program->ker_n; + FILL_GETINFO_RET (cl_uint, 1, &kernels_num, CL_SUCCESS); } else if (param_name == CL_PROGRAM_SOURCE) { if (!program->source) FILL_GETINFO_RET (char, 1, &ret_str, CL_SUCCESS); FILL_GETINFO_RET (char, (strlen(program->source) + 1), program->source, CL_SUCCESS); + } else if(param_name == CL_PROGRAM_KERNEL_NAMES) { + cl_program_get_kernel_names(program, param_value_size, (char *)param_value, param_value_size_ret); } else if (param_name == CL_PROGRAM_BINARY_SIZES) { if (program->binary == NULL){ if( program->binary_type == CL_PROGRAM_BINARY_TYPE_EXECUTABLE) { |