Add the gpu version of the kernel which was missing in the docs

This commit is contained in:
Manuel Drehwald
2025-10-24 03:09:24 +02:00
parent f036a30d5a
commit 8badb14d82

View File

@@ -56,6 +56,13 @@ fn main() {
unsafe extern "C" {
pub fn kernel_1(array_b: *mut [f64; 256]);
}
#[cfg(not(target_os = "linux"))]
#[unsafe(no_mangle)]
#[inline(never)]
pub extern "gpu-kernel" fn kernel_1(x: *mut [f64; 256]) {
unsafe { (*x)[0] = 21.0 };
}
```
## Compile instructions