Skip to content

Commit 06dbae0

Browse files
committed
feat(simd): re-export cognitive shader foundation types
ndarray::simd::* now exports: - Fingerprint<N>, Fingerprint2K/1K/64K, VectorWidth, vector_config() - CollapseGate (Flow/Block/Hold) - hamming_distance_raw, popcount_raw - wht_f32, wht_f32_new - quantize/dequantize i4/i2/i8 + QuantParams - kmeans, squared_l2 - cosine_f32_to_f64_simd Consumers import from ndarray::simd::* only. The hpc/ paths stay private. https://claude.ai/code/session_01SbYsmmbPf9YQuYbHZN52Zh
1 parent cd625ec commit 06dbae0

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

src/simd.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,42 @@ pub fn simd_ln_f32(x: F32x16) -> F32x16 {
949949
F32x16::from_array(out)
950950
}
951951

952+
// ============================================================================
953+
// Cognitive shader foundation re-exports
954+
// ============================================================================
955+
956+
// Fingerprint<N>: const-generic binary vector, the BindSpace atom
957+
pub use crate::hpc::fingerprint::{
958+
Fingerprint,
959+
Fingerprint2K, Fingerprint1K, Fingerprint64K,
960+
VectorWidth, VectorConfig, vector_config,
961+
};
962+
963+
// CollapseGate: Flow/Block/Hold write gate (Layer 3 in the 7-layer stack)
964+
pub use crate::hpc::bnn_cross_plane::CollapseGate;
965+
966+
// Bitwise: SIMD-dispatched Hamming distance + popcount
967+
pub use crate::hpc::bitwise::{
968+
hamming_distance_raw, popcount_raw,
969+
};
970+
971+
// WHT: Walsh-Hadamard Transform (SIMD butterfly)
972+
pub use crate::hpc::fft::{wht_f32, wht_f32_new};
973+
974+
// Quantization: i4/i2/i8 pack/unpack + BF16
975+
pub use crate::hpc::quantized::{
976+
quantize_f32_to_i4, dequantize_i4_to_f32,
977+
quantize_f32_to_i2, dequantize_i2_to_f32,
978+
quantize_f32_to_i8, dequantize_i8_to_f32,
979+
QuantParams,
980+
};
981+
982+
// K-means + L2 distance
983+
pub use crate::hpc::cam_pq::{kmeans, squared_l2};
984+
985+
// SIMD cosine
986+
pub use crate::hpc::heel_f64x8::cosine_f32_to_f64_simd;
987+
952988
// ============================================================================
953989
// Tests
954990
// ============================================================================

0 commit comments

Comments
 (0)