Skip to content

north-numerical-computing/mixed-precision-sylvester

Repository files navigation

Mixed-precision algorithms for solving the Sylvester matrix equation

This repository contains the code used in the technical report:

A. Dmytryshyn, M. Fasi, N. J. Higham, and X. Liu. Mixed-precision algorithms for solving the Sylvester matrix equation, Feb 2025.

Dependencies

The code requires MATLAB R2022b or newer. To run the code, the following MATLAB toolboxes need to be installed:

These two dependencies are configured as submodules of this repository and, provided that git is available, they can be installed with:

$ git submodule update --init

On a system that supports make the MATLAB interface to CPFloat can be built with

$ cd deps/cpfloat; make mexmat; cd ../..

provided that MATLAB is installed and available on the search path.

Directory structure

The repository contains three subfolders:

  • deps/, which contains the dependencies above;
  • methods/, which contains the subroutines required to reproduce the results; and
  • datfiles/, which contains the data generated by the main scripts.

Three main scripts are locate in the root directory:

  • startup.m, which adds the dependencies to the MATLAB path;
  • test_conditioning.m, which generates Figure 1;
  • plot_optk.m, which generates Figure 2;
  • test_mixedprecision.m, which generates Figure 3; and
  • run_tests.m, which runs the four scripts above and generate all numerical results.

The following algorithms in the manuscript are implemented:

  • Algorithm 3.1 is implemented in methods/sylvester_mprec_gmresir2.m;
  • Algorithm 5.1 is implemented in methods/sylvester_mprec_reorth.m; and
  • Algorithm 5.2 is implemented in methods/sylvester_mprec_inv.m.

Replicating the results

The data used to generate the figures in the manuscript can be generated running the MATLAB script:

>> arun_tests

Acknowledgments

The work of Andrii Dmytryshyn is supported by the Swedish Research Council (VR) under grant 2021-05393.

License

This project is licensed under the terms of the BSD 2-Clause "Simplified" License (SPDX-License-Identifier: BSD-2-Clause).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages