Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fit
 
 
 
 
 
 
la
 
 
ml
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Mentioned in Awesome V Build Status Documentation Status License: MIT

V Scientific Library

VSL is a Scientific Library with a great variety of different modules. Although most modules offer pure-V definitions, VSL also provides modules that wrap known C libraries that allow high performance computing as an alternative.

The version of this module will remain in 0.x.x unless the language API's are finalized and implemented.

Docs

Visit vsl docs to know more about the supported features.

This library contains essential functions for linear algebra computations (operations between all combinations of vectors and matrices, eigenvalues and eigenvectors, linear solvers) and the development of numerical methods (e.g. numerical quadrature).

We link VSL with existent libraries written in C and Fortran, such as OpenBLAS and LAPACK. These existing libraries have been fundamental for the development of high-performant simulations over many years. We believe that it is nearly impossible to rewrite these libraries in native V and at the same time achieve the same speed delivered by them.

Installation

Because of C dependencies and other libraries, the easiest way to work with VSL is via Docker. Having Docker and VS Code installed, you can start developing powerful numerical simulations using VSL in a matter of seconds. Furthermore, the best part of it is that it works on Windows, Linux, and macOS out of the box.

Quick, containerized (recommended)

  1. Install Docker
  2. Install Visual Studio Code
  3. Install the Remote Development extension for VS Code
  4. Clone https://github.com/ulises-jeremias/hello-vsl
  5. Create your application within a container (see gif below)

Done. And your system will remain "clean".

Our Docker Image also contains V and the V Tools for working with VS Code (or not). Below is a video showing the convenience of VS Code + the V tools + VSL.

Install VSL locally

Because we use CV for linking VSL with many libraries, it is not enough to use the so convenient v install or vpkg get functionality for installing VSL. First we need to install some dependencies in order to have VSL working as expected.

Install dependencies

Debian/Ubuntu GNU Linux

$ sudo apt-get install -y --no-install-recommends \
    gcc \
    gfortran \
    liblapacke-dev \
    libopenblas-dev \

Arch Linux/Manjaro GNU Linux

$ sudo pacman -S lapack lapacke openblas

Install VSL

Via vpm

$ v install vsl

Via vpkg

$ vpkg get https://github.com/vlang/vsl

Done. Installation completed.

Testing

To test the module, just type the following command:

$ make test # or ./bin/test

License

MIT

Contributors

You can’t perform that action at this time.