SIMD.%type%.fromFloat64x2Bits()

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

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support No support Nightly build No support No support No support
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support No support No support Nightly build No support No support No support

See also

Document Tags and Contributors

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