numr 0.15.2

Numerical computing and tensor library for Rust, in the role of NumPy: n-dimensional arrays, linear algebra, FFT, statistics and autograd on CPU, CUDA and WebGPU
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! CPU implementation of the Walsh-Hadamard transform.

use crate::error::Result;
use crate::ops::FwhtOps;
use crate::runtime::cpu::{CpuClient, CpuRuntime, helpers::fwht_impl};
use crate::tensor::Tensor;

/// FwhtOps implementation for CPU runtime.
impl FwhtOps<CpuRuntime> for CpuClient {
    fn fwht(
        &self,
        x: &Tensor<CpuRuntime>,
        block_size: usize,
        signs: Option<&Tensor<CpuRuntime>>,
    ) -> Result<Tensor<CpuRuntime>> {
        fwht_impl(self, x, block_size, signs)
    }
}