SIMD.fromFloat64x2Bits
SIMD.fromFloat64x2Bits
SIMD.js已经从TC39中取消了积极的开发,并从第三阶段中删除了。它不再被网页浏览器所追求。暴露在 web 上的SIMD 操作在 WebAssembly 中正处于积极的发展之中, 其操作基于 SIMD. js 操作。
注意:Float64x2类型目前不是SIMD规范草案的一部分。
静态SIMD.%type%.fromFloat64x2Bits()
方法使用Float64x2的按位副本创建新的SIMD数据类型。
语法
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)
参数
t
从(按位)转换的Float
64x2 SIMD类型。
返回值
新的SIMD数据类型,其中包含Float64x2的按位副本。
例子
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]
规范
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.
浏览器兼容性
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 |