mirror of
https://github.com/rust-lang/rust.git
synced 2026-07-21 23:26:41 -04:00
21 lines
408 B
Rust
21 lines
408 B
Rust
//@ only-nightly
|
|
//@ revisions: host device
|
|
|
|
//@ pretty-mode:expanded
|
|
//@ pretty-compare-only
|
|
//@[host] pp-exact:offload_kernel.host.pp
|
|
//@[device] pp-exact:offload_kernel.device.pp
|
|
|
|
//@[device] compile-flags: -Zunstable-options -Zoffload=Device
|
|
|
|
#![feature(gpu_offload)]
|
|
|
|
use std::offload::offload_kernel;
|
|
|
|
#[offload_kernel]
|
|
fn foo(a: &[f32], b: &[f32], c: *mut f32) {
|
|
*c = a[0] + b[0];
|
|
}
|
|
|
|
fn main() {}
|