#[repr(C)]pub struct DataBinder {
pub bind: u32,
pub data_len: usize,
pub data: *mut *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 *mut u8address of pointer (since v5.0.0) which holds your data in memory , it must be uint8_t** (*mut *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 duplicate of the value. Read more
1.0.0§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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)