• Home
  • Raw
  • Download

Lines Matching +full:api +full:- +full:name

2 # APIs to skip - they need to be done "manually":
5 'clGetExtensionFunctionAddress', # to return ICD-aware extensions
6 'clGetExtensionFunctionAddressForPlatform', # to return ICD-aware extensions
26 * Copyright (c) 2012-2023 The Khronos Group Inc.
32 * http://www.apache.org/licenses/LICENSE-2.0
53 %for api in apis:
54 %if not api.Name in apiskip:
56 handle = api.Params[0]
66 ${("CL_API_ENTRY", "static")[disp]} ${api.RetType} CL_API_CALL ${api.Name + ("", "_disp")[disp]}(
67 %for i, param in enumerate(api.Params):
68 % if i < len(api.Params)-1:
69 ${param.Type} ${param.Name}${param.TypeEnd},
71 ${param.Type} ${param.Name}${param.TypeEnd})
75 %if api.Name in apiinit:
81 % if api.Name == "clSVMFree":
83 khrFirstLayer->dispatch.${api.Name}(
85 return khrFirstLayer->dispatch.${api.Name}(
87 %for i, param in enumerate(api.Params):
88 % if i < len(api.Params)-1:
89 ${param.Name},
91 ${param.Name});
94 % if api.Name == "clSVMFree":
100 %if api.RetType in apihandles or api.RetType == "void*":
103 % if api.Name == "clCreateContext":
104 if (${api.Params[1].Name} == 0 || ${api.Params[2].Name} == NULL) {
107 KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(${api.Params[2].Name}[0], CL_INVALID_DEVICE);
110 % elif api.Name == "clCreateContextFromType":
116 % elif api.Name == "clSVMAlloc" or api.Name == "clGetExtensionFunctionAddressForPlatform":
117 KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(${handle.Name}, NULL);
119 KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(${handle.Name}, ${invalid});
121 %elif api.Name == "clSVMFree":
123 if (${handle.Name} != NULL)
126 %elif api.Name == "clWaitForEvents":
127 if (${api.Params[0].Name} == 0 || ${api.Params[1].Name} == NULL) {
130 KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(${api.Params[1].Name}[0], CL_INVALID_EVENT);
131 %elif api.Name == "clUnloadCompiler":
134 KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(${handle.Name}, ${invalid});
136 %if api.Name == "clCreateContext":
137 return ${api.Params[2].Name}[0]->dispatch->${api.Name}(
138 %elif api.Name == "clWaitForEvents":
139 return ${api.Params[1].Name}[0]->dispatch->${api.Name}(
140 %elif api.Name == "clCreateContextFromType":
141 return platform->dispatch->${api.Name}(
142 %elif api.Name == "clSVMFree":
143 ${handle.Name}->dispatch->${api.Name}(
144 %elif api.Name == "clUnloadCompiler":
147 return ${handle.Name}->dispatch->${api.Name}(
149 %for i, param in enumerate(api.Params):
150 % if i < len(api.Params)-1:
151 ${param.Name},
152 % elif param.Name: # for clUnloadCompiler
153 ${param.Name});
165 extern ${api.RetType} CL_API_CALL ${api.Name + "_disp"}(
166 %for i, param in enumerate(api.Params):
167 % if i < len(api.Params)-1:
168 ${param.Type} ${param.Name}${param.TypeEnd},
170 ${param.Type} ${param.Name}${param.TypeEnd}) ${api.Suffix};
203 %for api in apis:
205 handle = api.Params[0]
215 ${("CL_API_ENTRY", "static")[disp]} ${api.RetType} CL_API_CALL ${api.Name + ("", "_disp")[disp]}(
216 %for i, param in enumerate(api.Params):
217 % if i < len(api.Params)-1:
218 ${param.Type} ${param.Name}${param.TypeEnd},
220 ${param.Type} ${param.Name}${param.TypeEnd})
227 return khrFirstLayer->dispatch.${api.Name}(
228 %for i, param in enumerate(api.Params):
229 % if i < len(api.Params)-1:
230 ${param.Name},
232 ${param.Name});
237 %if api.RetType in apihandles or api.RetType == "void*":
239 // api.Name == "clXXX": # There are currently no API special cases here.
241 KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE(${handle.Name}, ${invalid});
242 KHR_ICD_VALIDATE_POINTER_RETURN_HANDLE(${handle.Name}->dispatch->${api.Name});
245 % if api.Name == "clGetGLContextInfoKHR":
249 KHR_ICD_VALIDATE_POINTER_RETURN_ERROR(platform->dispatch->${api.Name});
251 KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR(${handle.Name}, ${invalid});
252 KHR_ICD_VALIDATE_POINTER_RETURN_ERROR(${handle.Name}->dispatch->${api.Name});
255 %if api.Name == "clGetGLContextInfoKHR":
256 return platform->dispatch->${api.Name}(
258 return ${handle.Name}->dispatch->${api.Name}(
260 %for i, param in enumerate(api.Params):
261 % if i < len(api.Params)-1:
262 ${param.Name},
263 % elif param.Name: # for clUnloadCompiler
264 ${param.Name});