#[repr(transparent)]pub struct C32(pub [f32; 2]);Expand description
Local fp8 / fp4 wrappers (#[repr(transparent)] over u8) that
satisfy cudarc’s orphan-rule constraint for unsafe impl DeviceRepr.
Convertible from/to the backend-agnostic atomr_accel::dtype::*
equivalents.
64-bit interleaved complex ({re, im} of f32). Layout matches
cufft_sys::float2 and numpy.complex64. Phase 1.5++.
#[repr(transparent)] over [f32; 2] so unsafe impl DeviceRepr
is sound (cudarc’s orphan rule blocks blanket impls on tuple-struct
shapes from foreign crates) and so transmutes from Vec<C32> to /
from Vec<num_complex::Complex<f32>> (also #[repr(C)] with two
f32 fields) are layout-safe.
Maps to cudaDataType_t::CUDA_C_32F and cuComplex in CUDA C++.
Tuple Fields§
§0: [f32; 2]Implementations§
Trait Implementations§
Source§impl AccelDtype for C32
impl AccelDtype for C32
Source§const NAME: &'static str = "complex64"
const NAME: &'static str = "complex64"
Human-readable name used in tracing and error messages.
Source§type Scalar = f32
type Scalar = f32
Companion scalar type for host-side parameters (alpha/beta,
mean/std, scaling factors).
Self for full-precision dtypes;
f32 for fp8 / fp4 wrappers because the upstream APIs accept
f32 scales.fn zero() -> Self
fn one() -> Self
Source§impl CudaDtype for C32
impl CudaDtype for C32
fn cuda_data_type() -> cudaDataType_t
fn cublas_compute_type() -> cublasComputeType_t
Source§fn cuda_type_name() -> &'static str
fn cuda_type_name() -> &'static str
CUDA C++ type name for NVRTC source generation.
fn cudnn_data_type() -> cudnnDataType_t
fn nccl_data_type() -> ncclDataType_t
impl Copy for C32
impl DeviceRepr for C32
impl FftSupported for C32
impl StructuralPartialEq for C32
impl ValidAsZeroBits for C32
Auto Trait Implementations§
impl Freeze for C32
impl RefUnwindSafe for C32
impl Send for C32
impl Sync for C32
impl Unpin for C32
impl UnsafeUnpin for C32
impl UnwindSafe for C32
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