mir 0.22.1

LLVM-accelerated Generic Numerical Library for Science and Machine Learning

To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Dub downloads License Bountysource Gitter

Latest version

codecov.io Circle CI


❗️ Mir GLAS was moved to https://github.com/libmir/mir-glas.


Generic Numerical Library for Science and Machine Learning.

Other Mir Projects
Open Source Projects based on Mir


Documentation API can be found here. Read also the Mir blog.


  • mir.glas - Generic Linear Algebra Subroutines
  • mir.ndslice Multidimensional Random Access Ranges and Arrays
  • mir.sparse Sparse Tensors
  • Sparse - DOK format
  • Different ranges for COO format
  • CompressedTensor - CSR/CSC formats
  • mir.sparse.blas - Sparse BLAS for CompressedTensor
  • mir.model.lda.hoffman - Online variational Bayes for latent Dirichlet allocation (Online VB LDA) for sparse documents. LDA is used for topic modeling.
  • mir.combinatorics Combinations, combinations with repeats, cartesian power, permutations.


LDC (LLVM D Compiler)
  • >=1.1.0-beta6
  • >=2.072
LinuxMac OS XWindows
64-bitBuild StatusBuild StatusBuild status
32-bitBuild StatusN/AN/A

Fast setup with the dub package manager

Latest version

Dub is the D's package manager. You can create a new project with:

dub init <project-name>

Now you need to edit the dub.json add mir as dependency.

	"dependencies": {
		"mir": "~><current-version>"
	"dflags-ldc": ["-mcpu=native"]

Now you can create an app.d file in the source folder and run your code with

dub --compiler=ldmd2

Flag --build=release and can be added for a performance boost:

dub --compiler=ldmd2 --build=release

ldmd2 is a shell on top of LDC (LLVM D Compiler).

"dflags-ldc": ["-mcpu=native"] allows LDC to optimize Mir for your CPU.


See our TODO List. Mir is very young and we are open for contributing to source code, documentation, examples and benchmarks.


  • Ilya Yaroshenko
  • Sebastian Wilzbach
mir-math, mir-internal, mir-random
3.2.3 2022-Jun-05
3.2.2 2020-Nov-15
3.2.1 2020-Mar-30
3.2.0 2019-Apr-13
3.1.2 2019-Mar-23
Show all 81 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 8 downloads this month

  • 15141 downloads total

Short URL: