xref: /aosp_15_r20/external/OpenCL-ICD-Loader/loader/windows/icd_windows.h (revision 1cddb830dba8aa7c1cc1039338e56b3b9fa24952)
1 /*
2  * Copyright (c) 2017-2019 The Khronos Group Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * OpenCL is a trademark of Apple Inc. used under license by Khronos.
17  */
18 
19 #include <stdbool.h>
20 #include <windows.h>
21 
22 #ifdef _LP64
23 #define PRIDW_PREFIX
24 #define PRIUL_PREFIX
25 #else
26 #define PRIDW_PREFIX "l"
27 #define PRIUL_PREFIX "l"
28 #endif
29 #define PRIuDW PRIDW_PREFIX "u"
30 #define PRIxDW PRIDW_PREFIX "x"
31 #define PRIuUL PRIUL_PREFIX "u"
32 #define PRIxUL PRIUL_PREFIX "x"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 extern const LUID ZeroLuid;
38 
39 BOOL adapterAdd(const char* szName, LUID luid);
40 
41 // Do not free the memory returned by this function.
42 const char* getOpenCLRegKeyName(void);
43 
44 #ifdef __cplusplus
45 }
46 #endif
47