Esempio n. 1
0
 public static uint hash(bool2x4 v)
 {
     return(csum(select(uint2(0x4599C793u, 0x83B5E729u), uint2(0xC267163Fu, 0x67BC9149u), v.c0) +
                 select(uint2(0xAD7C5EC1u, 0x822A7D6Du), uint2(0xB492BF15u, 0xD37220E3u), v.c1) +
                 select(uint2(0x7AA2C2BDu, 0xE16BC89Du), uint2(0x7AA07CD3u, 0xAF642BA9u), v.c2) +
                 select(uint2(0xA8F2213Bu, 0x9F3FDC37u), uint2(0xAC60D0C3u, 0x9263662Fu), v.c3)));
 }
Esempio n. 2
0
 public static uint2 hash_wide(bool2x4 v)
 {
     return(select(uint2(0xE69626FFu, 0xBD010EEBu), uint2(0x9CEDE1D1u, 0x43BE0B51u), v.c0) +
            select(uint2(0xAF836EE1u, 0xB130C137u), uint2(0x54834775u, 0x7C022221u), v.c1) +
            select(uint2(0xA2D00EDFu, 0xA8977779u), uint2(0x9F1C739Bu, 0x4B1BD187u), v.c2) +
            select(uint2(0x9DF50593u, 0xF18EEB85u), uint2(0x9E19BFC3u, 0x8196B06Fu), v.c3));
 }
Esempio n. 3
0
 public static uint2 hashwide(bool2x4 v)
 {
     return(select(uint2(0x93C30C2Bu, 0xDCAF0351u), uint2(0x6E050B01u, 0x750FDBF5u), v.c0) +
            select(uint2(0x7F3DD499u, 0x52EAAEBBu), uint2(0x4599C793u, 0x83B5E729u), v.c1) +
            select(uint2(0xC267163Fu, 0x67BC9149u), uint2(0xAD7C5EC1u, 0x822A7D6Du), v.c2) +
            select(uint2(0xB492BF15u, 0xD37220E3u), uint2(0x7AA2C2BDu, 0xE16BC89Du), v.c3));
 }
Esempio n. 4
0
 public uint2x4(bool2x4 v)
 {
     this.c0 = math.select(new uint2(0u), new uint2(1u), v.c0);
     this.c1 = math.select(new uint2(0u), new uint2(1u), v.c1);
     this.c2 = math.select(new uint2(0u), new uint2(1u), v.c2);
     this.c3 = math.select(new uint2(0u), new uint2(1u), v.c3);
 }
Esempio n. 5
0
 public int2x4(bool2x4 v)
 {
     this.c0 = math.select(new int2(0), new int2(1), v.c0);
     this.c1 = math.select(new int2(0), new int2(1), v.c1);
     this.c2 = math.select(new int2(0), new int2(1), v.c2);
     this.c3 = math.select(new int2(0), new int2(1), v.c3);
 }
Esempio n. 6
0
 public static uint hash(bool2x4 v)
 {
     return(csum(select(uint2(0x45A22087u, 0xFC104C3Bu), uint2(0x5FFF6B19u, 0x5E6CBF3Bu), v.c0) +
                 select(uint2(0xB546F2A5u, 0xBBCF63E7u), uint2(0xC53F4755u, 0x6985C229u), v.c1) +
                 select(uint2(0xE133B0B3u, 0xC3E0A3B9u), uint2(0xFE31134Fu, 0x712A34D7u), v.c2) +
                 select(uint2(0x9D77A59Bu, 0x4942CA39u), uint2(0xB40EC62Du, 0x565ED63Fu), v.c3)));
 }
Esempio n. 7
0
 public static uint hash(bool2x4 v)
 {
     return(csum(select(uint2(0xDB3DE101u, 0x7B6D1B4Bu), uint2(0x58399E77u, 0x5EAC29C9u), v.c0) +
                 select(uint2(0xFC6014F9u, 0x6BF6693Fu), uint2(0x9D1B1D9Bu, 0xF842F5C1u), v.c1) +
                 select(uint2(0xA47EC335u, 0xA477DF57u), uint2(0xC4B1493Fu, 0xBA0966D3u), v.c2) +
                 select(uint2(0xAFBEE253u, 0x5B419C01u), uint2(0x515D90F5u, 0xEC9F68F3u), v.c3)));
 }
Esempio n. 8
0
 public double2x4(bool2x4 v)
 {
     this.c0 = math.select(new double2(0.0), new double2(1.0), v.c0);
     this.c1 = math.select(new double2(0.0), new double2(1.0), v.c1);
     this.c2 = math.select(new double2(0.0), new double2(1.0), v.c2);
     this.c3 = math.select(new double2(0.0), new double2(1.0), v.c3);
 }
Esempio n. 9
0
 public float2x4(bool2x4 v)
 {
     this.c0 = math.select(new float2(0.0f), new float2(1.0f), v.c0);
     this.c1 = math.select(new float2(0.0f), new float2(1.0f), v.c1);
     this.c2 = math.select(new float2(0.0f), new float2(1.0f), v.c2);
     this.c3 = math.select(new float2(0.0f), new float2(1.0f), v.c3);
 }
Esempio n. 10
0
 public fix64p2x4(bool2x4 v)
 {
     this.c0 = math.select(new fix64p2(fix64p.zero), new fix64p2(fix64p.One), v.c0);
     this.c1 = math.select(new fix64p2(fix64p.zero), new fix64p2(fix64p.One), v.c1);
     this.c2 = math.select(new fix64p2(fix64p.zero), new fix64p2(fix64p.One), v.c2);
     this.c3 = math.select(new fix64p2(fix64p.zero), new fix64p2(fix64p.One), v.c3);
 }
Esempio n. 11
0
 public static uint2 hashwide(bool2x4 v)
 {
     return(select(uint2(0xA2D00EDFu, 0xA8977779u), uint2(0x9F1C739Bu, 0x4B1BD187u), v.c0) +
            select(uint2(0x9DF50593u, 0xF18EEB85u), uint2(0x9E19BFC3u, 0x8196B06Fu), v.c1) +
            select(uint2(0xD24EFA19u, 0x7D8048BBu), uint2(0x713BD06Fu, 0x753AD6ADu), v.c2) +
            select(uint2(0xD19764C7u, 0xB5D0BF63u), uint2(0xF9102C5Fu, 0x9881FB9Fu), v.c3));
 }
Esempio n. 12
0
 public static uint hash(bool2x4 v)
 {
     return(csum(select(uint2(0x7AA2C2BDu, 0xE16BC89Du), uint2(0x7AA07CD3u, 0xAF642BA9u), v.c0) +
                 select(uint2(0xA8F2213Bu, 0x9F3FDC37u), uint2(0xAC60D0C3u, 0x9263662Fu), v.c1) +
                 select(uint2(0xE69626FFu, 0xBD010EEBu), uint2(0x9CEDE1D1u, 0x43BE0B51u), v.c2) +
                 select(uint2(0xAF836EE1u, 0xB130C137u), uint2(0x54834775u, 0x7C022221u), v.c3)));
 }
Esempio n. 13
0
 public static bool4x2 transpose(bool2x4 v)
 {
     return(bool4x2(
                v.c0.x, v.c0.y,
                v.c1.x, v.c1.y,
                v.c2.x, v.c2.y,
                v.c3.x, v.c3.y));
 }
Esempio n. 14
0
 public static int2x4 int2x4(bool2x4 v)
 {
     return(new int2x4(v));
 }
Esempio n. 15
0
 public static double2x4 double2x4(bool2x4 v)
 {
     return(new double2x4(v));
 }
Esempio n. 16
0
 public static float2x4 float2x4(bool2x4 v)
 {
     return(new float2x4(v));
 }
Esempio n. 17
0
 public static fix64p2x4 fix64p2x4(bool2x4 v)
 {
     return(new fix64p2x4(v));
 }
Esempio n. 18
0
 public static uint2x4 uint2x4(bool2x4 v)
 {
     return(new uint2x4(v));
 }