This article is in need of an editorial review.
This translation is incomplete. Please help translate this article from English.
This is an experimental technology, part of the Harmony (ECMAScript 7) proposal.
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future version of browsers as the spec changes.
静的なSIMD.%type%.sub() メソッドは減算したレーン値をもつ新しいインスタンスを返します(a - b)。
構文
SIMD.float32x4.sub(a, b) SIMD.float64x2.sub(a, b) SIMD.int8x16.sub(a, b) SIMD.int16x8.sub(a, b) SIMD.int32x4.sub(a, b)
引数
- a
- SIMD型のインスタンス
b- SIMD型の別のインスタンス
戻り値
aからbを減算したレーン値をもつ新しい対応するSIMDデータ型(a - b)。
例
var a = SIMD.float32x4(-1, -2, 3, 4); var b = SIMD.float32x4(3, 3, 3, 3); SIMD.float32x4.sub(a, b); // float32x4[-4, -5, 0, 1] var c = SIMD.int16x8(1, 1, 1, 1, 1, 1, 1, 1); var d = SIMD.int16x8(3, 3, 3, 3, 3, 3, 3, 3); SIMD.int16x8.sub(c, d) // int16x8[-2, -2, -2, -2, -2, -2, -2, -2]
仕様
SIMDはまだ公式規格文書やドラフトでサポートされていません。typed arraysに基づいた標準化作業や互換性実装のために、ecmascript_simd GitHub リポジトリを確かめて下さい。
ブラウザ実装状況
| 機能 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| 基本サポート | 未サポート | Nightly build | 未サポート | 未サポート | 未サポート |
| 機能 | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| 基本サポート | 未サポート | 未サポート | Nightly build | 未サポート | 未サポート | 未サポート |