Skip to content

Commit f7d2406

Browse files
AdaWorldAPIclaude
andauthored
feat(hpc/reductions): SIMD-dispatched sum/mean/max/min/argmax/nrm2 (#122, sprint A10)
* feat(hpc): add SIMD reductions dispatcher (sum/mean/max/min/argmax/argmin/nrm2) * fix(reductions): mean_f32/f64 return Option per A10 spec Spec for sprint A10 calls for: pub fn mean_f32(s: &[f32]) -> Option<f32>; // None on empty Previously mean_f32/mean_f64 panicked on empty input. This change returns None for empty slices, matching argmax_f32 / max_f32 / min_f32 which already use the Option convention. Tests: - mean_f32_empty_is_none — verifies None on empty input - mean_f64_empty_is_none — verifies None on empty input - mean_f32_basic — non-empty case via .expect() --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2aaa90a commit f7d2406

2 files changed

Lines changed: 617 additions & 0 deletions

File tree

src/hpc/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub mod simd_dispatch;
2525
pub mod blas_level1;
2626
pub mod blas_level2;
2727
pub mod blas_level3;
28+
pub mod reductions;
2829
pub mod statistics;
2930
pub mod activations;
3031
pub mod hdc;

0 commit comments

Comments
 (0)