#[non_exhaustive]pub enum Precision {
Fp32,
Fp16,
}Expand description
Storage and arithmetic policy requested from the Vulkan backend.
The variant is a request, not a guarantee: ncnn keeps its own capability dispatch, so a device without half-precision support stays on FP32.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fp32
Requests FP32 storage and arithmetic.
Fp16
Requests FP16 storage and arithmetic; native capability checks can retain FP32 on unsupported devices.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Precision
impl RefUnwindSafe for Precision
impl Send for Precision
impl Sync for Precision
impl Unpin for Precision
impl UnsafeUnpin for Precision
impl UnwindSafe for Precision
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