pub struct GPUAccelerationContext {
pub gpu_available: bool,
pub memory_pool_size: usize,
}Expand description
GPU acceleration context for advanced operations.
Default never claims GPU availability (an honest all-zero/false
default); call GPUAccelerationContext::detect to actually probe
hardware.
Fields§
§gpu_available: boolWhether a real GPU device was detected as available at construction time
memory_pool_size: usizeGPU memory pool size (bytes); always 0 – this struct reports availability only, it does not itself manage GPU memory
Implementations§
Source§impl GPUAccelerationContext
impl GPUAccelerationContext
Sourcepub fn detect() -> Self
pub fn detect() -> Self
Genuinely probes for GPU acceleration availability.
This currently only probes the crate’s optional, off-by-default CUDA
backend (crate::gpu_cuda::cuda_is_available, gated behind the
cuda feature); without that feature enabled – the default – this
honestly reports false rather than fabricating availability. There
is no “assume a GPU is present” fallback anywhere in this method.
Trait Implementations§
Source§impl Clone for GPUAccelerationContext
impl Clone for GPUAccelerationContext
Source§fn clone(&self) -> GPUAccelerationContext
fn clone(&self) -> GPUAccelerationContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GPUAccelerationContext
Source§impl Debug for GPUAccelerationContext
impl Debug for GPUAccelerationContext
Source§impl Default for GPUAccelerationContext
impl Default for GPUAccelerationContext
Source§fn default() -> GPUAccelerationContext
fn default() -> GPUAccelerationContext
Source§impl PartialEq for GPUAccelerationContext
impl PartialEq for GPUAccelerationContext
impl StructuralPartialEq for GPUAccelerationContext
Auto Trait Implementations§
impl Freeze for GPUAccelerationContext
impl RefUnwindSafe for GPUAccelerationContext
impl Send for GPUAccelerationContext
impl Sync for GPUAccelerationContext
impl Unpin for GPUAccelerationContext
impl UnsafeUnpin for GPUAccelerationContext
impl UnwindSafe for GPUAccelerationContext
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
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>
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>
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