Skip to content

Add float32, complex64, complex128 variants of EigenSystem #790

@yungyuc

Description

@yungyuc

The prototype of EigenSystem solver in PR #768 supported only double-precision (SimpleArray<double>). LAPACK exposes SGEEV (float32), CGEEV (complex64), and ZGEEV (complex128) with the same call shape.

EigenSystem should be made as a class template and support SimpleArray<float>, SimpleArray<Complex<float>>, and SimpleArray<Complex<double>>. The currently hard-coded SimpleArray<double> should be elevated to the template argument.

For complex inputs, drop the split wr/wi pair and return a single complex w (CGEEV/ZGEEV return eigenvalues as complex scalars).

The template instance of EigenSystem<float>, EigenSystem<double>, EigenSystem<Complex<float>>, and EigenSystem<Complex<double>> should be exposed to and tested in Python as EigenSystemFloat32, EigenSystemFloat64, EigenSystemComplex64, and EigenSystemComplex128, respectively.

Use tests/test_linalg.py::TestLinalgEigenSystemTC as a template of a *TB base class, and inherit it for each of EigenSystemFloat32, EigenSystemFloat64, EigenSystemComplex64, and EigenSystemComplex128.

Metadata

Metadata

Assignees

Labels

arrayMulti-dimensional array implementationperformanceProfiling, runtime, and memory consumption
No fields configured for Feature.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions