
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
Node >=6.9 C++ bindings for all single- and double-precision CBLAS (Basic Linear Algebra Subprograms) routines.
$Â npm install nclblast
$ npm test
?gbmv (a, x, y, [kl = 0], [ku = 0], [alpha = 1.0], [beta = 0], [trans = nclblast.NoTrans])?gemv (a, x, y, [alpha = 1.0], [beta = 0], [trans = nclblast.NoTrans])?ger (a, x, y, [alpha = 1.0])?sbmv (a, x, y, [uplo = nclblast.Upper], [alpha = 1.0], [beta = 0])?spmv (ap, x, y, [uplo = nclblast.Upper], [alpha = 1.0], [beta = 0])?spr (ap, x, [uplo = nclblast.Upper], [alpha = 1.0])?spr2 (ap, x, y, [uplo = nclblast.Upper], [alpha = 1.0])?symv (a, x, y, [uplo = nclblast.Upper], [alpha = 1.0], [beta = 0])?syr (a, x, [uplo = nclblast.Upper], [alpha = 1.0])?syr2 (a, x, y, [uplo = nclblast.Upper], [alpha = 1.0], [beta = 0])?tbmv (a, x, y, [uplo = nclblast.Upper], [trans = nclblast.NoTrans], [diag = nclblast.NonUnit])?tbsv (a, x, [uplo = nclblast.Upper], [diag = nclblast.NonUnit])?tpmv (ap, x, [uplo = nclblast.Upper], [trans = nclblast.NoTrans], [diag = nclblast.NonUnit])?tpsv (ap, x, [uplo = nclblast.Upper], [trans = nclblast.NoTrans], [diag = nclblast.NonUnit])?trmv (a, x, [uplo = nclblast.Upper], [trans = nclblast.NoTrans], [diag = nclblast.NonUnit])?trsv (a, x, [uplo = nclblast.Upper], [trans = nclblast.NoTrans], [diag = nclblast.NonUnit])?gemm (a, b, c, m, n, k, [transa = 111], [transb = 111], [alpha = 1.0], [beta = 0])?symm (a, b, c, m, n, [side = nclblast.Left], [uplo = nclblast.Upper], [alpha = 1.0], [beta = 0])?syrk (a, c, n, k, [uplo = nclblast.Upper], [trans = nclblast.NoTrans], [alpha = 1.0], [beta = 0])?syr2k (a, b, c, n, k, [uplo = nclblast.Upper], [trans = nclblast.NoTrans], [alpha = 1.0], [beta = 0])?trmm (a, b, m, n, [side = nclblast.Left], [uplo = nclblast.Upper], [transa = 111], [diag = nclblast.NonUnit], [alpha = 1.0])?trsm (a, b, m, n, [diag = nclblast.NonUnit], [uplo = nclblast.Upper], [transa = 111], [diag = nclblast.NonUnit], [alpha = 1.0])Matrix layout enums
trans)
nclblast.NoTrans (default)nclblast.Transnclblast.ConjTransuplo)
nclblast.Upper (default)nclblast.Lowerdiag)
nclblast.NonUnit (default)nclblast.Unitside)
nclblast.Left (default)nclblast.RightWorks out of the box with OSX since CBLAS is included in the standard Accelerate framework. You might have to download and build LAPACK from source on other operating systems (LINUX: sudo apt-get libblas-dev).
import { dot, ddot, sdot, dznrm2 } from './src';
const f64a = new Float64Array([1, 2, 3]);
const f64b = new Float64Array([4, 5, 6]);
console.log(dot(f64a, f64b));
// 32
console.log(ddot(3, f64a, 1, f64b, 1));
// 32
const f32a = new Float32Array([1, 2, 3]);
const f32b = new Float32Array([4, 5, 6]);
console.log(dot(f32a, f32b));
// 32
console.log(sdot(3, f32a, 1, f32b, 1));
// 32
// complex arrays are packed like this: [Re, Im, Re, Im, ...]
// this is equivalent to [1 + 2i, 3 + 4i]
const c16 = new Float64Array([1, 2, 3, 4]);
// complex l2 norm
console.log(dznrm2(2, c16, 1));
// sqrt(1^2 + 2^2 + 3^2 + 4^2) ~ 5.477
Double precision functions expect Float64Array vectors, single precision functions expect Float32Array vectors.
FAQs
C++ bindings for all single- and double-precision CLBlast routines.
We found that nclblast demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.