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§
Auto Trait Implementations§
impl Freeze for KernelFactory
impl RefUnwindSafe for KernelFactory
impl Send for KernelFactory
impl Sync for KernelFactory
impl Unpin 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
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