Skip to main content

Module cache_ops

Module cache_ops 

Source
Expand description

Cache-aware matrix operations for high-performance computing.

This module provides cache-optimized implementations of common matrix operations, including tiled matrix multiplication and cache-oblivious transpose. The CacheAwareConfig struct exposes cache topology information and derives optimal blocking parameters so that working sets fit in the appropriate cache level.

§Examples

use scirs2_core::cache_ops::{CacheAwareConfig, tiled_matmul};
use ndarray::Array2;

let config = CacheAwareConfig::detect();
let a = Array2::<f64>::eye(4);
let b = Array2::<f64>::eye(4);
let c = tiled_matmul(&a, &b);
assert_eq!(c, a);

Structs§

CacheAwareConfig
Cache topology description used to derive blocking parameters.

Functions§

cache_oblivious_transpose
In-place cache-oblivious transpose of a square Array2<f64>.
prefetch_matmul
Matrix multiplication with software prefetch hints for pipelined execution.
tiled_matmul
Cache-efficient tiled matrix multiplication C = A × B.