1#![allow(non_camel_case_types, non_snake_case)]
18
19pub use super::cl_icd::cl_icd_dispatch;
20use super::cl_platform::{cl_int, cl_uint};
21use libc::{c_void, size_t};
22
23pub type cl_layer_info = cl_uint;
25pub type cl_layer_api_version = cl_uint;
26
27pub const CL_LAYER_API_VERSION: cl_layer_info = 0x4240;
28pub const CL_LAYER_NAME: cl_layer_info = 0x4241;
29
30pub const CL_LAYER_API_VERSION_100: cl_layer_api_version = 100;
31
32pub type clGetLayerInfo_t = Option<
33 unsafe extern "C" fn(
34 param_name: cl_layer_info,
35 param_value_size: size_t,
36 param_value: *mut c_void,
37 param_value_size_ret: *mut size_t,
38 ) -> cl_int,
39>;
40pub type clGetLayerInfo_fn = clGetLayerInfo_t;
41pub type clInitLayer_t = Option<
42 unsafe extern "C" fn(
43 num_entries: cl_uint,
44 target_dispatch: *const cl_icd_dispatch,
45 num_entries_ret: *mut cl_uint,
46 layer_dispatch_ret: *mut *const cl_icd_dispatch,
47 ) -> cl_int,
48>;
49pub type clInitLayer_fn = clInitLayer_t;
50
51pub type pfn_clGetLayerInfo = clGetLayerInfo_t;
52pub type pfn_clInitLayer = clInitLayer_t;
53
54#[cfg_attr(not(target_os = "macos"), link(name = "OpenCL"))]
55#[cfg_attr(target_os = "macos", link(name = "OpenCL", kind = "framework"))]
56#[cfg(feature = "cl_loader_layers")]
57#[cfg(feature = "static")]
58unsafe extern "system" {
59 pub fn clGetLayerInfo(
60 param_name: cl_layer_info,
61 param_value_size: size_t,
62 param_value: *mut c_void,
63 param_value_size_ret: *mut size_t,
64 ) -> cl_int;
65
66 pub fn clInitLayer(
67 num_entries: cl_uint,
68 target_dispatch: *const cl_icd_dispatch,
69 num_entries_ret: *mut cl_uint,
70 layer_dispatch_ret: *mut *const cl_icd_dispatch,
71 ) -> cl_int;
72}