Skip to main content

CudaDecoderSession

Struct CudaDecoderSession 

Source
pub struct CudaDecoderSession { /* private fields */ }
Expand description

Reusable CUDA runtime session with cached kernels, uploads, streams, and scratch.

Implementations§

Source§

impl CudaDecoderSession

Source

pub fn is_available() -> bool

Probe for both dynamically loaded CUDA driver and NVRTC libraries.

This performs no CUDA initialization and is safe on CPU-only hosts.

Source

pub fn system_default() -> Result<Self, CudaError>

Create a reusable session on device ordinal zero.

Source

pub fn new(device_ordinal: usize) -> Result<Self, CudaError>

Create a reusable session on a caller-selected CUDA device ordinal.

Source

pub const fn is_usable(&self) -> bool

Whether this initialized session can accept reconstruction work.

Source

pub fn device_ordinal(&self) -> usize

Device ordinal retained by this session.

Source

pub fn stream_count(&self) -> usize

Number of reusable nonblocking streams available to batch work.

Source

pub fn buffer_pool_diagnostics( &self, ) -> Result<CudaBufferPoolDiagnostics, CudaError>

Return retained exact-size scratch allocation counters.

Source

pub fn upload_cache_diagnostics( &self, ) -> Result<CudaUploadCacheDiagnostics, CudaError>

Return immutable coefficient upload-cache counters.

Source

pub fn allocate_destination( &self, layout: SurfaceLayout, ) -> Result<CudaDestination, CudaError>

Allocate an exact device output owned by the caller.

Source

pub fn allocate_batch_destination( &self, layout: DenseCudaBatchLayout, ) -> Result<CudaBatchDestination, CudaError>

Allocate a dense device batch output owned by the caller.

Source

pub fn submit(&self, plan: &CudaDecodePlan) -> Result<CudaSubmission, CudaError>

Submit one validated plan without waiting for completion.

Source

pub fn submit_batch( &self, plans: &[CudaDecodePlan], ) -> Result<CudaBatchSubmission, CudaError>

Submit a bounded batch across the session’s reusable streams.

Source

pub fn submit_dense_batch( &self, plans: &[CudaDecodePlan], ) -> Result<CudaResidentBatchSubmission, CudaError>

Submit a homogeneous batch into one internally owned device allocation.

Source

pub fn submit_into( &self, plan: &CudaDecodePlan, destination: CudaDestination, ) -> Result<CudaDestinationSubmission, CudaError>

Submit into an exclusively retained caller-owned device allocation.

Source

pub fn submit_batch_into( &self, plans: &[CudaDecodePlan], destination: CudaBatchDestination, ) -> Result<CudaBatchDestinationSubmission, CudaError>

Submit a homogeneous batch into caller-owned dense device storage.

Source

pub fn decode_to_host( &self, plan: &CudaDecodePlan, ) -> Result<DecodedImage, CudaError>

Decode one plan and copy its exact native bytes to typed host storage.

Source

pub fn decode_batch_to_host( &self, plans: &[CudaDecodePlan], ) -> Result<Vec<DecodedImage>, CudaError>

Decode a batch to host storage while preserving caller order.

Source

pub fn readback(&self, image: &ResidentCudaImage) -> Result<Vec<u8>, CudaError>

Copy one completed resident image to host bytes.

Source

pub fn readback_batch_image( &self, batch: &CudaResidentBatch, image: usize, ) -> Result<Vec<u8>, CudaError>

Copy one image from a completed dense batch to host bytes.

Trait Implementations§

Source§

impl Clone for CudaDecoderSession

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CudaDecoderSession

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.