We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

SIMD.%type%.fromFloat64x2Bits()

SIMD.js has been taken out of active development in TC39 and removed from Stage 3. It is not being pursued by web browsers for implementation anymore. SIMD operations exposed to the web are under active development within WebAssembly, with operations based on the SIMD.js operations.

Note: The Float64x2 type is currently not part of the SIMD specification draft.

The static SIMD.%type%.fromFloat64x2Bits() method creates a new SIMD data type with a bit-wise copy from a Float64x2.

Syntax

SIMD.Float32x4.fromFloat64x2Bits(t)

SIMD.Int32x4.fromFloat64x2Bits(t)
SIMD.Int16x8.fromFloat64x2Bits(t)
SIMD.Int8x16.fromFloat64x2Bits(t)

SIMD.Uint32x4.fromFloat64x2Bits(t)
SIMD.Uint16x8.fromFloat64x2Bits(t)
SIMD.Uint8x16.fromFloat64x2Bits(t)

Parameters

t
A Float64x2 SIMD type to convert from (bitwise).

Return value

A new SIMD data type with a bit-wise copy from a Float64x2.

Examples

SIMD.Float32x4.fromFloat64x2Bits

var t = SIMD.Float64x2(2.0, 1.875);
SIMD.Float32x4.fromFloat64x2Bits(t);
// Float32x4[0, 2.0, 0, 1.984375]

SIMD.Int32x4.fromFloat64x2Bits

var t = SIMD.Float64x2(1.0, 2.0);
SIMD.Int32x4.fromFloat64x2Bits(t);
// Int32x4[0, 1072693248, 0, 1073741824]

SIMD.Int16x8.fromFloat64x2Bits

var t = SIMD.Float64x2(1.0, 2.0);
SIMD.Int16x8.fromFloat64x2Bits(t);
// Int16x8[0, 0, 0, 16368, 0, 0, 0, 16384]

SIMD.Int8x16.fromFloat64x2Bits

var t = SIMD.Float64x2(1.0, 2.0);
SIMD.Int8x16.fromFloat64x2Bits(t);
// Int8x16[0,0,0,0,0,0,-16,63,0,0,0,0,0,0,0,64]

Specifications

SIMD is not yet part of an official standards document or draft. For standardization work and a Polyfill implementation based on typed arrays, see the ecmascript_simd GitHub repository.

Browser compatibility

Experimental SIMD.js has been removed from browsers. It's still available in Firefox Nightly, but will be removed in favor of a SIMD implementation in WebAssembly. See also bug 1416723.

See also

Document Tags and Contributors

Contributors to this page: fscholz, eduardoboucas
Last updated by: fscholz,