aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'zluda/src/lib.rs')
-rw-r--r--zluda/src/lib.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/zluda/src/lib.rs b/zluda/src/lib.rs
index 12d6ce0..bda67e1 100644
--- a/zluda/src/lib.rs
+++ b/zluda/src/lib.rs
@@ -27,10 +27,25 @@ macro_rules! implemented {
};
}
+macro_rules! implemented_in_function {
+ ($($abi:literal fn $fn_name:ident( $($arg_id:ident : $arg_type:ty),* ) -> $ret_type:path;)*) => {
+ $(
+ #[cfg_attr(not(test), no_mangle)]
+ #[allow(improper_ctypes)]
+ #[allow(improper_ctypes_definitions)]
+ pub unsafe extern $abi fn $fn_name ( $( $arg_id : $arg_type),* ) -> $ret_type {
+ cuda_base::cuda_normalize_fn!( crate::r#impl::function::$fn_name ) ($(crate::r#impl::FromCuda::from_cuda(&$arg_id)?),*)?;
+ Ok(())
+ }
+ )*
+ };
+}
+
cuda_base::cuda_function_declarations!(
unimplemented,
implemented <= [
cuCtxGetLimit,
+ cuCtxSetCurrent,
cuCtxSetLimit,
cuCtxSynchronize,
cuDeviceComputeCapability,
@@ -39,13 +54,25 @@ cuda_base::cuda_function_declarations!(
cuDeviceGetCount,
cuDeviceGetLuid,
cuDeviceGetName,
+ cuDevicePrimaryCtxRelease,
+ cuDevicePrimaryCtxRetain,
cuDeviceGetProperties,
cuDeviceGetUuid,
cuDeviceGetUuid_v2,
cuDeviceTotalMem_v2,
+ cuDriverGetVersion,
+ cuFuncGetAttribute,
cuInit,
+ cuMemAlloc_v2,
+ cuMemFree_v2,
+ cuMemcpyDtoH_v2,
+ cuMemcpyHtoD_v2,
cuModuleGetFunction,
cuModuleLoadData,
cuModuleUnload,
+ cuPointerGetAttribute,
+ ],
+ implemented_in_function <= [
+ cuLaunchKernel,
]
); \ No newline at end of file