Linear algebra & BLAS
vsl.la, vsl.blas and vsl.lapack: dense matrices, solvers, least squares, eigensolvers — SIMD-vectorized pure-V kernels with optional OpenBLAS/LAPACKE acceleration.
VSL is the V Scientific Library — linear algebra, FFT, statistics, differentiation, optimization and machine-learning primitives, with SIMD kernels and optional OpenBLAS, LAPACKE, CUDA and Vulkan backends. It is the backend that powers VTL tensors.
Matrices, solvers and decompositions with a typed API — no C toolchain required for the pure-V path.
# install the module v install vsl // main.v — build and read a matrix import vsl.la as la fn main() { mut a := la.Matrix.new[f64](2, 2) a.set(0, 0, 1.0) a.set(1, 1, 2.0) println(a.get(1, 1)) // 2.0 }
VSL is organized as focused modules that compose — the same kernels serve direct users and VTL's tensor operations.
vsl.la, vsl.blas and vsl.lapack: dense matrices, solvers, least squares, eigensolvers — SIMD-vectorized pure-V kernels with optional OpenBLAS/LAPACKE acceleration.
vsl.fft for spectral work, vsl.deriv and vsl.diff for numerical differentiation (GSL-inspired), plus integration and interpolation helpers.
vsl.dist, vsl.metrics, vsl.ml and vsl.model_selection: distributions, histograms, evaluation metrics and classic model building blocks.
vsl.gm and quaternion support for 3D work, alongside graph algorithms in vsl.graph and data I/O in vsl.inout.
Optional CUDA and Vulkan compute paths, MPI parallelism, and a multi-backend compute layer — enabled explicitly, never silently assumed.
GPU guide →VTL builds N-dimensional tensors, autograd and neural networks on top of these kernels — NumPy/PyTorch-style computing with VSL underneath.
VTL website →Paired GEMM measurement on a Ryzen 9 5900X, 2 threads: VSL with OpenBLAS 0.3.34 against the NumPy 2.5.3 wheel. Builds differ, so read this as a GEMM sample — the full benchmark suite is in the repository.
Method: compile with -prod first, then execute the binary — never v run for timings. Reproduce from the benchmarks directory.
The ML roadmap tracks the march toward a complete scientific backend for VTL: broader decompositions, correctly-rounded elementary functions, operator coverage for every public struct, and Enoki-style SIMD data layouts for hot kernels.