SkillAgentSearch skills...

Cuexpm

Matrix Exponential Approximation using CUDA

Install / Use

/learn @maximilianbehr/Cuexpm
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

cuexpm - Matrix Exponential Approximation using CUDA

License: MIT GitHub Release DOI

Version: 2.0.0

Copyright: Maximilian Behr

License: The software is licensed under under MIT. See LICENSE for details.

cuexpm is a CUDA library for the numerical approximation of the matrix exponential $e^A$.

cuexpm supports single and double precision as well as real and complex matrices.

| Functions | Data | | ---------------------------------|----------------------------------| | cuexpms_bufferSize, cuexpms | real, single precision matrix | | cuexpmd_bufferSize, cuexpmd | real, double precision matrix | | cuexpmc_bufferSize, cuexpmc | complex, single precision matrix | | cuexpmz_bufferSize, cuexpmz | complex, double precision matrix |

Available functions:

int cuexpms_bufferSize(const int n, size_t *d_bufferSize, size_t *h_bufferSize);
int cuexpms(const int n, const float *d_A, const int ldA, void *d_buffer, void *h_buffer, float *d_expmA, const int ldexpmA);
int cuexpmd_bufferSize(const int n, size_t *d_bufferSize, size_t *h_bufferSize);
int cuexpmd(const int n, const double *d_A, const int ldA, void *d_buffer, void *h_buffer, double *d_expmA, const int ldexpmA);
int cuexpmc_bufferSize(const int n, size_t *d_bufferSize, size_t *h_bufferSize);
int cuexpmc(const int n, const cuComplex *d_A, const int ldA, void *d_buffer, void *h_buffer, cuComplex *d_expmA, const int ldexpmA);
int cuexpmz_bufferSize(const int n, size_t *d_bufferSize, size_t *h_bufferSize);
int cuexpmz(const int n, const cuDoubleComplex *d_A, const int ldA, void *d_buffer, void *h_buffer, cuDoubleComplex *d_expmA, const int ldexpmA);

Algorithm

cuexpm implements the scaling and squaring method for the matrix exponential approximation.

The Scaling and Squaring Method for the Matrix Exponential Revisited Nicholas J. Higham SIAM Journal on Matrix Analysis and Applications 2005 26:4, 1179-1193

Installation

Prerequisites:

  • CMake >= 3.23
  • CUDA >= 11.4.2
  mkdir build && cd build
  cmake ..
  make
  make install

Usage and Examples

We provide examples for all supported matrix formats:

| File | Data | | -------------------------------------------|----------------------------------| | example_cuexpms.cu | real, single precision matrix | | example_cuexpmd.cu | real, double precision matrix | | example_cuexpmc.cu | complex, single precision matrix | | example_cuexpmz.cu | complex, double precision matrix |

Related Skills

View on GitHub
GitHub Stars7
CategoryDevelopment
Updated3mo ago
Forks0

Languages

Cuda

Security Score

87/100

Audited on Dec 22, 2025

No findings