Struct F16IoPolyfill

Source
pub(super) struct F16IoPolyfill {
    use_native: bool,
    io_var_to_f32_type: FastHashMap<Word, Word>,
}
Expand description

Manages f16 I/O polyfill state and operations.

Fields§

§use_native: bool§io_var_to_f32_type: FastHashMap<Word, Word>

Implementations§

Source§

impl F16IoPolyfill

Source

pub fn new(use_storage_input_output_16: bool) -> Self

Source

pub fn needs_polyfill(&self, ty_inner: &TypeInner) -> bool

Source

pub fn register_io_var(&mut self, variable_id: Word, f32_type_id: Word)

Source

pub fn get_f32_io_type(&self, variable_id: Word) -> Option<Word>

Source

pub fn emit_f16_to_f32_conversion( f16_value_id: Word, f32_type_id: Word, converted_id: Word, body: &mut Vec<Instruction>, )

Source

pub fn emit_f32_to_f16_conversion( f32_value_id: Word, f16_type_id: Word, converted_id: Word, body: &mut Vec<Instruction>, )

Source

pub fn create_polyfill_type(ty_inner: &TypeInner) -> Option<LocalType>

Trait Implementations§

Source§

impl Default for F16IoPolyfill

Source§

fn default() -> F16IoPolyfill

Returns the “default value” for a type. Read more
Source§

impl Recyclable for F16IoPolyfill

Source§

fn recycle(self) -> Self

Clear self, retaining its current memory allocations. 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> 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.