pub struct DeviceFunction {
pub name: String,
pub qualifiers: Vec<CudaQualifier>,
pub ret: CudaType,
pub params: Vec<CudaParam>,
pub body: Vec<CudaStmt>,
pub is_inline: bool,
}Expand description
A __device__ (or __host__ __device__) helper function.
Fields§
§name: StringFunction name
qualifiers: Vec<CudaQualifier>Qualifiers (should include at least Device)
ret: CudaTypeReturn type
params: Vec<CudaParam>Parameter list
body: Vec<CudaStmt>Body statements
is_inline: boolWhether the function is inline
Implementations§
Source§impl DeviceFunction
impl DeviceFunction
Sourcepub fn host_device(name: impl Into<String>, ret: CudaType) -> Self
pub fn host_device(name: impl Into<String>, ret: CudaType) -> Self
Create a __host__ __device__ function.
Sourcepub fn with_inline(self) -> Self
pub fn with_inline(self) -> Self
Mark as inline.
Trait Implementations§
Source§impl Clone for DeviceFunction
impl Clone for DeviceFunction
Source§fn clone(&self) -> DeviceFunction
fn clone(&self) -> DeviceFunction
Returns a duplicate 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 moreSource§impl Debug for DeviceFunction
impl Debug for DeviceFunction
Source§impl PartialEq for DeviceFunction
impl PartialEq for DeviceFunction
impl StructuralPartialEq for DeviceFunction
Auto Trait Implementations§
impl Freeze for DeviceFunction
impl RefUnwindSafe for DeviceFunction
impl Send for DeviceFunction
impl Sync for DeviceFunction
impl Unpin for DeviceFunction
impl UnsafeUnpin for DeviceFunction
impl UnwindSafe for DeviceFunction
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