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

Interface Integer

crates/spirv-std/src/integer.rs:8–13  ·  view source on GitHub ↗

Traits related to integers. Abstract trait representing any SPIR-V integer type. # Safety Implementing this trait on non-primitive-integer types breaks assumptions of other unsafe code, and should not be done.

Source from the content-addressed store, hash-verified

6/// Implementing this trait on non-primitive-integer types breaks assumptions of other unsafe code,
7/// and should not be done.
8pub unsafe trait Integer: num_traits::PrimInt + crate::scalar::Scalar {
9 /// Width of the integer, in bits.
10 const WIDTH: usize;
11 /// If the integer is signed: true means signed, false means unsigned.
12 const SIGNED: bool;
13}
14
15/// A trait for being generic over signed integer types.
16pub trait SignedInteger: Integer {}

Callers 15

trans_scalarFunction · 0.85
trans_intrinsic_typeFunction · 0.85
type_usizeMethod · 0.85
type_i8Method · 0.85
type_i16Method · 0.85
type_i32Method · 0.85
type_i64Method · 0.85
type_i128Method · 0.85
type_isizeMethod · 0.85
constant_u8Method · 0.85
constant_i16Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected