Skip to main content

simd_matvec3_8

Function simd_matvec3_8 

Source
pub fn simd_matvec3_8(
    mat: [[f64; 3]; 3],
    x: [f64; 8],
    y: [f64; 8],
    z: [f64; 8],
) -> ([f64; 8], [f64; 8], [f64; 8])
Expand description

Vectorized 3x3 matrix-vector multiplication (8 vectors)

Applies 3x3 rotation/transformation matrix to 8 vectors in parallel. Used in HEALPix sampling for view transformation application.

Formula for each vector i:

  • x’[i] = m[0][0] * x[i] + m[0][1] * y[i] + m[0][2] * z[i]
  • y’[i] = m[1][0] * x[i] + m[1][1] * y[i] + m[1][2] * z[i]
  • z’[i] = m[2][0] * x[i] + m[2][1] * y[i] + m[2][2] * z[i]

Input:

  • mat: 3x3 matrix (row-major, [row][col])
  • x, y, z: 3 arrays of input vector components

Output:

  • (x’, y’, z’): 3 arrays of transformed vector components