Example #1
0
 public static fp2x3 mul(fp2x2 a, fp2x3 b)
 {
     return(fp2x3(
                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));
 }
Example #2
0
 public static fp2x4 mul(fp2x2 a, fp2x4 b)
 {
     return(fp2x4(
                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));
 }
Example #3
0
 public static uint2 hashwide(fp2x2 v)
 {
     return((fpmath.asuint(v.c0) * uint2(0x6D2523B1u, 0x6E2BF6A9u) +
             fpmath.asuint(v.c1) * uint2(0xCC74B3B7u, 0x83B58237u)) + 0x833E3E29u);
 }
Example #4
0
 public static uint hash(fp2x2 v)
 {
     return(math.csum(fpmath.asuint(v.c0) * uint2(0x90A285BBu, 0x5D19E1D5u) +
                      fpmath.asuint(v.c1) * uint2(0xFAAF07DDu, 0x625C45BDu)) + 0xC9F27FCBu);
 }
Example #5
0
 public static fp2x2 transpose(fp2x2 v)
 {
     return(fp2x2(
                v.c0.x, v.c0.y,
                v.c1.x, v.c1.y));
 }
Example #6
0
 public static fp4x2 mul(fp4x2 a, fp2x2 b)
 {
     return(fp4x2(
                a.c0 * b.c0.x + a.c1 * b.c0.y,
                a.c0 * b.c1.x + a.c1 * b.c1.y));
 }
Example #7
0
 public static fp2 mul(fp2 a, fp2x2 b)
 {
     return(fp2(
                a.x * b.c0.x + a.y * b.c0.y,
                a.x * b.c1.x + a.y * b.c1.y));
 }
Example #8
0
 public static fp2 mul(fp2x2 a, fp2 b)
 {
     return(a.c0 * b.x + a.c1 * b.y);
 }