Struct EMCompute::DataBinder
source · #[repr(C)]pub struct DataBinder {
pub bind: u32,
pub data_len: usize,
pub data: *mut u8,
}Expand description
this struct is for passing data based on its bind index in gpu side
Fields§
§bind: u32bind index of data in gpu side
data_len: usizebecause data must be in uint8_t (u8 in Rust) in C you have to pass the data len this way
sizeof(your type) * real_len_of_your_array / sizeof(uint8_t)
data: *mut u8pointer to your data in memory , it must be uint8_t* (*mut u8 in Rust side) in gpu side the type of this data will be set based on CKernel code you provided
Trait Implementations§
source§impl Clone for DataBinder
impl Clone for DataBinder
source§fn clone(&self) -> DataBinder
fn clone(&self) -> DataBinder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DataBinder
impl RefUnwindSafe for DataBinder
impl !Send for DataBinder
impl !Sync for DataBinder
impl Unpin for DataBinder
impl UnwindSafe for DataBinder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more