Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

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

文档标签和贡献者

 此页面的贡献者: eduardoboucas, fscholz
 最后编辑者: eduardoboucas,