Ejemplo n.º 1
0
 public static uint hash(fp2x4 v)
 {
     return(math.csum(fpmath.asuint(v.c0) * uint2(0xA1E92D39u, 0x4583C801u) +
                      fpmath.asuint(v.c1) * uint2(0x9536A0F5u, 0xAF816615u) +
                      fpmath.asuint(v.c2) * uint2(0x9AF8D62Du, 0xE3600729u) +
                      fpmath.asuint(v.c3) * uint2(0x5F17300Du, 0x670D6809u)) + 0x7AF32C49u);
 }
Ejemplo n.º 2
0
 public static uint2 hashwide(fp2x4 v)
 {
     return((fpmath.asuint(v.c0) * uint2(0xAE131389u, 0x5D1B165Bu) +
             fpmath.asuint(v.c1) * uint2(0x87096CD7u, 0x4C7F6DD1u) +
             fpmath.asuint(v.c2) * uint2(0x4822A3E9u, 0xAAC3C25Du) +
             fpmath.asuint(v.c3) * uint2(0xD21D0945u, 0x88FCAB2Du)) + 0x614DA60Du);
 }
Ejemplo n.º 3
0
 public static fp2x3 mul(fp2x4 a, fp4x3 b)
 {
     return(fp2x3(
                a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
                a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
                a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w));
 }
Ejemplo n.º 4
0
 public static fp4x2 transpose(fp2x4 v)
 {
     return(fp4x2(
                v.c0.x, v.c0.y,
                v.c1.x, v.c1.y,
                v.c2.x, v.c2.y,
                v.c3.x, v.c3.y));
 }
Ejemplo n.º 5
0
 public static fp4 mul(fp2 a, fp2x4 b)
 {
     return(fp4(
                a.x * b.c0.x + a.y * b.c0.y,
                a.x * b.c1.x + a.y * b.c1.y,
                a.x * b.c2.x + a.y * b.c2.y,
                a.x * b.c3.x + a.y * b.c3.y));
 }
Ejemplo n.º 6
0
 public static fp4x4 mul(fp4x2 a, fp2x4 b)
 {
     return(fp4x4(
                a.c0 * b.c0.x + a.c1 * b.c0.y,
                a.c0 * b.c1.x + a.c1 * b.c1.y,
                a.c0 * b.c2.x + a.c1 * b.c2.y,
                a.c0 * b.c3.x + a.c1 * b.c3.y));
 }
Ejemplo n.º 7
0
 public static fp2x4 mul(fp2x4 a, fp4x4 b)
 {
     return(fp2x4(
                a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
                a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w,
                a.c0 * b.c2.x + a.c1 * b.c2.y + a.c2 * b.c2.z + a.c3 * b.c2.w,
                a.c0 * b.c3.x + a.c1 * b.c3.y + a.c2 * b.c3.z + a.c3 * b.c3.w));
 }
Ejemplo n.º 8
0
 public static fp2x2 mul(fp2x4 a, fp4x2 b)
 {
     return(fp2x2(
                a.c0 * b.c0.x + a.c1 * b.c0.y + a.c2 * b.c0.z + a.c3 * b.c0.w,
                a.c0 * b.c1.x + a.c1 * b.c1.y + a.c2 * b.c1.z + a.c3 * b.c1.w));
 }
Ejemplo n.º 9
0
 public static fp2 mul(fp2x4 a, fp4 b)
 {
     return(a.c0 * b.x + a.c1 * b.y + a.c2 * b.z + a.c3 * b.w);
 }