}
extern "C" fn cl_get_pipe_info(
- _pipe: cl_mem,
- _param_name: cl_pipe_info,
- _param_value_size: usize,
- _param_value: *mut ::std::os::raw::c_void,
- _param_value_size_ret: *mut usize,
+ pipe: cl_mem,
+ param_name: cl_pipe_info,
+ param_value_size: usize,
+ param_value: *mut ::std::os::raw::c_void,
+ param_value_size_ret: *mut usize,
) -> cl_int {
- println!("get_pipe_info not implemented");
- CL_OUT_OF_HOST_MEMORY
+ match_err!(pipe.get_info(
+ param_name,
+ param_value_size,
+ param_value,
+ param_value_size_ret,
+ ))
}
extern "C" fn cl_svm_alloc(
//• CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for the specified set of memory objects in mem_objects.
}
+
+impl CLInfo<cl_pipe_info> for cl_mem {
+ fn query(&self, _q: cl_pipe_info, _: &[u8]) -> CLResult<Vec<u8>> {
+ // CL_INVALID_MEM_OBJECT if pipe is a not a valid pipe object.
+ Err(CL_INVALID_MEM_OBJECT)
+ }
+}
'--whitelist-type', 'cl_.*',
'--whitelist-var', 'CL_.*',
# some info types need to be strongly typed so we can implement various get_infos
- '--new-type-alias-deref', 'cl_(mem|image)_info',
+ '--new-type-alias-deref', 'cl_(mem|image|pipe)_info',
'--new-type-alias-deref', 'cl_kernel_(arg|work_group)_info',
'--new-type-alias-deref', 'cl_(event|profiling)_info',
],