MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / Float

Interface Float

crates/spirv-std/src/float.rs:12–15  ·  view source on GitHub ↗

Abstract trait representing a SPIR-V floating point type. # Safety Implementing this trait on non-primitive-float types breaks assumptions of other unsafe code, and should not be done.

Source from the content-addressed store, hash-verified

10/// Implementing this trait on non-primitive-float types breaks assumptions of other unsafe code,
11/// and should not be done.
12pub unsafe trait Float: num_traits::Float + crate::scalar::Scalar + Default {
13 /// Width of the float, in bits.
14 const WIDTH: usize;
15}
16
17unsafe impl Float for f32 {
18 const WIDTH: usize = 32;

Callers 9

trans_scalarFunction · 0.85
trans_intrinsic_typeFunction · 0.85
type_f32Method · 0.85
type_f64Method · 0.85
constant_f32Method · 0.85
constant_f64Method · 0.85
insert_instMethod · 0.85
memset_dynamic_scalarFunction · 0.85

Implementers 1

float.rscrates/spirv-std/src/float.rs

Calls

no outgoing calls

Tested by

no test coverage detected