blob: d28d27d2c9d10d4cf9d394c8c572edf0ef1c64cf [file]
//@ 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/<crate>.ptx or <crate>.elf>
//[fail]~? ERROR: using the offload feature requires -C lto=fat
#![feature(gpu_offload)]
fn main() {
let mut x = [3.0; 256];
kernel_1(&mut x);
}
fn kernel_1(x: &mut [f32; 256]) {
core::offload::offload! {
kernel = _kernel_1,
args = (x,),
}
}
fn _kernel_1(x: &mut [f32; 256]) {}