dart.typed_data


Classes
ByteBuffer
ByteData
Endianness
Float32List
Float32x4
Float32x4List
Float64List
Int16List
Int32List
Int64List
Int8List
TypedData
Uint16List
Uint32List
Uint32x4
Uint64List
Uint8ClampedList
Uint8List

Abstract class ByteBuffer

Fields
lengthInBytes: int
Getters and Setters
lengthInBytes: int
Constructors
ByteBuffer()

A sequence of bytes underlying a typed data object. Used to process large quantities of binary or numerical data more efficiently using a typed view.

Fields

final int lengthInBytes

Getters and Setters

int get lengthInBytes

Returns the length of this byte buffer, in bytes.

Constructors

ByteBuffer()

Abstract class ByteData implements TypedData

Constructors
ByteData(int length)
ByteData.view(ByteBuffer buffer, int offsetInBytes, int length)
Methods
getFloat32(int byteOffset, Endianness endian): double
getFloat64(int byteOffset, Endianness endian): double
getInt16(int byteOffset, Endianness endian): int
getInt32(int byteOffset, Endianness endian): int
getInt64(int byteOffset, Endianness endian): int
getInt8(int byteOffset): int
getUint16(int byteOffset, Endianness endian): int
getUint32(int byteOffset, Endianness endian): int
getUint64(int byteOffset, Endianness endian): int
getUint8(int byteOffset): int
setFloat32(int byteOffset, double value, Endianness endian): void
setFloat64(int byteOffset, double value, Endianness endian): void
setInt16(int byteOffset, int value, Endianness endian): void
setInt32(int byteOffset, int value, Endianness endian): void
setInt64(int byteOffset, int value, Endianness endian): void
setInt8(int byteOffset, int value): void
setUint16(int byteOffset, int value, Endianness endian): void
setUint32(int byteOffset, int value, Endianness endian): void
setUint64(int byteOffset, int value, Endianness endian): void
setUint8(int byteOffset, int value): void

A fixed-length, random-access sequence of bytes that also provides random and unaligned access to the fixed-width integers and floating point numbers represented by those bytes. ByteData may be used to pack and unpack data from external sources (such as networks or files systems), and to process large quantities of numerical data more efficiently than would be possible with ordinary List implementations. ByteData can save space, by eliminating the need for object headers, and time, by eliminating the need for data copies. Finally, ByteData may be used to intentionally reinterpret the bytes representing one arithmetic type as another. For example this code fragment determine what 32-bit signed integer is represented by the bytes of a 32-bit floating point number:

var buffer = new Uint8List(8).buffer;
var bdata = new ByteData.view(buffer);
bdata.setFloat32(0, 3.04);
int huh = bdata.getInt32(0);

Constructors

factory ByteData(int length)

Creates a ByteData of the specified length (in elements), all of whose elements are initially zero.

factory ByteData.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates an ByteData _view_ of the specified region in the specified byte buffer. Changes in the ByteData will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.

Methods

double getFloat32(int byteOffset, Endianness endian)

Returns the floating point number represented by the four bytes at the specified byteOffset in this object, in IEEE 754 single-precision binary floating-point format (binary32).

Throws RangeError if byteOffset is negative, or byteOffset + 4 is greater than the length of this object.

double getFloat64(int byteOffset, Endianness endian)

Returns the floating point number represented by the eight bytes at the specified byteOffset in this object, in IEEE 754 double-precision binary floating-point format (binary64).

Throws RangeError if byteOffset is negative, or byteOffset + 8 is greater than the length of this object.

int getInt16(int byteOffset, Endianness endian)

Returns the (possibly negative) integer represented by the two bytes at the specified byteOffset in this object, in two's complement binary form. The return value will be between 2<sup>15</sup> and 2<sup>15</sup> - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 2 is greater than the length of this object.

int getInt32(int byteOffset, Endianness endian)

Returns the (possibly negative) integer represented by the four bytes at the specified byteOffset in this object, in two's complement binary form. The return value will be between 2<sup>31</sup> and 2<sup>31</sup> - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 4 is greater than the length of this object.

int getInt64(int byteOffset, Endianness endian)

Returns the (possibly negative) integer represented by the eight bytes at the specified byteOffset in this object, in two's complement binary form. The return value will be between 2<sup>63</sup> and 2<sup>63</sup> - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 8 is greater than the length of this object.

int getInt8(int byteOffset)

Returns the (possibly negative) integer represented by the byte at the specified byteOffset in this object, in two's complement binary representation. The return value will be between -128 and 127, inclusive.

Throws RangeError if byteOffset is negative, or greater than or equal to the length of this object.

int getUint16(int byteOffset, Endianness endian)

Returns the positive integer represented by the two bytes starting at the specified byteOffset in this object, in unsigned binary form. The return value will be between 0 and 2<sup>16</sup> - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 2 is greater than the length of this object.

int getUint32(int byteOffset, Endianness endian)

Returns the positive integer represented by the four bytes starting at the specified byteOffset in this object, in unsigned binary form. The return value will be between 0 and 2<sup>32</sup> - 1, inclusive.

int getUint64(int byteOffset, Endianness endian)

Returns the positive integer represented by the eight bytes starting at the specified byteOffset in this object, in unsigned binary form. The return value will be between 0 and 2<sup>64</sup> - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 8 is greater than the length of this object.

int getUint8(int byteOffset)

Returns the positive integer represented by the byte at the specified byteOffset in this object, in unsigned binary form. The return value will be between 0 and 255, inclusive.

Throws RangeError if byteOffset is negative, or greater than or equal to the length of this object.

void setFloat32(int byteOffset, double value, Endianness endian)

Sets the four bytes starting at the specified byteOffset in this object to the IEEE 754 single-precision binary floating-point (binary32) representation of the specified value.

Note that this method can lose precision. The input value is a 64-bit floating point value, which will be converted to 32-bit floating point value by IEEE 754 rounding rules before it is stored. If value cannot be represented exactly as a binary32, it will be converted to the nearest binary32 value. If two binary32 values are equally close, the one whose least significant bit is zero will be used. Note that finite (but large) values can be converted to infinity, and small non-zero values can be converted to zero.

Throws RangeError if byteOffset is negative, or byteOffset + 4 is greater than the length of this object.

void setFloat64(int byteOffset, double value, Endianness endian)

Sets the eight bytes starting at the specified byteOffset in this object to the IEEE 754 double-precision binary floating-point (binary64) representation of the specified value.

Throws RangeError if byteOffset is negative, or byteOffset + 8 is greater than the length of this object.

void setInt16(int byteOffset, int value, Endianness endian)

Sets the two bytes starting at the specified byteOffset in this object to the two's complement binary representation of the specified value, which must fit in two bytes. In other words, value must lie between 2<sup>15</sup> and 2<sup>15</sup> - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 2 is greater than the length of this object.

void setInt32(int byteOffset, int value, Endianness endian)

Sets the four bytes starting at the specified byteOffset in this object to the two's complement binary representation of the specified value, which must fit in four bytes. In other words, value must lie between 2<sup>31</sup> and 2<sup>31</sup> - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 4 is greater than the length of this object.

void setInt64(int byteOffset, int value, Endianness endian)

Sets the eight bytes starting at the specified byteOffset in this object to the two's complement binary representation of the specified value, which must fit in eight bytes. In other words, value must lie between 2<sup>63</sup> and 2<sup>63</sup> - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 8 is greater than the length of this object.

void setInt8(int byteOffset, int value)

Sets the byte at the specified byteOffset in this object to the two's complement binary representation of the specified value, which must fit in a single byte. In other words, value must be between -128 and 127, inclusive.

Throws RangeError if byteOffset is negative, or greater than or equal to the length of this object.

void setUint16(int byteOffset, int value, Endianness endian)

Sets the two bytes starting at the specified byteOffset in this object to the unsigned binary representation of the specified value, which must fit in two bytes. in other words, value must be between 0 and 2<sup>16</sup> - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 2 is greater than the length of this object.

void setUint32(int byteOffset, int value, Endianness endian)

Sets the four bytes starting at the specified byteOffset in this object to the unsigned binary representation of the specified value, which must fit in four bytes. in other words, value must be between 0 and 2<sup>32</sup> - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 4 is greater than the length of this object.

void setUint64(int byteOffset, int value, Endianness endian)

Sets the eight bytes starting at the specified byteOffset in this object to the unsigned binary representation of the specified value, which must fit in eight bytes. in other words, value must be between 0 and 2<sup>64</sup> - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 8 is greater than the length of this object.

void setUint8(int byteOffset, int value)

Sets the byte at the specified byteOffset in this object to the unsigned binary representation of the specified value, which must fit in a single byte. in other words, value must be between 0 and 255, inclusive.

Throws RangeError if byteOffset is negative, or greater than or equal to the length of this object.


Class Endianness

Static Fields
BIG_ENDIAN: Endianness
HOST_ENDIAN: Endianness
LITTLE_ENDIAN: Endianness

Describes endianness to be used when accessing or updating a sequence of bytes.

Static Fields

static const Endianness BIG_ENDIAN
static final Endianness HOST_ENDIAN
static const Endianness LITTLE_ENDIAN

Abstract class Float32List implements List<double>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Float32List(int length)
Float32List.fromList(List<double> elements)
Float32List.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of IEEE 754 single-precision binary floating-point numbers that is viewable as a TypedData. For long lists, this implementation can be considerably more space- and time-efficient than the default List implementation.

Static Fields

static const int BYTES_PER_ELEMENT = 4

Constructors

factory Float32List(int length)

Creates a Float32List of the specified length (in elements), all of whose elements are initially zero.

factory Float32List.fromList(List<double> elements)

Creates a Float32List with the same size as the elements list and copies over the elements.

factory Float32List.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates a Float32List _view_ of the specified region in the specified byte buffer. Changes in the Float32List will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.

Throws ArgumentError if offsetInBytes is not a multiple of BYTES_PER_ELEMENT.


Abstract class Float32x4

Static Fields
WWWW: int
WWWX: int
WWWY: int
WWWZ: int
WWXW: int
WWXX: int
WWXY: int
WWXZ: int
WWYW: int
WWYX: int
WWYY: int
WWYZ: int
WWZW: int
WWZX: int
WWZY: int
WWZZ: int
WXWW: int
WXWX: int
WXWY: int
WXWZ: int
WXXW: int
WXXX: int
WXXY: int
WXXZ: int
WXYW: int
WXYX: int
WXYY: int
WXYZ: int
WXZW: int
WXZX: int
WXZY: int
WXZZ: int
WYWW: int
WYWX: int
WYWY: int
WYWZ: int
WYXW: int
WYXX: int
WYXY: int
WYXZ: int
WYYW: int
WYYX: int
WYYY: int
WYYZ: int
WYZW: int
WYZX: int
WYZY: int
WYZZ: int
WZWW: int
WZWX: int
WZWY: int
WZWZ: int
WZXW: int
WZXX: int
WZXY: int
WZXZ: int
WZYW: int
WZYX: int
WZYY: int
WZYZ: int
WZZW: int
WZZX: int
WZZY: int
WZZZ: int
XWWW: int
XWWX: int
XWWY: int
XWWZ: int
XWXW: int
XWXX: int
XWXY: int
XWXZ: int
XWYW: int
XWYX: int
XWYY: int
XWYZ: int
XWZW: int
XWZX: int
XWZY: int
XWZZ: int
XXWW: int
XXWX: int
XXWY: int
XXWZ: int
XXXW: int
XXXX: int
XXXY: int
XXXZ: int
XXYW: int
XXYX: int
XXYY: int
XXYZ: int
XXZW: int
XXZX: int
XXZY: int
XXZZ: int
XYWW: int
XYWX: int
XYWY: int
XYWZ: int
XYXW: int
XYXX: int
XYXY: int
XYXZ: int
XYYW: int
XYYX: int
XYYY: int
XYYZ: int
XYZW: int
XYZX: int
XYZY: int
XYZZ: int
XZWW: int
XZWX: int
XZWY: int
XZWZ: int
XZXW: int
XZXX: int
XZXY: int
XZXZ: int
XZYW: int
XZYX: int
XZYY: int
XZYZ: int
XZZW: int
XZZX: int
XZZY: int
XZZZ: int
YWWW: int
YWWX: int
YWWY: int
YWWZ: int
YWXW: int
YWXX: int
YWXY: int
YWXZ: int
YWYW: int
YWYX: int
YWYY: int
YWYZ: int
YWZW: int
YWZX: int
YWZY: int
YWZZ: int
YXWW: int
YXWX: int
YXWY: int
YXWZ: int
YXXW: int
YXXX: int
YXXY: int
YXXZ: int
YXYW: int
YXYX: int
YXYY: int
YXYZ: int
YXZW: int
YXZX: int
YXZY: int
YXZZ: int
YYWW: int
YYWX: int
YYWY: int
YYWZ: int
YYXW: int
YYXX: int
YYXY: int
YYXZ: int
YYYW: int
YYYX: int
YYYY: int
YYYZ: int
YYZW: int
YYZX: int
YYZY: int
YYZZ: int
YZWW: int
YZWX: int
YZWY: int
YZWZ: int
YZXW: int
YZXX: int
YZXY: int
YZXZ: int
YZYW: int
YZYX: int
YZYY: int
YZYZ: int
YZZW: int
YZZX: int
YZZY: int
YZZZ: int
ZWWW: int
ZWWX: int
ZWWY: int
ZWWZ: int
ZWXW: int
ZWXX: int
ZWXY: int
ZWXZ: int
ZWYW: int
ZWYX: int
ZWYY: int
ZWYZ: int
ZWZW: int
ZWZX: int
ZWZY: int
ZWZZ: int
ZXWW: int
ZXWX: int
ZXWY: int
ZXWZ: int
ZXXW: int
ZXXX: int
ZXXY: int
ZXXZ: int
ZXYW: int
ZXYX: int
ZXYY: int
ZXYZ: int
ZXZW: int
ZXZX: int
ZXZY: int
ZXZZ: int
ZYWW: int
ZYWX: int
ZYWY: int
ZYWZ: int
ZYXW: int
ZYXX: int
ZYXY: int
ZYXZ: int
ZYYW: int
ZYYX: int
ZYYY: int
ZYYZ: int
ZYZW: int
ZYZX: int
ZYZY: int
ZYZZ: int
ZZWW: int
ZZWX: int
ZZWY: int
ZZWZ: int
ZZXW: int
ZZXX: int
ZZXY: int
ZZXZ: int
ZZYW: int
ZZYX: int
ZZYY: int
ZZYZ: int
ZZZW: int
ZZZX: int
ZZZY: int
ZZZZ: int
Fields
signMask: int
w: double
x: double
y: double
z: double
Getters and Setters
signMask: int
w: double
x: double
y: double
z: double
Constructors
Float32x4(double x, double y, double z, double w)
Float32x4.splat(double v)
Float32x4.zero()
Methods
*(Float32x4 other): Float32x4
+(Float32x4 other): Float32x4
-(Float32x4 other): Float32x4
/(Float32x4 other): Float32x4
abs(): Float32x4
clamp(Float32x4 lowerLimit, Float32x4 upperLimit): Float32x4
equal(Float32x4 other): Uint32x4
greaterThan(Float32x4 other): Uint32x4
greaterThanOrEqual(Float32x4 other): Uint32x4
interleaveXY(Float32x4 other): Float32x4
interleaveXYPairs(Float32x4 other): Float32x4
interleaveZW(Float32x4 other): Float32x4
interleaveZWPairs(Float32x4 other): Float32x4
lessThan(Float32x4 other): Uint32x4
lessThanOrEqual(Float32x4 other): Uint32x4
max(Float32x4 other): Float32x4
min(Float32x4 other): Float32x4
notEqual(Float32x4 other): Uint32x4
reciprocal(): Float32x4
reciprocalSqrt(): Float32x4
scale(double s): Float32x4
shuffle(int mask): Float32x4
sqrt(): Float32x4
toUint32x4(): Uint32x4
unary-(): Float32x4
withW(double w): Float32x4
withX(double x): Float32x4
withY(double y): Float32x4
withZ(double z): Float32x4
withZWInXY(Float32x4 other): Float32x4

Interface of Dart Float32x4 immutable value type and operations. Float32x4 stores 4 32-bit floating point values in "lanes". The lanes are "x", "y", "z", and "w" respectively.

Static Fields

static const int WWWW = 255
static const int WWWX = 63
static const int WWWY = 127
static const int WWWZ = 191
static const int WWXW = 207
static const int WWXX = 15
static const int WWXY = 79
static const int WWXZ = 143
static const int WWYW = 223
static const int WWYX = 31
static const int WWYY = 95
static const int WWYZ = 159
static const int WWZW = 239
static const int WWZX = 47
static const int WWZY = 111
static const int WWZZ = 175
static const int WXWW = 243
static const int WXWX = 51
static const int WXWY = 115
static const int WXWZ = 179
static const int WXXW = 195
static const int WXXX = 3
static const int WXXY = 67
static const int WXXZ = 131
static const int WXYW = 211
static const int WXYX = 19
static const int WXYY = 83
static const int WXYZ = 147
static const int WXZW = 227
static const int WXZX = 35
static const int WXZY = 99
static const int WXZZ = 163
static const int WYWW = 247
static const int WYWX = 55
static const int WYWY = 119
static const int WYWZ = 183
static const int WYXW = 199
static const int WYXX = 7
static const int WYXY = 71
static const int WYXZ = 135
static const int WYYW = 215
static const int WYYX = 23
static const int WYYY = 87
static const int WYYZ = 151
static const int WYZW = 231
static const int WYZX = 39
static const int WYZY = 103
static const int WYZZ = 167
static const int WZWW = 251
static const int WZWX = 59
static const int WZWY = 123
static const int WZWZ = 187
static const int WZXW = 203
static const int WZXX = 11
static const int WZXY = 75
static const int WZXZ = 139
static const int WZYW = 219
static const int WZYX = 27
static const int WZYY = 91
static const int WZYZ = 155
static const int WZZW = 235
static const int WZZX = 43
static const int WZZY = 107
static const int WZZZ = 171
static const int XWWW = 252
static const int XWWX = 60
static const int XWWY = 124
static const int XWWZ = 188
static const int XWXW = 204
static const int XWXX = 12
static const int XWXY = 76
static const int XWXZ = 140
static const int XWYW = 220
static const int XWYX = 28
static const int XWYY = 92
static const int XWYZ = 156
static const int XWZW = 236
static const int XWZX = 44
static const int XWZY = 108
static const int XWZZ = 172
static const int XXWW = 240
static const int XXWX = 48
static const int XXWY = 112
static const int XXWZ = 176
static const int XXXW = 192
static const int XXXX = 0

Mask passed to shuffle.

static const int XXXY = 64
static const int XXXZ = 128
static const int XXYW = 208
static const int XXYX = 16
static const int XXYY = 80
static const int XXYZ = 144
static const int XXZW = 224
static const int XXZX = 32
static const int XXZY = 96
static const int XXZZ = 160
static const int XYWW = 244
static const int XYWX = 52
static const int XYWY = 116
static const int XYWZ = 180
static const int XYXW = 196
static const int XYXX = 4
static const int XYXY = 68
static const int XYXZ = 132
static const int XYYW = 212
static const int XYYX = 20
static const int XYYY = 84
static const int XYYZ = 148
static const int XYZW = 228
static const int XYZX = 36
static const int XYZY = 100
static const int XYZZ = 164
static const int XZWW = 248
static const int XZWX = 56
static const int XZWY = 120
static const int XZWZ = 184
static const int XZXW = 200
static const int XZXX = 8
static const int XZXY = 72
static const int XZXZ = 136
static const int XZYW = 216
static const int XZYX = 24
static const int XZYY = 88
static const int XZYZ = 152
static const int XZZW = 232
static const int XZZX = 40
static const int XZZY = 104
static const int XZZZ = 168
static const int YWWW = 253
static const int YWWX = 61
static const int YWWY = 125
static const int YWWZ = 189
static const int YWXW = 205
static const int YWXX = 13
static const int YWXY = 77
static const int YWXZ = 141
static const int YWYW = 221
static const int YWYX = 29
static const int YWYY = 93
static const int YWYZ = 157
static const int YWZW = 237
static const int YWZX = 45
static const int YWZY = 109
static const int YWZZ = 173
static const int YXWW = 241
static const int YXWX = 49
static const int YXWY = 113
static const int YXWZ = 177
static const int YXXW = 193
static const int YXXX = 1
static const int YXXY = 65
static const int YXXZ = 129
static const int YXYW = 209
static const int YXYX = 17
static const int YXYY = 81
static const int YXYZ = 145
static const int YXZW = 225
static const int YXZX = 33
static const int YXZY = 97
static const int YXZZ = 161
static const int YYWW = 245
static const int YYWX = 53
static const int YYWY = 117
static const int YYWZ = 181
static const int YYXW = 197
static const int YYXX = 5
static const int YYXY = 69
static const int YYXZ = 133
static const int YYYW = 213
static const int YYYX = 21
static const int YYYY = 85
static const int YYYZ = 149
static const int YYZW = 229
static const int YYZX = 37
static const int YYZY = 101
static const int YYZZ = 165
static const int YZWW = 249
static const int YZWX = 57
static const int YZWY = 121
static const int YZWZ = 185
static const int YZXW = 201
static const int YZXX = 9
static const int YZXY = 73
static const int YZXZ = 137
static const int YZYW = 217
static const int YZYX = 25
static const int YZYY = 89
static const int YZYZ = 153
static const int YZZW = 233
static const int YZZX = 41
static const int YZZY = 105
static const int YZZZ = 169
static const int ZWWW = 254
static const int ZWWX = 62
static const int ZWWY = 126
static const int ZWWZ = 190
static const int ZWXW = 206
static const int ZWXX = 14
static const int ZWXY = 78
static const int ZWXZ = 142
static const int ZWYW = 222
static const int ZWYX = 30
static const int ZWYY = 94
static const int ZWYZ = 158
static const int ZWZW = 238
static const int ZWZX = 46
static const int ZWZY = 110
static const int ZWZZ = 174
static const int ZXWW = 242
static const int ZXWX = 50
static const int ZXWY = 114
static const int ZXWZ = 178
static const int ZXXW = 194
static const int ZXXX = 2
static const int ZXXY = 66
static const int ZXXZ = 130
static const int ZXYW = 210
static const int ZXYX = 18
static const int ZXYY = 82
static const int ZXYZ = 146
static const int ZXZW = 226
static const int ZXZX = 34
static const int ZXZY = 98
static const int ZXZZ = 162
static const int ZYWW = 246
static const int ZYWX = 54
static const int ZYWY = 118
static const int ZYWZ = 182
static const int ZYXW = 198
static const int ZYXX = 6
static const int ZYXY = 70
static const int ZYXZ = 134
static const int ZYYW = 214
static const int ZYYX = 22
static const int ZYYY = 86
static const int ZYYZ = 150
static const int ZYZW = 230
static const int ZYZX = 38
static const int ZYZY = 102
static const int ZYZZ = 166
static const int ZZWW = 250
static const int ZZWX = 58
static const int ZZWY = 122
static const int ZZWZ = 186
static const int ZZXW = 202
static const int ZZXX = 10
static const int ZZXY = 74
static const int ZZXZ = 138
static const int ZZYW = 218
static const int ZZYX = 26
static const int ZZYY = 90
static const int ZZYZ = 154
static const int ZZZW = 234
static const int ZZZX = 42
static const int ZZZY = 106
static const int ZZZZ = 170

Fields

final int signMask
final double w
final double x
final double y
final double z

Getters and Setters

int get signMask

Extract the sign bits from each lane return them in the first 4 bits.

double get w

Extracted w value.

double get x

Extracted x value.

double get y

Extracted y value.

double get z

Extracted z value.

Constructors

factory Float32x4(double x, double y, double z, double w)
factory Float32x4.splat(double v)
factory Float32x4.zero()

Methods

Float32x4 *(Float32x4 other)

Multiplication operator.

Float32x4 +(Float32x4 other)

Addition operator.

Float32x4 -(Float32x4 other)

Subtraction operator.

Float32x4 /(Float32x4 other)

Division operator.

Float32x4 abs()

Returns the absolute value of this Float32x4.

Float32x4 clamp(Float32x4 lowerLimit, Float32x4 upperLimit)

Clamps this to be in the range lowerLimit-upperLimit.

Uint32x4 equal(Float32x4 other)

Relational equal.

Uint32x4 greaterThan(Float32x4 other)

Relational greater than.

Uint32x4 greaterThanOrEqual(Float32x4 other)

Relational greater than or equal.

Float32x4 interleaveXY(Float32x4 other)

Returns a new Float32x4 with the X and Y lane values from this and other interleaved.

Float32x4 interleaveXYPairs(Float32x4 other)

Returns a new Float32x4 with the X and Y lane value pairs from this and other interleaved.

Float32x4 interleaveZW(Float32x4 other)

Returns a new Float32x4 with the Z and W lane values from this and other interleaved.

Float32x4 interleaveZWPairs(Float32x4 other)

Returns a new Float32x4 with the Z and W lane value pairs from this and other interleaved.

Uint32x4 lessThan(Float32x4 other)

Relational less than.

Uint32x4 lessThanOrEqual(Float32x4 other)

Relational less than or equal.

Float32x4 max(Float32x4 other)

Returns the lane-wise maximum value in this or other.

Float32x4 min(Float32x4 other)

Returns the lane-wise minimum value in this or other.

Uint32x4 notEqual(Float32x4 other)

Relational not-equal.

Float32x4 reciprocal()

Returns the reciprocal of this.

Float32x4 reciprocalSqrt()

Returns the square root of the reciprocal of this.

Float32x4 scale(double s)

Returns a copy of this each lane being scaled by s.

Float32x4 shuffle(int mask)

Shuffle the lane values. mask must be one of the 256 shuffle constants.

Float32x4 sqrt()

Returns the square root of this.

Uint32x4 toUint32x4()

Returns a bit-wise copy of this as a Uint32x4.

Float32x4 unary-()

Negate operator.

Float32x4 withW(double w)

Returns a new Float32x4 copied from this with a new w value.

Float32x4 withX(double x)

Returns a new Float32x4 copied from this with a new x value.

Float32x4 withY(double y)

Returns a new Float32x4 copied from this with a new y value.

Float32x4 withZ(double z)

Returns a new Float32x4 copied from this with a new z value.

Float32x4 withZWInXY(Float32x4 other)

Returns a new Float32x4 with values in the X and Y lanes replaced with the values in the Z and W lanes of other.


Abstract class Float32x4List implements List<Float32x4>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Float32x4List(int length)
Float32x4List.fromList(List<Float32x4> elements)
Float32x4List.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of Float32x4 numbers that is viewable as a TypedData. For long lists, this implementation will be considerably more space- and time-efficient than the default List implementation.

Static Fields

static const int BYTES_PER_ELEMENT = 16

Constructors

factory Float32x4List(int length)

Creates a Float32x4List of the specified length (in elements), all of whose elements are initially zero.

factory Float32x4List.fromList(List<Float32x4> elements)

Creates a Float32x4List with the same size as the elements list and copies over the elements.

factory Float32x4List.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates a Float32x4List _view_ of the specified region in the specified byte buffer. Changes in the Float32x4List will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.

Throws ArgumentError if offsetInBytes is not a multiple of BYTES_PER_ELEMENT.


Abstract class Float64List implements List<double>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Float64List(int length)
Float64List.fromList(List<double> elements)
Float64List.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of IEEE 754 double-precision binary floating-point numbers that is viewable as a TypedData. For long lists, this implementation can be considerably more space- and time-efficient than the default List implementation.

Static Fields

static const int BYTES_PER_ELEMENT = 8

Constructors

factory Float64List(int length)

Creates a Float64List of the specified length (in elements), all of whose elements are initially zero.

factory Float64List.fromList(List<double> elements)

Creates a Float64List with the same size as the elements list and copies over the elements.

factory Float64List.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates a Float64List _view_ of the specified region in the specified byte buffer. Changes in the Float64List will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.

Throws ArgumentError if offsetInBytes is not a multiple of BYTES_PER_ELEMENT.


Abstract class Int16List implements List<int>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Int16List(int length)
Int16List.fromList(List<int> elements)
Int16List.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of 16-bit signed integers that is viewable as a TypedData. For long lists, this implementation can be considerably more space- and time-efficient than the default List implementation.

Static Fields

static const int BYTES_PER_ELEMENT = 2

Constructors

factory Int16List(int length)

Creates an Int16List of the specified length (in elements), all of whose elements are initially zero.

factory Int16List.fromList(List<int> elements)

Creates a Int16List with the same size as the elements list and copies over the elements.

factory Int16List.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates an Int16List _view_ of the specified region in the specified byte buffer. Changes in the Int16List will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.

Throws ArgumentError if offsetInBytes is not a multiple of BYTES_PER_ELEMENT.


Abstract class Int32List implements List<int>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Int32List(int length)
Int32List.fromList(List<int> elements)
Int32List.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of 32-bit signed integers that is viewable as a TypedData. For long lists, this implementation can be considerably more space- and time-efficient than the default List implementation.

Static Fields

static const int BYTES_PER_ELEMENT = 4

Constructors

factory Int32List(int length)

Creates an Int32List of the specified length (in elements), all of whose elements are initially zero.

factory Int32List.fromList(List<int> elements)

Creates a Int32List with the same size as the elements list and copies over the elements.

factory Int32List.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates an Int32List _view_ of the specified region in the specified byte buffer. Changes in the Int32List will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.

Throws ArgumentError if offsetInBytes is not a multiple of BYTES_PER_ELEMENT.


Abstract class Int64List implements List<int>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Int64List(int length)
Int64List.fromList(List<int> elements)
Int64List.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of 64-bit signed integers that is viewable as a TypedData. For long lists, this implementation can be considerably more space- and time-efficient than the default List implementation.

Static Fields

static const int BYTES_PER_ELEMENT = 8

Constructors

factory Int64List(int length)

Creates an Int64List of the specified length (in elements), all of whose elements are initially zero.

factory Int64List.fromList(List<int> elements)

Creates a Int64List with the same size as the elements list and copies over the elements.

factory Int64List.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates an Int64List _view_ of the specified region in the specified byte buffer. Changes in the Int64List will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.

Throws ArgumentError if offsetInBytes is not a multiple of BYTES_PER_ELEMENT.


Abstract class Int8List implements List<int>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Int8List(int length)
Int8List.fromList(List<int> elements)
Int8List.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of 8-bit signed integers. For long lists, this implementation can be considerably more space- and time-efficient than the default List implementation.

Static Fields

static const int BYTES_PER_ELEMENT = 1

Constructors

factory Int8List(int length)

Creates an Int8List of the specified length (in elements), all of whose elements are initially zero.

factory Int8List.fromList(List<int> elements)

Creates a Int8List with the same size as the elements list and copies over the elements.

factory Int8List.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates an Int8List _view_ of the specified region in the specified byte buffer. Changes in the Int8List will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.


Abstract class TypedData

Fields
buffer: ByteBuffer
elementSizeInBytes: int
lengthInBytes: int
offsetInBytes: int
Getters and Setters
buffer: ByteBuffer
elementSizeInBytes: int
lengthInBytes: int
offsetInBytes: int
Constructors
TypedData()

A typed view of a sequence of bytes.

Fields

final ByteBuffer buffer
final int elementSizeInBytes
final int lengthInBytes
final int offsetInBytes

Getters and Setters

ByteBuffer get buffer

Returns the byte buffer associated with this object.

int get elementSizeInBytes

Returns the number of bytes in the representation of each element in this list.

int get lengthInBytes

Returns the length of this view, in bytes.

int get offsetInBytes

Returns the offset in bytes into the underlying byte buffer of this view.

Constructors

TypedData()

Abstract class Uint16List implements List<int>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Uint16List(int length)
Uint16List.fromList(List<int> elements)
Uint16List.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of 16-bit unsigned integers that is viewable as a TypedData. For long lists, this implementation can be considerably more space- and time-efficient than the default List implementation.

Static Fields

static const int BYTES_PER_ELEMENT = 2

Constructors

factory Uint16List(int length)

Creates a Uint16List of the specified length (in elements), all of whose elements are initially zero.

factory Uint16List.fromList(List<int> elements)

Creates a Uint16List with the same size as the elements list and copies over the elements.

factory Uint16List.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates a Uint16List _view_ of the specified region in the specified byte buffer. Changes in the Uint16List will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.

Throws ArgumentError if offsetInBytes is not a multiple of BYTES_PER_ELEMENT.


Abstract class Uint32List implements List<int>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Uint32List(int length)
Uint32List.fromList(List<int> elements)
Uint32List.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of 32-bit unsigned integers that is viewable as a TypedData. For long lists, this implementation can be considerably more space- and time-efficient than the default List implementation.

Static Fields

static const int BYTES_PER_ELEMENT = 4

Constructors

factory Uint32List(int length)

Creates a Uint32List of the specified length (in elements), all of whose elements are initially zero.

factory Uint32List.fromList(List<int> elements)

Creates a Uint32List with the same size as the elements list and copies over the elements.

factory Uint32List.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates a Uint32List _view_ of the specified region in the specified byte buffer. Changes in the Uint32 will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.

Throws ArgumentError if offsetInBytes is not a multiple of BYTES_PER_ELEMENT.


Abstract class Uint32x4

Fields
flagW: bool
flagX: bool
flagY: bool
flagZ: bool
signMask: int
w: int
x: int
y: int
z: int
Getters and Setters
flagW: bool
flagX: bool
flagY: bool
flagZ: bool
signMask: int
w: int
x: int
y: int
z: int
Constructors
Uint32x4(int x, int y, int z, int w)
Uint32x4.bool(bool x, bool y, bool z, bool w)
Methods
&(Uint32x4 other): Uint32x4
+(Uint32x4 other): Uint32x4
-(Uint32x4 other): Uint32x4
^(Uint32x4 other): Uint32x4
select(Float32x4 trueValue, Float32x4 falseValue): Float32x4
toFloat32x4(): Float32x4
withFlagW(bool w): Uint32x4
withFlagX(bool x): Uint32x4
withFlagY(bool y): Uint32x4
withFlagZ(bool z): Uint32x4
withW(int w): Uint32x4
withX(int x): Uint32x4
withY(int y): Uint32x4
withZ(int z): Uint32x4
|(Uint32x4 other): Uint32x4

Interface of Dart Uint32x4 and operations. Uint32x4 stores 4 32-bit bit-masks in "lanes". The lanes are "x", "y", "z", and "w" respectively.

Fields

final bool flagW
final bool flagX
final bool flagY
final bool flagZ
final int signMask
final int w
final int x
final int y
final int z

Getters and Setters

bool get flagW

Extracted w value. Returns false for 0, true for any other value.

bool get flagX

Extracted x value. Returns false for 0, true for any other value.

bool get flagY

Extracted y value. Returns false for 0, true for any other value.

bool get flagZ

Extracted z value. Returns false for 0, true for any other value.

int get signMask

Extract the top bit from each lane return them in the first 4 bits.

int get w

Extract 32-bit mask from w lane.

int get x

Extract 32-bit mask from x lane.

int get y

Extract 32-bit mask from y lane.

int get z

Extract 32-bit mask from z lane.

Constructors

factory Uint32x4(int x, int y, int z, int w)
factory Uint32x4.bool(bool x, bool y, bool z, bool w)

Methods

Uint32x4 &(Uint32x4 other)

The bit-wise and operator.

Uint32x4 +(Uint32x4 other)

Addition operator.

Uint32x4 -(Uint32x4 other)

Subtraction operator.

Uint32x4 ^(Uint32x4 other)

The bit-wise xor operator.

Float32x4 select(Float32x4 trueValue, Float32x4 falseValue)

Merge trueValue and falseValue based on this' bit mask: Select bit from trueValue when bit in this is on. Select bit from falseValue when bit in this is off.

Float32x4 toFloat32x4()

Returns a bit-wise copy of this as a Float32x4.

Uint32x4 withFlagW(bool w)

Returns a new Uint32x4 copied from this with a new w value.

Uint32x4 withFlagX(bool x)

Returns a new Uint32x4 copied from this with a new x value.

Uint32x4 withFlagY(bool y)

Returns a new Uint32x4 copied from this with a new y value.

Uint32x4 withFlagZ(bool z)

Returns a new Uint32x4 copied from this with a new z value.

Uint32x4 withW(int w)

Returns a new Uint32x4 copied from this with a new w value.

Uint32x4 withX(int x)

Returns a new Uint32x4 copied from this with a new x value.

Uint32x4 withY(int y)

Returns a new Uint32x4 copied from this with a new y value.

Uint32x4 withZ(int z)

Returns a new Uint32x4 copied from this with a new z value.

Uint32x4 |(Uint32x4 other)

The bit-wise or operator.


Abstract class Uint64List implements List<int>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Uint64List(int length)
Uint64List.fromList(List<int> elements)
Uint64List.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of 64-bit unsigned integers that is viewable as a TypedData. For long lists, this implementation can be considerably more space- and time-efficient than the default List implementation.

Static Fields

static const int BYTES_PER_ELEMENT = 8

Constructors

factory Uint64List(int length)

Creates a Uint64List of the specified length (in elements), all of whose elements are initially zero.

factory Uint64List.fromList(List<int> elements)

Creates a Uint64List with the same size as the elements list and copies over the elements.

factory Uint64List.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates an Uint64List _view_ of the specified region in the specified byte buffer. Changes in the Uint64List will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.

Throws ArgumentError if offsetInBytes is not a multiple of BYTES_PER_ELEMENT.


Abstract class Uint8ClampedList implements List<int>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Uint8ClampedList(int length)
Uint8ClampedList.fromList(List<int> elements)
Uint8ClampedList.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of 8-bit unsigned integers. For long lists, this implementation can be considerably more space- and time-efficient than the default List implementation. Indexed store clamps the value to range 0..0xFF.

Static Fields

static const int BYTES_PER_ELEMENT = 1

Constructors

factory Uint8ClampedList(int length)

Creates a Uint8ClampedList of the specified length (in elements), all of whose elements are initially zero.

factory Uint8ClampedList.fromList(List<int> elements)

Creates a Uint8ClampedList of the same size as the elements list and copies over the values clamping when needed.

factory Uint8ClampedList.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates a Uint8ClampedList _view_ of the specified region in the specified byte buffer. Changes in the Uint8List will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.


Abstract class Uint8List implements List<int>, TypedData

Static Fields
BYTES_PER_ELEMENT: int
Constructors
Uint8List(int length)
Uint8List.fromList(List<int> elements)
Uint8List.view(ByteBuffer buffer, int offsetInBytes, int length)

A fixed-length list of 8-bit unsigned integers. For long lists, this implementation can be considerably more space- and time-efficient than the default List implementation.

Static Fields

static const int BYTES_PER_ELEMENT = 1

Constructors

factory Uint8List(int length)

Creates a Uint8List of the specified length (in elements), all of whose elements are initially zero.

factory Uint8List.fromList(List<int> elements)

Creates a Uint8List with the same size as the elements list and copies over the elements.

factory Uint8List.view(ByteBuffer buffer, int offsetInBytes, int length)

Creates a Uint8List _view_ of the specified region in the specified byte buffer. Changes in the Uint8List will be visible in the byte buffer and vice versa. If the offsetInBytes index of the region is not specified, it defaults to zero (the first byte in the byte buffer). If the length is not specified, it defaults to null, which indicates that the view extends to the end of the byte buffer.

Throws RangeError if offsetInBytes or length are negative, or if offsetInBytes + (length * elementSizeInBytes) is greater than the length of buffer.