@@ -5191,6 +5191,57 @@ static cl_mem CL_API_CALL clCreateImageWithProperties_disp(
51915191
51925192///////////////////////////////////////////////////////////////////////////////
51935193
5194+ CL_API_ENTRY cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSize (
5195+ cl_command_queue command_queue ,
5196+ cl_kernel kernel ,
5197+ cl_uint work_dim ,
5198+ const size_t * global_work_offset ,
5199+ const size_t * global_work_size ,
5200+ size_t * suggested_local_work_size )
5201+ {
5202+ #if defined(CL_ENABLE_LAYERS )
5203+ if (khrFirstLayer )
5204+ return khrFirstLayer -> dispatch .clGetKernelSuggestedLocalWorkSize (
5205+ command_queue ,
5206+ kernel ,
5207+ work_dim ,
5208+ global_work_offset ,
5209+ global_work_size ,
5210+ suggested_local_work_size );
5211+ #endif // defined(CL_ENABLE_LAYERS)
5212+ KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR (command_queue , CL_INVALID_COMMAND_QUEUE );
5213+ return KHR_ICD2_DISPATCH (command_queue )-> clGetKernelSuggestedLocalWorkSize (
5214+ command_queue ,
5215+ kernel ,
5216+ work_dim ,
5217+ global_work_offset ,
5218+ global_work_size ,
5219+ suggested_local_work_size );
5220+ }
5221+
5222+ ///////////////////////////////////////////////////////////////////////////////
5223+ #if defined(CL_ENABLE_LAYERS )
5224+ static cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSize_disp (
5225+ cl_command_queue command_queue ,
5226+ cl_kernel kernel ,
5227+ cl_uint work_dim ,
5228+ const size_t * global_work_offset ,
5229+ const size_t * global_work_size ,
5230+ size_t * suggested_local_work_size )
5231+ {
5232+ KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR (command_queue , CL_INVALID_COMMAND_QUEUE );
5233+ return KHR_ICD2_DISPATCH (command_queue )-> clGetKernelSuggestedLocalWorkSize (
5234+ command_queue ,
5235+ kernel ,
5236+ work_dim ,
5237+ global_work_offset ,
5238+ global_work_size ,
5239+ suggested_local_work_size );
5240+ }
5241+ #endif // defined(CL_ENABLE_LAYERS)
5242+
5243+ ///////////////////////////////////////////////////////////////////////////////
5244+
51945245// cl_ext_device_fission
51955246
51965247CL_API_ENTRY cl_int CL_API_CALL clReleaseDeviceEXT (
@@ -7026,7 +7077,10 @@ const struct _cl_icd_dispatch khrMainDispatch = {
70267077 /* OpenCL 3.0 */
70277078 & clCreateBufferWithProperties_disp ,
70287079 & clCreateImageWithProperties_disp ,
7029- & clSetContextDestructorCallback_disp
7080+ & clSetContextDestructorCallback_disp ,
7081+
7082+ /* OpenCL 3.1 */
7083+ & clGetKernelSuggestedLocalWorkSize_disp ,
70307084}
70317085;
70327086#endif // defined(CL_ENABLE_LAYERS)
@@ -8621,6 +8675,22 @@ static cl_mem CL_API_CALL clCreateImageWithProperties_unsupp(
86218675 (void )errcode_ret ;
86228676 KHR_ICD_ERROR_RETURN_HANDLE (CL_INVALID_OPERATION );
86238677}
8678+ static cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSize_unsupp (
8679+ cl_command_queue command_queue ,
8680+ cl_kernel kernel ,
8681+ cl_uint work_dim ,
8682+ const size_t * global_work_offset ,
8683+ const size_t * global_work_size ,
8684+ size_t * suggested_local_work_size )
8685+ {
8686+ (void )command_queue ;
8687+ (void )kernel ;
8688+ (void )work_dim ;
8689+ (void )global_work_offset ;
8690+ (void )global_work_size ;
8691+ (void )suggested_local_work_size ;
8692+ KHR_ICD_ERROR_RETURN_ERROR (CL_INVALID_OPERATION );
8693+ }
86248694
86258695///////////////////////////////////////////////////////////////////////////////
86268696// cl_ext_device_fission
@@ -9373,7 +9443,10 @@ const struct _cl_icd_dispatch khrDeinitDispatch = {
93739443 /* OpenCL 3.0 */
93749444 & clCreateBufferWithProperties_unsupp ,
93759445 & clCreateImageWithProperties_unsupp ,
9376- & clSetContextDestructorCallback_unsupp
9446+ & clSetContextDestructorCallback_unsupp ,
9447+
9448+ /* OpenCL 3.1 */
9449+ & clGetKernelSuggestedLocalWorkSize_unsupp ,
93779450}
93789451;
93799452#endif // defined(CL_ENABLE_LAYERS)
@@ -9728,6 +9801,9 @@ void khrIcd2PopulateDispatchTable(
97289801 dispatch -> clCreateImageWithProperties = (clCreateImageWithProperties_t * )(size_t )p_clIcdGetFunctionAddressForPlatform (platform , "clCreateImageWithProperties" );
97299802 if (!dispatch -> clCreateImageWithProperties )
97309803 dispatch -> clCreateImageWithProperties = & clCreateImageWithProperties_unsupp ;
9804+ dispatch -> clGetKernelSuggestedLocalWorkSize = (clGetKernelSuggestedLocalWorkSize_t * )(size_t )p_clIcdGetFunctionAddressForPlatform (platform , "clGetKernelSuggestedLocalWorkSize" );
9805+ if (!dispatch -> clGetKernelSuggestedLocalWorkSize )
9806+ dispatch -> clGetKernelSuggestedLocalWorkSize = & clGetKernelSuggestedLocalWorkSize_unsupp ;
97319807
97329808///////////////////////////////////////////////////////////////////////////////
97339809// cl_ext_device_fission
0 commit comments