Skip to main content

Module rvv

Module rvv 

Source
Expand description

Scalar fallback for RISC-V Vector (RVV) targets. Hardware RVV intrinsics are not yet implemented; all operations use the portable scalar path from super::mod.rs.

RVV 1.0 provides variable-length SIMD (VLEN = 128–16384 bits). When Rust stabilises core::arch::riscv64 vector intrinsics, replace the bodies below with vl-strided vector loops.

Build with: RUSTFLAGS=“-C target-feature=+v” cargo build –target riscv64gc-unknown-linux-gnu

Cross-compile without hardware: cargo install cross cross build –target riscv64gc-unknown-linux-gnu –release

Functions§

dot_f64_rvv
Safety
fused_and_popcount_rvv
Fused AND + popcount (portable fallback).
fused_xor_popcount_rvv
Fused XOR + popcount using RVV.
hamming_distance_rvv
Hamming distance between two packed bitstream slices.
max_f64_rvv
Safety
pack_rvv
Pack u8 bit array into u64 words (portable fallback).
popcount_rvv
Count set bits (portable fallback).
scale_f64_rvv
Safety
softmax_inplace_f64_rvv
In-place softmax (portable fallback for RVV).
sum_f64_rvv
Safety