pub struct CudaDispatchTable {
pub message_struct_name: String,
pub handler_id_field: String,
pub unknown_counter_field: String,
/* private fields */
}Expand description
Dispatch table for multi-handler kernel code generation.
Fields§
§message_struct_name: StringName of the ExtendedH2KMessage struct (default: “ExtendedH2KMessage”).
handler_id_field: StringField name for handler_id in the message (default: “handler_id”).
unknown_counter_field: StringCounter for unknown handlers (default: “unknown_handler_count”).
Implementations§
Source§impl CudaDispatchTable
impl CudaDispatchTable
Sourcepub fn add_handler(&mut self, handler: CudaHandlerInfo)
pub fn add_handler(&mut self, handler: CudaHandlerInfo)
Add a handler to the table.
Sourcepub fn with_handler(self, handler: CudaHandlerInfo) -> Self
pub fn with_handler(self, handler: CudaHandlerInfo) -> Self
Add a handler using builder pattern.
Sourcepub fn with_message_struct(self, name: &str) -> Self
pub fn with_message_struct(self, name: &str) -> Self
Set the message struct name.
Sourcepub fn handlers(&self) -> &[CudaHandlerInfo]
pub fn handlers(&self) -> &[CudaHandlerInfo]
Get all handlers.
Trait Implementations§
Source§impl Clone for CudaDispatchTable
impl Clone for CudaDispatchTable
Source§fn clone(&self) -> CudaDispatchTable
fn clone(&self) -> CudaDispatchTable
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 CudaDispatchTable
impl Debug for CudaDispatchTable
Source§impl Default for CudaDispatchTable
impl Default for CudaDispatchTable
Source§fn default() -> CudaDispatchTable
fn default() -> CudaDispatchTable
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CudaDispatchTable
impl RefUnwindSafe for CudaDispatchTable
impl Send for CudaDispatchTable
impl Sync for CudaDispatchTable
impl Unpin for CudaDispatchTable
impl UnwindSafe for CudaDispatchTable
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