Realm

oa::data::HostDataset

Thread-shareable host dataset contract for PrefetchDataLoader. Runtime is !Send, so async prefetch runs on host values: worker threads index a HostDataset, collate host-side, and the consumer thread uploads each batch to the device — the same split as DataLoader(num_workers>0, pin_memory=True) in torch, where workers also produce host tensors.

TrRust public API

Declaration

pub trait HostDataset: Send + Sync { // Required methods fn len(&self) -> i64; fn get_host_sample(&self, index: i64) -> Result<HostSample>; // Provided method fn is_empty(&self) -> bool { ... } }
Public Rust declaration.

Public Methods

fn len(&self) -> i64
fn get_host_sample(&self, index: i64) -> Result<HostSample>
fn is_empty(&self) -> bool

Public Method Documentation

fn len( &self ) -> i64
No public source comment is attached to this declaration.
fn get_host_sample( &self, index: i64 ) -> Result<HostSample>
No public source comment is attached to this declaration.
fn is_empty( &self ) -> bool
No public source comment is attached to this declaration.