Skip to main content

DeviceSection

Struct DeviceSection 

Source
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: u64

Source atlas structural version.

§topology_version: u64

Source 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: usize

Number of atlas points.

§value_count: usize

Number of scalar values.

Implementations§

Source§

impl<T: DeviceValue, B: AcceleratorBackend> DeviceSection<T, B>

Source

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.

Source

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.

Source

pub fn download_into<S: Storage<T> + Clone>( &self, backend: &B, section: &mut Section<T, S>, topology_version: u64, ) -> Result<(), AcceleratorError>
where T: Clone + Default,

Download values into a section with the same atlas layout.

Source

pub fn validate( &self, atlas_version: u64, topology_version: u64, ) -> Result<(), AcceleratorError>

Validate both structural epochs used to construct this section.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> AccumulatePathExt for T

Source§

fn accumulate_path<O, I>(path: I) -> O
where O: Orientation, I: IntoIterator<Item = O>,

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.