pub struct PackedRgba16fLayout {
pub surface_w: usize,
pub surface_h: usize,
pub bytes_per_texel: usize,
pub pitch: usize,
}Expand description
Geometry of the RGBA16F-packed surface backing a planar F16 image tensor.
ANGLE only supports one float (type, internal_format) pair for IOSurface
import: (GL_HALF_FLOAT, GL_RGBA) = RGBA16F (8 bytes/texel). To map a
[C, H, W] f16 planar tensor onto such a surface, 4 contiguous f16
elements are packed into each RGBA16F texel, yielding a surface of
(W/4, C*H) texels at 8 bytes/texel. The byte stream is identical to a
(nonexistent) R16F (W, C*H) surface and can be consumed as &[f16]
with shape [1, C, H, W] without rearrangement.
Obtain via packed_rgba16f_layout — never construct directly.
Fields§
§surface_w: usizeSurface width in texels (width / 4).
surface_h: usizeSurface height in texels (planes * height).
bytes_per_texel: usizeBytes per RGBA16F texel (always 8).
pitch: usizeRow pitch in bytes (surface_w * 8).
Trait Implementations§
Source§impl Clone for PackedRgba16fLayout
impl Clone for PackedRgba16fLayout
Source§fn clone(&self) -> PackedRgba16fLayout
fn clone(&self) -> PackedRgba16fLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PackedRgba16fLayout
Source§impl Debug for PackedRgba16fLayout
impl Debug for PackedRgba16fLayout
impl Eq for PackedRgba16fLayout
Source§impl PartialEq for PackedRgba16fLayout
impl PartialEq for PackedRgba16fLayout
Source§fn eq(&self, other: &PackedRgba16fLayout) -> bool
fn eq(&self, other: &PackedRgba16fLayout) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PackedRgba16fLayout
Auto Trait Implementations§
impl Freeze for PackedRgba16fLayout
impl RefUnwindSafe for PackedRgba16fLayout
impl Send for PackedRgba16fLayout
impl Sync for PackedRgba16fLayout
impl Unpin for PackedRgba16fLayout
impl UnsafeUnpin for PackedRgba16fLayout
impl UnwindSafe for PackedRgba16fLayout
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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