pub struct CpuBackend { /* private fields */ }Expand description
CPU backend using SIMD and multi-threading
Implementations§
Source§impl CpuBackend
impl CpuBackend
Sourcepub fn num_threads(&self) -> usize
pub fn num_threads(&self) -> usize
Get the number of CPU threads
Sourcepub fn rgb_to_yuv_bt601(
input: &[u8],
output: &mut [u8],
width: usize,
height: usize,
)
pub fn rgb_to_yuv_bt601( input: &[u8], output: &mut [u8], width: usize, height: usize, )
RGB to YUV conversion (BT.601) using CPU SIMD
Sourcepub fn yuv_to_rgb_bt601(
input: &[u8],
output: &mut [u8],
width: usize,
height: usize,
)
pub fn yuv_to_rgb_bt601( input: &[u8], output: &mut [u8], width: usize, height: usize, )
YUV to RGB conversion (BT.601) using CPU SIMD
Sourcepub fn resize_bilinear(
input: &[u8],
src_width: usize,
src_height: usize,
output: &mut [u8],
dst_width: usize,
dst_height: usize,
)
pub fn resize_bilinear( input: &[u8], src_width: usize, src_height: usize, output: &mut [u8], dst_width: usize, dst_height: usize, )
Bilinear image resize using CPU
Trait Implementations§
Source§impl Backend for CpuBackend
impl Backend for CpuBackend
Source§fn capabilities(&self) -> &BackendCapabilities
fn capabilities(&self) -> &BackendCapabilities
Get backend capabilities
Source§fn is_available() -> bool
fn is_available() -> bool
Check if this backend is available on the current system
Source§fn initialize() -> Result<Self>
fn initialize() -> Result<Self>
Initialize the backend
Source§fn backend_type(&self) -> BackendType
fn backend_type(&self) -> BackendType
Get backend type
Source§impl Default for CpuBackend
impl Default for CpuBackend
Source§fn default() -> Self
fn default() -> Self
Creates a CPU backend with default settings.
§Panics
Panics if CPU backend initialization fails. Prefer
CpuBackend::new() for fallible construction.
Auto Trait Implementations§
impl Freeze for CpuBackend
impl RefUnwindSafe for CpuBackend
impl Send for CpuBackend
impl Sync for CpuBackend
impl Unpin for CpuBackend
impl UnsafeUnpin for CpuBackend
impl UnwindSafe for CpuBackend
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> 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