pub struct CsdManager { /* private fields */ }Expand description
CSD Manager for computational storage operations
Implementations§
Source§impl CsdManager
impl CsdManager
pub fn register_device(&mut self, device: CsdDevice) -> Result<(), CsdError>
Sourcepub fn discover_devices_into(
&mut self,
out: &mut [CsdDeviceHandle],
) -> Result<usize, CsdError>
pub fn discover_devices_into( &mut self, out: &mut [CsdDeviceHandle], ) -> Result<usize, CsdError>
Discover devices into a caller-owned fixed buffer.
Sourcepub fn register_function(
&mut self,
function: CsdFunction,
) -> Result<(), CsdError>
pub fn register_function( &mut self, function: CsdFunction, ) -> Result<(), CsdError>
Register computational function
Sourcepub fn execute_operation(
&mut self,
operation: CsdOperationRequest,
) -> Result<u64, CsdError>
pub fn execute_operation( &mut self, operation: CsdOperationRequest, ) -> Result<u64, CsdError>
Execute computational operation
Sourcepub fn matrix_multiply(
&mut self,
device_id: &str,
a: &[f32],
b: &[f32],
dimensions: (usize, usize, usize),
) -> Result<Vec<f32>, CsdError>
pub fn matrix_multiply( &mut self, device_id: &str, a: &[f32], b: &[f32], dimensions: (usize, usize, usize), ) -> Result<Vec<f32>, CsdError>
Execute matrix multiplication
Sourcepub fn matrix_multiply_into(
&mut self,
device_id: &str,
a: &[f32],
b: &[f32],
dimensions: (usize, usize, usize),
out: &mut [f32],
) -> Result<usize, CsdError>
pub fn matrix_multiply_into( &mut self, device_id: &str, a: &[f32], b: &[f32], dimensions: (usize, usize, usize), out: &mut [f32], ) -> Result<usize, CsdError>
Execute matrix multiplication into a caller-owned output buffer.
Sourcepub fn vector_dot_product(
&mut self,
device_id: &str,
a: &[f32],
b: &[f32],
) -> Result<f32, CsdError>
pub fn vector_dot_product( &mut self, device_id: &str, a: &[f32], b: &[f32], ) -> Result<f32, CsdError>
Execute vector dot product
Sourcepub fn convolution(
&mut self,
device_id: &str,
input: &[f32],
kernel: &[f32],
dimensions: (usize, usize, usize, usize),
) -> Result<Vec<f32>, CsdError>
pub fn convolution( &mut self, device_id: &str, input: &[f32], kernel: &[f32], dimensions: (usize, usize, usize, usize), ) -> Result<Vec<f32>, CsdError>
Execute convolution operation
Sourcepub fn convolution_into(
&mut self,
device_id: &str,
input: &[f32],
kernel: &[f32],
dimensions: (usize, usize, usize, usize),
out: &mut [f32],
) -> Result<usize, CsdError>
pub fn convolution_into( &mut self, device_id: &str, input: &[f32], kernel: &[f32], dimensions: (usize, usize, usize, usize), out: &mut [f32], ) -> Result<usize, CsdError>
Execute a same-shape 2D convolution into a caller-owned output buffer.
Sourcepub fn get_device_stats(&self, device_id: &str) -> Option<CsdDeviceStats>
pub fn get_device_stats(&self, device_id: &str) -> Option<CsdDeviceStats>
Get device statistics
Sourcepub fn get_performance_stats(&self) -> CsdGlobalMetrics
pub fn get_performance_stats(&self) -> CsdGlobalMetrics
Get performance statistics
Sourcepub fn list_devices(&self) -> Vec<String>
pub fn list_devices(&self) -> Vec<String>
List available devices
Sourcepub fn list_devices_into(
&self,
out: &mut [CsdDeviceHandle],
) -> Result<usize, CsdError>
pub fn list_devices_into( &self, out: &mut [CsdDeviceHandle], ) -> Result<usize, CsdError>
List available devices into a compact caller-owned buffer.
Sourcepub fn list_functions(&self) -> Vec<String>
pub fn list_functions(&self) -> Vec<String>
List available functions
Sourcepub fn list_functions_into(
&self,
out: &mut [CsdFunctionHandle],
) -> Result<usize, CsdError>
pub fn list_functions_into( &self, out: &mut [CsdFunctionHandle], ) -> Result<usize, CsdError>
List available functions into a compact caller-owned buffer.
Auto Trait Implementations§
impl Freeze for CsdManager
impl RefUnwindSafe for CsdManager
impl Send for CsdManager
impl Sync for CsdManager
impl Unpin for CsdManager
impl UnsafeUnpin for CsdManager
impl UnwindSafe for CsdManager
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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