#[repr(u32)]pub enum halide_type_code_t {
halide_type_int = 0,
halide_type_uint = 1,
halide_type_float = 2,
halide_type_handle = 3,
halide_type_bfloat = 4,
}
Expand description
Types in the halide type system. They can be ints, unsigned ints, or floats (of various bit-widths), or a handle (which is always 64-bits). Note that the int/uint/float values do not imply a specific bit width (the bit width is expected to be encoded in a separate value).
Variants§
halide_type_int = 0
!< signed integers
halide_type_uint = 1
!< unsigned integers
halide_type_float = 2
!< IEEE floating point numbers
halide_type_handle = 3
!< opaque pointer type (void *)
halide_type_bfloat = 4
!< floating point numbers in the bfloat format
Implementations§
source§impl halide_type_code_t
impl halide_type_code_t
sourcepub unsafe fn from_u32(code: u32) -> halide_type_code_t
pub unsafe fn from_u32(code: u32) -> halide_type_code_t
§Safety
This function is unsafe because this basically truansmutes an integer to an enum. And if the enum is not valid, it will cause undefined behavior in rust.
Trait Implementations§
source§impl Clone for halide_type_code_t
impl Clone for halide_type_code_t
source§fn clone(&self) -> halide_type_code_t
fn clone(&self) -> halide_type_code_t
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for halide_type_code_t
impl Debug for halide_type_code_t
source§impl Hash for halide_type_code_t
impl Hash for halide_type_code_t
source§impl PartialEq for halide_type_code_t
impl PartialEq for halide_type_code_t
impl Copy for halide_type_code_t
impl Eq for halide_type_code_t
impl StructuralPartialEq for halide_type_code_t
Auto Trait Implementations§
impl Freeze for halide_type_code_t
impl RefUnwindSafe for halide_type_code_t
impl Send for halide_type_code_t
impl Sync for halide_type_code_t
impl Unpin for halide_type_code_t
impl UnwindSafe for halide_type_code_t
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)