Socket
Book a DemoInstallSign in
Socket

simd

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simd

SIMD polyfill

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
71
-21.11%
Maintainers
1
Weekly downloads
 
Created
Source

simd Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

ES7 (proposed) SIMD numeric type shim/polyfill

128-bit SIMD numeric value type ECMAScript straw man proposal.

Source:

Nearly every word of this README and line of code and tests are taken directly from ecmascript_simd.

The purpose of this is to make it a require-able module, that does not automatically modify the global environment, for use in the es7-shim.

Requirements

The SIMD polyfill requires Typed Arrays to be present in the engine. A Typed Array polyfill can be found here - source is from here.

Usage:

var SIMD = require('simd');
var a = SIMD.float32x4(1.0, 2.0, 3.0, 4.0);
var b = SIMD.float32x4(5.0, 6.0, 7.0, 8.0);
var c = SIMD.float32x4.add(a,b);
assert.deepEqual(c, [6.0, 8.0, 10.0, 12.0]);

To install the shim in the global environment:

var simd = require('simd');
simd.shim();
assert.equal(SIMD, simd);

Introduction

Overview

Data Types

Keywords

simd

FAQs

Package last updated on 17 Jun 2015

Did you know?

Socket

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.

Install

Related posts