aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
new file mode 100644
index 0000000..fee62d0
--- /dev/null
+++ b/src/lib.rs
@@ -0,0 +1,23 @@
+mod cu;
+
+#[no_mangle]
+pub extern "stdcall" fn cuDriverGetVersion(version: &mut std::os::raw::c_int) -> cu::Result {
+ *version = 0;
+ return cu::Result::SUCCESS;
+}
+
+#[no_mangle]
+pub extern "stdcall" fn cuInit(_: *const std::os::raw::c_uint) -> cu::Result {
+ return cu::Result::SUCCESS;
+}
+
+#[no_mangle]
+pub extern "stdcall" fn cuGetExportTable(_: *const *const std::os::raw::c_void, _: cu::Uuid) -> cu::Result {
+ return cu::Result::ERROR_NOT_SUPPORTED;
+}
+
+#[no_mangle]
+pub extern "stdcall" fn cuDeviceGetCount(count: &mut std::os::raw::c_int) -> cu::Result {
+ *count = 1;
+ return cu::Result::SUCCESS;
+}