blob: ff145f420e4823f24745dc1c2ecdfe7422965ffa [file] [edit]
//@ revisions: pass fail
//@ no-prefer-dynamic
//@ needs-offload
//@[pass] build-pass
//@[fail] build-fail
//@[pass] compile-flags: -Zunstable-options -Zoffload=Device -Clto=fat --emit=metadata
//@[fail] compile-flags: -Clto=thin
//[fail]~? ERROR: using the offload feature requires -Z offload=<Device or Host=/absolute/path/to/device.bin>
//[fail]~? ERROR: using the offload feature requires -C lto=fat
#![feature(core_intrinsics)]
fn main() {
let mut x = [3.0; 256];
kernel_1(&mut x);
}
fn kernel_1(x: &mut [f32; 256]) {
core::intrinsics::offload(_kernel_1, [1, 1, 1], [1, 1, 1], 0, (x,))
}
fn _kernel_1(x: &mut [f32; 256]) {}