Skip to main content

RudaTask

Trait RudaTask 

Source
pub trait RudaTask<C>:
    KernelMetadata
    + Send
    + Sync
where C: Compiler,
{ // Required method fn compile( &self, compiler: &mut C, compilation_options: &<C as Compiler>::CompilationOptions, mode: ExecutionMode, address_type: StorageType, ) -> Result<CompiledKernel<C>, CompilationError>; // Provided method fn kernel_definition(&self) -> Option<KernelDefinition> { ... } }
Expand description

Kernel trait with the ComputeShader that will be compiled and cached based on the provided id.

Required Methods§

Source

fn compile( &self, compiler: &mut C, compilation_options: &<C as Compiler>::CompilationOptions, mode: ExecutionMode, address_type: StorageType, ) -> Result<CompiledKernel<C>, CompilationError>

Compile a kernel and return the compiled form with an optional non-text representation

Provided Methods§

Source

fn kernel_definition(&self) -> Option<KernelDefinition>

Export the shared IR when this task originates from a kernel definition. Source-only tasks do not have an IR representation.

Trait Implementations§

Source§

impl<C> KernelMetadata for Box<dyn RudaTask<C>>
where C: Compiler,

Source§

fn id(&self) -> KernelId

Identifier for the kernel, used for caching kernel compilation.
Source§

fn name(&self) -> &'static str

Name of the kernel for debugging.
Source§

fn address_type(&self) -> StorageType

Type of addresses in this kernel

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<C, K> RudaTask<C> for KernelTask<C, K>
where C: Compiler, K: RudaKernel,