Skip to main content

MtxVec icon

MtxVec for .NET

Dew.Math: MtxVec for C#, VB.NET and C++

MtxVec rewritten in C#, published on NuGet as Dew.Math, built to cut the cost of writing fast .NET code; the gain over plain .NET code is largest for complex numbers.

Typical speed-ups

  • 5–50× real workloads, against pure C#
  • 3–4× vector functions, often up to 20×
  • 30× matrix multiplication

Specific to .NET

Three packages, one API

Dew.Math, Dew.Math.Linux and Dew.Math.Core share namespaces, class names and method signatures, so the platform changes with no code change — no conditional compilation, no second code path. All three are 64-bit only.

  • Dew.Math for Windows: native BLAS, LAPACK and vector kernels with automatic dispatch to AVX2 and AVX-512, wrapped in thin, safe .NET classes with little transition overhead.
  • Dew.Math.Linux for Linux: the same native acceleration.
  • Dew.Math.Core for every platform: pure managed code.

Develop on Windows with Dew.Math; before a Linux deployment, uninstall it, install Dew.Math.Linux, rebuild and deploy. Or build portable libraries, plugins and MAUI, Android, iOS or WebAssembly apps on Dew.Math.Core, and switch to Dew.Math or Dew.Math.Linux at deployment to turn on the hardware acceleration.

Linux

Dew.Math.Linux carries its Linux-native runtime, for glibc-based Red Hat Enterprise Linux, Rocky Linux and AlmaLinux 7 to 9, CentOS 7 (legacy), CentOS Stream 8 and 9, and Ubuntu and Debian with a matching glibc — confirmed on Ubuntu LTS 18.04 and Debian 10 and newer. It runs on HPC clusters (SLURM, PBS, LSF and Kubernetes batch nodes), on scientific and headless compute nodes, on AWS, Azure and GCP machines, in Docker, Podman and Kubernetes images with no extra runtime installer, and in simulation engines, data-processing pipelines and on-premises microservice and model-serving back ends. Its trial runs under a debugger — Visual Studio Code with the .NET debugger extension, or JetBrains Rider; outside one, as a service or from the command line, it runs in evaluation mode.

Dew.Math.Core

The Core Edition for .NET: pure managed code with no native libraries to deploy, vectorized by .NET's own AVX2 and AVX-512 support — not as fast as the native packages, but optimized. The Core Edition page lists where it runs.

Memory under the garbage collector

Vectors and matrices are garbage-collected like any .NET object, yet the memory manager keeps the GC pressure low: math calls nearly never allocate. The library works with the Task Parallel Library.

Charts

Two WinForms packages push vectors and matrices into TeeChart series with minimal overhead, for real-time display of large buffers: MtxFastLine draws millions of points, and MtxGridSeries paints heatmaps and matrices with palette control. Dew.Math.Tee bundles the free TeeChart Lite, with no Steema installation, for .NET Framework 4.8 — for desktop tools that plot vectors, matrices, statistics and analysis results without the full commercial TeeChart. Dew.Math.TeePro uses the commercial TeeChart.NET, which needs its own license from Steema, for the full feature set on .NET Framework 4.8 and .NET 8 and 9 on Windows. Both are WinForms only — not WPF — run in 64-bit mode, are written entirely in C# and show XML documentation tooltips in Visual Studio; both are separate packages since 6.3.5, so charting stays opt-in.

Dew.Lab.Studio

Dew.Signal for real-time filtering, FFT, streaming and measurement, and Dew.Stats for probability, regression, inference and statistical modeling, come in the same three packages. Dew.Lab.Studio bundles Dew.Math, Dew.Signal and Dew.Stats with their chart packages — Dew.Math.TeePro, Dew.Signal.Tee for waveforms, spectra and spectrograms, and Dew.Stats.Tee for statistical plots and histograms — for oscilloscope-style signals, FFT and CZT spectra with peak tracking, heatmaps and matrices, histograms and distribution profiles. Dew.Lab.Studio.Linux bundles the Linux packages, for HPC clusters, servers, research systems, container-based analytics, real-time instrumentation and large-scale DSP; Dew.Lab.Studio.Core bundles the Core packages, for mobile, plugin architectures, browser runtimes and restricted environments where unmanaged deployment is not allowed. All three share namespaces, class names and API signatures. The chart packages need WinForms: on .NET 8 and 9, enable the Windows desktop SDK — a -windows target framework with UseWindowsForms.

Visual Studio

Visual Studio and Visual Studio Code integration, XMLDoc tooltips and debugger visualizers; on .NET 8 and 9 the package brings Microsoft's WinForms Designer SDK for the designer. The packages on nuget.org are trial versions and run only inside the Visual Studio IDE, and on Linux under a debugger; each carries its license text, DewMathLicense.txt.

Documentation and examples

The API reference documents every class and function, and the user guide gets you started; the examples on GitHub cover WinForms, WPF and ASP.NET on .NET Framework, and WinForms on .NET 6 to 9 — Windows applications, over the same computation API as on Linux.

Frameworks

  • Dew.Math: .NET Framework 4.8 and 4.8.1, .NET 8, 9 and 10, 64-bit
  • Dew.Math.Linux: .NET 8, 9 and 10, and .NET Core 2.0 to .NET 7 through .NET Standard 2.0
  • Dew.Math.Core: .NET 8, 9 and 10 for Windows, Linux, macOS, Mac Catalyst, iOS, tvOS, Android and the browser, and every .NET Standard 2.0 runtime — .NET Core 2.0 to .NET 7, .NET Framework 4.6.1 to 4.8.1, Xamarin, Mono and Tizen
  • Visual Studio 2022 and Visual Studio Code

Try MtxVec for .NET free

Install Dew.Math — or Dew.Lab.Studio, which adds Dew.Signal, Dew.Stats and the charts — from nuget.org or from Visual Studio's NuGet package manager. A license covers all MtxVec versions, with or without the C# source code.