Skip to main content

Module matrix_functions

Module matrix_functions 

Source
Expand description

Matrix functions: exponential, logarithm, and square root.

Provides GPU-accelerated matrix function computations via PTX kernel generation:

  • Matrix Exponential (expm): Scaling and squaring with Padé approximation. Computes e^A for a square matrix A.
  • Matrix Logarithm (logm): Inverse scaling and squaring with Padé approximation. Computes log(A) for a matrix with eigenvalues in the right half-plane.
  • Matrix Square Root (sqrtm): Denman–Beavers iteration. Computes A^{1/2} such that sqrtm(A) * sqrtm(A) = A.

Each plan struct generates self-contained PTX kernels using KernelBuilder/BodyBuilder from the oxicuda-ptx crate.

Structs§

MatrixExpConfig
Configuration for matrix exponential computation.
MatrixExpPlan
Execution plan for the matrix exponential.
MatrixLogConfig
Configuration for matrix logarithm computation.
MatrixLogPlan
Execution plan for the matrix logarithm.
MatrixSqrtConfig
Configuration for matrix square root computation.
MatrixSqrtPlan
Execution plan for the matrix square root using Denman–Beavers iteration.