pub struct KernelFactory { /* private fields */ }Expand description
Kernel factory for creating optimized kernels
Implementations§
Source§impl KernelFactory
impl KernelFactory
Sourcepub fn new(
arch: String,
compute_capabilities: Vec<(i32, i32)>,
available_memory: usize,
shared_memory_per_block: usize,
max_threads_per_block: usize,
) -> Self
pub fn new( arch: String, compute_capabilities: Vec<(i32, i32)>, available_memory: usize, shared_memory_per_block: usize, max_threads_per_block: usize, ) -> Self
Create a new kernel factory
Sourcepub fn create_fft_kernel(
&self,
input_size: usize,
input_address: usize,
output_address: usize,
) -> FFTResult<FFTKernel>
pub fn create_fft_kernel( &self, input_size: usize, input_address: usize, output_address: usize, ) -> FFTResult<FFTKernel>
Create an FFT kernel optimized for the target GPU
Sourcepub fn create_sparse_fft_kernel(
&self,
input_size: usize,
sparsity: usize,
input_address: usize,
output_values_address: usize,
output_indices_address: usize,
algorithm: SparseFFTAlgorithm,
window_function: WindowFunction,
) -> FFTResult<SparseFFTKernel>
pub fn create_sparse_fft_kernel( &self, input_size: usize, sparsity: usize, input_address: usize, output_values_address: usize, output_indices_address: usize, algorithm: SparseFFTAlgorithm, window_function: WindowFunction, ) -> FFTResult<SparseFFTKernel>
Create a sparse FFT kernel optimized for the target GPU
Sourcepub fn check_memory_requirements(
&self,
total_bytesneeded: usize,
) -> FFTResult<()>
pub fn check_memory_requirements( &self, total_bytesneeded: usize, ) -> FFTResult<()>
Check if there’s enough memory for the requested operation
Trait Implementations§
Source§impl Clone for KernelFactory
impl Clone for KernelFactory
Source§fn clone(&self) -> KernelFactory
fn clone(&self) -> KernelFactory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 KernelFactory
impl Debug for KernelFactory
Source§impl KernelFactoryExt for KernelFactory
impl KernelFactoryExt for KernelFactory
Source§fn can_use_tensor_cores(&self) -> bool
fn can_use_tensor_cores(&self) -> bool
Check if the GPU can use tensor cores
Source§fn get_optimal_config(
&self,
signal_size: usize,
algorithm: SparseFFTAlgorithm,
window_function: WindowFunction,
) -> KernelConfig
fn get_optimal_config( &self, signal_size: usize, algorithm: SparseFFTAlgorithm, window_function: WindowFunction, ) -> KernelConfig
Get optimal configuration for a specific algorithm and signal size
Auto Trait Implementations§
impl Freeze for KernelFactory
impl RefUnwindSafe for KernelFactory
impl Send for KernelFactory
impl Sync for KernelFactory
impl Unpin for KernelFactory
impl UnsafeUnpin for KernelFactory
impl UnwindSafe for KernelFactory
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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