pub struct DeviceSection<T: DeviceValue, B: AcceleratorBackend> {
pub atlas_version: u64,
pub topology_version: u64,
pub offsets: B::Buffer<u32>,
pub lengths: B::Buffer<u32>,
pub values: B::Buffer<T>,
pub point_count: usize,
pub value_count: usize,
}Expand description
A section layout and its values resident in backend-owned memory.
Fields§
§atlas_version: u64Source atlas structural version.
topology_version: u64Source mesh topology version supplied by the caller.
offsets: B::Buffer<u32>Per-point offsets in atlas iteration order.
lengths: B::Buffer<u32>Per-point lengths in atlas iteration order.
values: B::Buffer<T>Flat field values.
point_count: usizeNumber of atlas points.
value_count: usizeNumber of scalar values.
Implementations§
Source§impl<T: DeviceValue, B: AcceleratorBackend> DeviceSection<T, B>
impl<T: DeviceValue, B: AcceleratorBackend> DeviceSection<T, B>
Sourcepub fn upload_from<S: Storage<T>>(
backend: &B,
section: &Section<T, S>,
topology_version: u64,
) -> Result<Self, AcceleratorError>
pub fn upload_from<S: Storage<T>>( backend: &B, section: &Section<T, S>, topology_version: u64, ) -> Result<Self, AcceleratorError>
Upload atlas metadata and values from a host-accessible section.
Sourcepub fn refresh_values_from<S: Storage<T>>(
&mut self,
backend: &B,
section: &Section<T, S>,
topology_version: u64,
) -> Result<(), AcceleratorError>
pub fn refresh_values_from<S: Storage<T>>( &mut self, backend: &B, section: &Section<T, S>, topology_version: u64, ) -> Result<(), AcceleratorError>
Refresh values without rebuilding layout metadata.
Sourcepub fn download_into<S: Storage<T> + Clone>(
&self,
backend: &B,
section: &mut Section<T, S>,
topology_version: u64,
) -> Result<(), AcceleratorError>
pub fn download_into<S: Storage<T> + Clone>( &self, backend: &B, section: &mut Section<T, S>, topology_version: u64, ) -> Result<(), AcceleratorError>
Download values into a section with the same atlas layout.
Auto Trait Implementations§
impl<T, B> Freeze for DeviceSection<T, B>
impl<T, B> RefUnwindSafe for DeviceSection<T, B>where
<B as AcceleratorBackend>::Buffer<u32>: RefUnwindSafe,
<B as AcceleratorBackend>::Buffer<T>: RefUnwindSafe,
impl<T, B> Send for DeviceSection<T, B>
impl<T, B> Sync for DeviceSection<T, B>
impl<T, B> Unpin for DeviceSection<T, B>
impl<T, B> UnsafeUnpin for DeviceSection<T, B>where
<B as AcceleratorBackend>::Buffer<u32>: UnsafeUnpin,
<B as AcceleratorBackend>::Buffer<T>: UnsafeUnpin,
impl<T, B> UnwindSafe for DeviceSection<T, B>where
<B as AcceleratorBackend>::Buffer<u32>: UnwindSafe,
<B as AcceleratorBackend>::Buffer<T>: UnwindSafe,
Blanket Implementations§
Source§impl<T> AccumulatePathExt for T
impl<T> AccumulatePathExt for T
fn accumulate_path<O, I>(path: I) -> Owhere
O: Orientation,
I: IntoIterator<Item = O>,
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