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