Int32x4 abstract final#
Int32x4 and operations.
Int32x4 stores 4 32-bit bit-masks in "lanes". The lanes are "x", "y", "z", and "w" respectively.
Constructors#
Int32x4() factory#
Implementation
external factory Int32x4(int x, int y, int z, int w);
Int32x4.bool() factory#
Implementation
external factory Int32x4.bool(bool x, bool y, bool z, bool w);
Int32x4.fromFloat32x4Bits() factory#
Implementation
external factory Int32x4.fromFloat32x4Bits(Float32x4 x);
Properties#
flagW no setter#
Extracted w value. Returns false for 0, true for any other value.
Implementation
bool get flagW;
flagX no setter#
Extracted x value. Returns false for 0, true for any other value.
Implementation
bool get flagX;
flagY no setter#
Extracted y value. Returns false for 0, true for any other value.
Implementation
bool get flagY;
flagZ no setter#
Extracted z value. Returns false for 0, true for any other value.
Implementation
bool get flagZ;
hashCode no setter inherited#
The hash code for this object.
A hash code is a single integer which represents the state of the object that affects operator == comparisons.
All objects have hash codes. The default hash code implemented by Object represents only the identity of the object, the same way as the default operator == implementation only considers objects equal if they are identical (see identityHashCode).
If operator == is overridden to use the object state instead, the hash code must also be changed to represent that state, otherwise the object cannot be used in hash based data structures like the default Set and Map implementations.
Hash codes must be the same for objects that are equal to each other according to operator ==. The hash code of an object should only change if the object changes in a way that affects equality. There are no further requirements for the hash codes. They need not be consistent between executions of the same program and there are no distribution guarantees.
Objects that are not equal are allowed to have the same hash code. It is even technically allowed that all instances have the same hash code, but if clashes happen too often, it may reduce the efficiency of hash-based data structures like HashSet or HashMap.
If a subclass overrides hashCode, it should override the operator == operator as well to maintain consistency.
Inherited from Object.
Implementation
external int get hashCode;
runtimeType no setter inherited#
A representation of the runtime type of the object.
Inherited from Object.
Implementation
external Type get runtimeType;
signMask no setter#
Extract the top bit from each lane return them in the first 4 bits. "x" lane is bit 0. "y" lane is bit 1. "z" lane is bit 2. "w" lane is bit 3.
Implementation
int get signMask;
w no setter#
Extract 32-bit mask from w lane.
Implementation
int get w;
x no setter#
Extract 32-bit mask from x lane.
Implementation
int get x;
y no setter#
Extract 32-bit mask from y lane.
Implementation
int get y;
z no setter#
Extract 32-bit mask from z lane.
Implementation
int get z;
Methods#
noSuchMethod() inherited#
Invoked when a nonexistent method or property is accessed.
A dynamic member invocation can attempt to call a member which doesn't exist on the receiving object. Example:
dynamic object = 1;
object.add(42); // Statically allowed, run-time error
This invalid code will invoke the noSuchMethod method
of the integer 1 with an Invocation
representing the
.add(42) call and arguments (which then throws).
Classes can override noSuchMethod to provide custom behavior for such invalid dynamic invocations.
A class with a non-default noSuchMethod invocation can also omit implementations for members of its interface. Example:
class MockList<T> implements List<T> {
noSuchMethod(Invocation invocation) {
log(invocation);
super.noSuchMethod(invocation); // Will throw.
}
}
void main() {
MockList().add(42);
}
This code has no compile-time warnings or errors even though
the MockList class has no concrete implementation of
any of the List interface methods.
Calls to List methods are forwarded to noSuchMethod,
so this code will log an invocation similar to
Invocation.method(#add, [42])
and then throw.
If a value is returned from noSuchMethod,
it becomes the result of the original invocation.
If the value is not of a type that can be returned by the original
invocation, a type error occurs at the invocation.
The default behavior is to throw a NoSuchMethodError.
Inherited from Object.
Implementation
@pragma("vm:entry-point")
@pragma("wasm:entry-point")
external dynamic noSuchMethod(Invocation invocation);
select()#
Merge trueValue and falseValue based on this Int32x4
bit mask:
Select bit from trueValue when bit in this Int32x4
is on.
Select bit from falseValue when bit in this Int32x4
is off.
Implementation
Float32x4 select(Float32x4 trueValue, Float32x4 falseValue);
shuffle()#
Shuffle the lane values. mask must be one of the 256 shuffle constants.
Implementation
Int32x4 shuffle(int mask);
shuffleMix()#
Shuffle the lane values in this Int32x4
and other. The returned
Int32x4 will have XY lanes from this Int32x4
and ZW lanes from other.
Uses the same mask as shuffle.
Implementation
Int32x4 shuffleMix(Int32x4 other, int mask);
toString() inherited#
A string representation of this object.
Some classes have a default textual representation,
often paired with a static parse function (like int.parse).
These classes will provide the textual representation as
their string representation.
Other classes have no meaningful textual representation
that a program will care about.
Such classes will typically override toString to provide
useful information when inspecting the object,
mainly for debugging or logging.
Inherited from Object.
Implementation
external String toString();
withFlagW()#
Returns a new Int32x4 copied from this Int32x4 with a new w value.
Implementation
Int32x4 withFlagW(bool w);
withFlagX()#
Returns a new Int32x4 copied from this Int32x4 with a new x value.
Implementation
Int32x4 withFlagX(bool x);
withFlagY()#
Returns a new Int32x4 copied from this Int32x4 with a new y value.
Implementation
Int32x4 withFlagY(bool y);
withFlagZ()#
Returns a new Int32x4 copied from this Int32x4 with a new z value.
Implementation
Int32x4 withFlagZ(bool z);
withW()#
Returns a new Int32x4 copied from this Int32x4 with a new w value.
Implementation
Int32x4 withW(int w);
withX()#
Returns a new Int32x4 copied from this Int32x4 with a new x value.
Implementation
Int32x4 withX(int x);
withY()#
Returns a new Int32x4 copied from this Int32x4 with a new y value.
Implementation
Int32x4 withY(int y);
withZ()#
Returns a new Int32x4 copied from this Int32x4 with a new z value.
Implementation
Int32x4 withZ(int z);
Operators#
operator &()#
The bit-wise and operator.
Implementation
Int32x4 operator &(Int32x4 other);
operator +()#
Addition operator.
Implementation
Int32x4 operator +(Int32x4 other);
operator -()#
Subtraction operator.
Implementation
Int32x4 operator -(Int32x4 other);
operator ==() inherited#
The equality operator.
The default behavior for all Objects is to return true if and
only if this object and other are the same object.
Override this method to specify a different equality relation on a class. The overriding method must still be an equivalence relation. That is, it must be:
Total: It must return a boolean for all arguments. It should never throw.
Reflexive: For all objects
o,o == omust be true.-
Symmetric: For all objects
o1ando2,o1 == o2ando2 == o1must either both be true, or both be false. -
Transitive: For all objects
o1,o2, ando3, ifo1 == o2ando2 == o3are true, theno1 == o3must be true.
The method should also be consistent over time, so whether two objects are equal should only change if at least one of the objects was modified.
If a subclass overrides the equality operator, it should override the hashCode method as well to maintain consistency.
Inherited from Object.
Implementation
external bool operator ==(Object other);
operator ^()#
The bit-wise xor operator.
Implementation
Int32x4 operator ^(Int32x4 other);
operator |()#
The bit-wise or operator.
Implementation
Int32x4 operator |(Int32x4 other);
Constants#
wwww#
Implementation
static const int wwww = 0xFF;
wwwx#
Implementation
static const int wwwx = 0x3F;
wwwy#
Implementation
static const int wwwy = 0x7F;
wwwz#
Implementation
static const int wwwz = 0xBF;
wwxw#
Implementation
static const int wwxw = 0xCF;
wwxx#
Implementation
static const int wwxx = 0x0F;
wwxy#
Implementation
static const int wwxy = 0x4F;
wwxz#
Implementation
static const int wwxz = 0x8F;
wwyw#
Implementation
static const int wwyw = 0xDF;
wwyx#
Implementation
static const int wwyx = 0x1F;
wwyy#
Implementation
static const int wwyy = 0x5F;
wwyz#
Implementation
static const int wwyz = 0x9F;
wwzw#
Implementation
static const int wwzw = 0xEF;
wwzx#
Implementation
static const int wwzx = 0x2F;
wwzy#
Implementation
static const int wwzy = 0x6F;
wwzz#
Implementation
static const int wwzz = 0xAF;
wxww#
Implementation
static const int wxww = 0xF3;
wxwx#
Implementation
static const int wxwx = 0x33;
wxwy#
Implementation
static const int wxwy = 0x73;
wxwz#
Implementation
static const int wxwz = 0xB3;
wxxw#
Implementation
static const int wxxw = 0xC3;
wxxx#
Implementation
static const int wxxx = 0x03;
wxxy#
Implementation
static const int wxxy = 0x43;
wxxz#
Implementation
static const int wxxz = 0x83;
wxyw#
Implementation
static const int wxyw = 0xD3;
wxyx#
Implementation
static const int wxyx = 0x13;
wxyy#
Implementation
static const int wxyy = 0x53;
wxyz#
Implementation
static const int wxyz = 0x93;
wxzw#
Implementation
static const int wxzw = 0xE3;
wxzx#
Implementation
static const int wxzx = 0x23;
wxzy#
Implementation
static const int wxzy = 0x63;
wxzz#
Implementation
static const int wxzz = 0xA3;
wyww#
Implementation
static const int wyww = 0xF7;
wywx#
Implementation
static const int wywx = 0x37;
wywy#
Implementation
static const int wywy = 0x77;
wywz#
Implementation
static const int wywz = 0xB7;
wyxw#
Implementation
static const int wyxw = 0xC7;
wyxx#
Implementation
static const int wyxx = 0x07;
wyxy#
Implementation
static const int wyxy = 0x47;
wyxz#
Implementation
static const int wyxz = 0x87;
wyyw#
Implementation
static const int wyyw = 0xD7;
wyyx#
Implementation
static const int wyyx = 0x17;
wyyy#
Implementation
static const int wyyy = 0x57;
wyyz#
Implementation
static const int wyyz = 0x97;
wyzw#
Implementation
static const int wyzw = 0xE7;
wyzx#
Implementation
static const int wyzx = 0x27;
wyzy#
Implementation
static const int wyzy = 0x67;
wyzz#
Implementation
static const int wyzz = 0xA7;
wzww#
Implementation
static const int wzww = 0xFB;
wzwx#
Implementation
static const int wzwx = 0x3B;
wzwy#
Implementation
static const int wzwy = 0x7B;
wzwz#
Implementation
static const int wzwz = 0xBB;
wzxw#
Implementation
static const int wzxw = 0xCB;
wzxx#
Implementation
static const int wzxx = 0x0B;
wzxy#
Implementation
static const int wzxy = 0x4B;
wzxz#
Implementation
static const int wzxz = 0x8B;
wzyw#
Implementation
static const int wzyw = 0xDB;
wzyx#
Implementation
static const int wzyx = 0x1B;
wzyy#
Implementation
static const int wzyy = 0x5B;
wzyz#
Implementation
static const int wzyz = 0x9B;
wzzw#
Implementation
static const int wzzw = 0xEB;
wzzx#
Implementation
static const int wzzx = 0x2B;
wzzy#
Implementation
static const int wzzy = 0x6B;
wzzz#
Implementation
static const int wzzz = 0xAB;
xwww#
Implementation
static const int xwww = 0xFC;
xwwx#
Implementation
static const int xwwx = 0x3C;
xwwy#
Implementation
static const int xwwy = 0x7C;
xwwz#
Implementation
static const int xwwz = 0xBC;
xwxw#
Implementation
static const int xwxw = 0xCC;
xwxx#
Implementation
static const int xwxx = 0x0C;
xwxy#
Implementation
static const int xwxy = 0x4C;
xwxz#
Implementation
static const int xwxz = 0x8C;
xwyw#
Implementation
static const int xwyw = 0xDC;
xwyx#
Implementation
static const int xwyx = 0x1C;
xwyy#
Implementation
static const int xwyy = 0x5C;
xwyz#
Implementation
static const int xwyz = 0x9C;
xwzw#
Implementation
static const int xwzw = 0xEC;
xwzx#
Implementation
static const int xwzx = 0x2C;
xwzy#
Implementation
static const int xwzy = 0x6C;
xwzz#
Implementation
static const int xwzz = 0xAC;
xxww#
Implementation
static const int xxww = 0xF0;
xxwx#
Implementation
static const int xxwx = 0x30;
xxwy#
Implementation
static const int xxwy = 0x70;
xxwz#
Implementation
static const int xxwz = 0xB0;
xxxw#
Implementation
static const int xxxw = 0xC0;
xxxx#
Mask passed to shuffle or shuffleMix.
Implementation
static const int xxxx = 0x00;
xxxy#
Implementation
static const int xxxy = 0x40;
xxxz#
Implementation
static const int xxxz = 0x80;
xxyw#
Implementation
static const int xxyw = 0xD0;
xxyx#
Implementation
static const int xxyx = 0x10;
xxyy#
Implementation
static const int xxyy = 0x50;
xxyz#
Implementation
static const int xxyz = 0x90;
xxzw#
Implementation
static const int xxzw = 0xE0;
xxzx#
Implementation
static const int xxzx = 0x20;
xxzy#
Implementation
static const int xxzy = 0x60;
xxzz#
Implementation
static const int xxzz = 0xA0;
xyww#
Implementation
static const int xyww = 0xF4;
xywx#
Implementation
static const int xywx = 0x34;
xywy#
Implementation
static const int xywy = 0x74;
xywz#
Implementation
static const int xywz = 0xB4;
xyxw#
Implementation
static const int xyxw = 0xC4;
xyxx#
Implementation
static const int xyxx = 0x04;
xyxy#
Implementation
static const int xyxy = 0x44;
xyxz#
Implementation
static const int xyxz = 0x84;
xyyw#
Implementation
static const int xyyw = 0xD4;
xyyx#
Implementation
static const int xyyx = 0x14;
xyyy#
Implementation
static const int xyyy = 0x54;
xyyz#
Implementation
static const int xyyz = 0x94;
xyzw#
Implementation
static const int xyzw = 0xE4;
xyzx#
Implementation
static const int xyzx = 0x24;
xyzy#
Implementation
static const int xyzy = 0x64;
xyzz#
Implementation
static const int xyzz = 0xA4;
xzww#
Implementation
static const int xzww = 0xF8;
xzwx#
Implementation
static const int xzwx = 0x38;
xzwy#
Implementation
static const int xzwy = 0x78;
xzwz#
Implementation
static const int xzwz = 0xB8;
xzxw#
Implementation
static const int xzxw = 0xC8;
xzxx#
Implementation
static const int xzxx = 0x08;
xzxy#
Implementation
static const int xzxy = 0x48;
xzxz#
Implementation
static const int xzxz = 0x88;
xzyw#
Implementation
static const int xzyw = 0xD8;
xzyx#
Implementation
static const int xzyx = 0x18;
xzyy#
Implementation
static const int xzyy = 0x58;
xzyz#
Implementation
static const int xzyz = 0x98;
xzzw#
Implementation
static const int xzzw = 0xE8;
xzzx#
Implementation
static const int xzzx = 0x28;
xzzy#
Implementation
static const int xzzy = 0x68;
xzzz#
Implementation
static const int xzzz = 0xA8;
ywww#
Implementation
static const int ywww = 0xFD;
ywwx#
Implementation
static const int ywwx = 0x3D;
ywwy#
Implementation
static const int ywwy = 0x7D;
ywwz#
Implementation
static const int ywwz = 0xBD;
ywxw#
Implementation
static const int ywxw = 0xCD;
ywxx#
Implementation
static const int ywxx = 0x0D;
ywxy#
Implementation
static const int ywxy = 0x4D;
ywxz#
Implementation
static const int ywxz = 0x8D;
ywyw#
Implementation
static const int ywyw = 0xDD;
ywyx#
Implementation
static const int ywyx = 0x1D;
ywyy#
Implementation
static const int ywyy = 0x5D;
ywyz#
Implementation
static const int ywyz = 0x9D;
ywzw#
Implementation
static const int ywzw = 0xED;
ywzx#
Implementation
static const int ywzx = 0x2D;
ywzy#
Implementation
static const int ywzy = 0x6D;
ywzz#
Implementation
static const int ywzz = 0xAD;
yxww#
Implementation
static const int yxww = 0xF1;
yxwx#
Implementation
static const int yxwx = 0x31;
yxwy#
Implementation
static const int yxwy = 0x71;
yxwz#
Implementation
static const int yxwz = 0xB1;
yxxw#
Implementation
static const int yxxw = 0xC1;
yxxx#
Implementation
static const int yxxx = 0x01;
yxxy#
Implementation
static const int yxxy = 0x41;
yxxz#
Implementation
static const int yxxz = 0x81;
yxyw#
Implementation
static const int yxyw = 0xD1;
yxyx#
Implementation
static const int yxyx = 0x11;
yxyy#
Implementation
static const int yxyy = 0x51;
yxyz#
Implementation
static const int yxyz = 0x91;
yxzw#
Implementation
static const int yxzw = 0xE1;
yxzx#
Implementation
static const int yxzx = 0x21;
yxzy#
Implementation
static const int yxzy = 0x61;
yxzz#
Implementation
static const int yxzz = 0xA1;
yyww#
Implementation
static const int yyww = 0xF5;
yywx#
Implementation
static const int yywx = 0x35;
yywy#
Implementation
static const int yywy = 0x75;
yywz#
Implementation
static const int yywz = 0xB5;
yyxw#
Implementation
static const int yyxw = 0xC5;
yyxx#
Implementation
static const int yyxx = 0x05;
yyxy#
Implementation
static const int yyxy = 0x45;
yyxz#
Implementation
static const int yyxz = 0x85;
yyyw#
Implementation
static const int yyyw = 0xD5;
yyyx#
Implementation
static const int yyyx = 0x15;
yyyy#
Implementation
static const int yyyy = 0x55;
yyyz#
Implementation
static const int yyyz = 0x95;
yyzw#
Implementation
static const int yyzw = 0xE5;
yyzx#
Implementation
static const int yyzx = 0x25;
yyzy#
Implementation
static const int yyzy = 0x65;
yyzz#
Implementation
static const int yyzz = 0xA5;
yzww#
Implementation
static const int yzww = 0xF9;
yzwx#
Implementation
static const int yzwx = 0x39;
yzwy#
Implementation
static const int yzwy = 0x79;
yzwz#
Implementation
static const int yzwz = 0xB9;
yzxw#
Implementation
static const int yzxw = 0xC9;
yzxx#
Implementation
static const int yzxx = 0x09;
yzxy#
Implementation
static const int yzxy = 0x49;
yzxz#
Implementation
static const int yzxz = 0x89;
yzyw#
Implementation
static const int yzyw = 0xD9;
yzyx#
Implementation
static const int yzyx = 0x19;
yzyy#
Implementation
static const int yzyy = 0x59;
yzyz#
Implementation
static const int yzyz = 0x99;
yzzw#
Implementation
static const int yzzw = 0xE9;
yzzx#
Implementation
static const int yzzx = 0x29;
yzzy#
Implementation
static const int yzzy = 0x69;
yzzz#
Implementation
static const int yzzz = 0xA9;
zwww#
Implementation
static const int zwww = 0xFE;
zwwx#
Implementation
static const int zwwx = 0x3E;
zwwy#
Implementation
static const int zwwy = 0x7E;
zwwz#
Implementation
static const int zwwz = 0xBE;
zwxw#
Implementation
static const int zwxw = 0xCE;
zwxx#
Implementation
static const int zwxx = 0x0E;
zwxy#
Implementation
static const int zwxy = 0x4E;
zwxz#
Implementation
static const int zwxz = 0x8E;
zwyw#
Implementation
static const int zwyw = 0xDE;
zwyx#
Implementation
static const int zwyx = 0x1E;
zwyy#
Implementation
static const int zwyy = 0x5E;
zwyz#
Implementation
static const int zwyz = 0x9E;
zwzw#
Implementation
static const int zwzw = 0xEE;
zwzx#
Implementation
static const int zwzx = 0x2E;
zwzy#
Implementation
static const int zwzy = 0x6E;
zwzz#
Implementation
static const int zwzz = 0xAE;
zxww#
Implementation
static const int zxww = 0xF2;
zxwx#
Implementation
static const int zxwx = 0x32;
zxwy#
Implementation
static const int zxwy = 0x72;
zxwz#
Implementation
static const int zxwz = 0xB2;
zxxw#
Implementation
static const int zxxw = 0xC2;
zxxx#
Implementation
static const int zxxx = 0x02;
zxxy#
Implementation
static const int zxxy = 0x42;
zxxz#
Implementation
static const int zxxz = 0x82;
zxyw#
Implementation
static const int zxyw = 0xD2;
zxyx#
Implementation
static const int zxyx = 0x12;
zxyy#
Implementation
static const int zxyy = 0x52;
zxyz#
Implementation
static const int zxyz = 0x92;
zxzw#
Implementation
static const int zxzw = 0xE2;
zxzx#
Implementation
static const int zxzx = 0x22;
zxzy#
Implementation
static const int zxzy = 0x62;
zxzz#
Implementation
static const int zxzz = 0xA2;
zyww#
Implementation
static const int zyww = 0xF6;
zywx#
Implementation
static const int zywx = 0x36;
zywy#
Implementation
static const int zywy = 0x76;
zywz#
Implementation
static const int zywz = 0xB6;
zyxw#
Implementation
static const int zyxw = 0xC6;
zyxx#
Implementation
static const int zyxx = 0x06;
zyxy#
Implementation
static const int zyxy = 0x46;
zyxz#
Implementation
static const int zyxz = 0x86;
zyyw#
Implementation
static const int zyyw = 0xD6;
zyyx#
Implementation
static const int zyyx = 0x16;
zyyy#
Implementation
static const int zyyy = 0x56;
zyyz#
Implementation
static const int zyyz = 0x96;
zyzw#
Implementation
static const int zyzw = 0xE6;
zyzx#
Implementation
static const int zyzx = 0x26;
zyzy#
Implementation
static const int zyzy = 0x66;
zyzz#
Implementation
static const int zyzz = 0xA6;
zzww#
Implementation
static const int zzww = 0xFA;
zzwx#
Implementation
static const int zzwx = 0x3A;
zzwy#
Implementation
static const int zzwy = 0x7A;
zzwz#
Implementation
static const int zzwz = 0xBA;
zzxw#
Implementation
static const int zzxw = 0xCA;
zzxx#
Implementation
static const int zzxx = 0x0A;
zzxy#
Implementation
static const int zzxy = 0x4A;
zzxz#
Implementation
static const int zzxz = 0x8A;
zzyw#
Implementation
static const int zzyw = 0xDA;
zzyx#
Implementation
static const int zzyx = 0x1A;
zzyy#
Implementation
static const int zzyy = 0x5A;
zzyz#
Implementation
static const int zzyz = 0x9A;
zzzw#
Implementation
static const int zzzw = 0xEA;
zzzx#
Implementation
static const int zzzx = 0x2A;
zzzy#
Implementation
static const int zzzy = 0x6A;
zzzz#
Implementation
static const int zzzz = 0xAA;