[][src]Trait accel::module::DeviceSend

pub trait DeviceSend: Sized {
    fn as_ptr(&self) -> *const u8 { ... }
}

Type which can be sent to the device as kernel argument

let a: i32 = 10;
let p = &a as *const i32;
assert_eq!(
    DeviceSend::as_ptr(&p),
    &p as *const *const i32 as *const u8
);
assert!(std::ptr::eq(
    unsafe { *(DeviceSend::as_ptr(&p) as *mut *const i32) },
    p
));

Provided methods

fn as_ptr(&self) -> *const u8

Get the address of this value

Loading content...

Implementations on Foreign Types

impl<T> DeviceSend for *mut T[src]

impl<T> DeviceSend for *const T[src]

impl DeviceSend for bool[src]

impl DeviceSend for i8[src]

impl DeviceSend for i16[src]

impl DeviceSend for i32[src]

impl DeviceSend for i64[src]

impl DeviceSend for isize[src]

impl DeviceSend for u8[src]

impl DeviceSend for u16[src]

impl DeviceSend for u32[src]

impl DeviceSend for u64[src]

impl DeviceSend for usize[src]

impl DeviceSend for f32[src]

impl DeviceSend for f64[src]

Loading content...

Implementors

Loading content...