Пример #1
0
 public static fp4x3 mul(fp4x2 a, fp2x3 b)
 {
     return(fp4x3(
                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));
 }
Пример #2
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));
 }
Пример #3
0
 public static fp4x2 mul(fp4x4 a, fp4x2 b)
 {
     return(fp4x2(
                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));
 }
Пример #4
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));
 }
Пример #5
0
 public static fp4 mul(fp4x2 a, fp2 b)
 {
     return(a.c0 * b.x + a.c1 * b.y);
 }
Пример #6
0
 public static fp2 mul(fp4 a, fp4x2 b)
 {
     return(fp2(
                a.x * b.c0.x + a.y * b.c0.y + a.z * b.c0.z + a.w * b.c0.w,
                a.x * b.c1.x + a.y * b.c1.y + a.z * b.c1.z + a.w * b.c1.w));
 }
Пример #7
0
 public static uint4 hashwide(fp4x2 v)
 {
     return((fpmath.asuint(v.c0) * uint4(0x9D23B201u, 0x4B01D3E1u, 0x7461CA0Du, 0x79725379u) +
             fpmath.asuint(v.c1) * uint4(0xD6258E5Bu, 0xEE390C97u, 0x9C8A2F05u, 0x4DDC6509u)) + 0x7CF083CBu);
 }
Пример #8
0
 public static uint hash(fp4x2 v)
 {
     return(math.csum(fpmath.asuint(v.c0) * uint4(0xE121E6ADu, 0xC9CA1249u, 0x69B60C81u, 0xE0EB6C25u) +
                      fpmath.asuint(v.c1) * uint4(0xF648BEABu, 0x6BDB2B07u, 0xEF63C699u, 0x9001903Fu)) + 0xA895B9CDu);
 }
Пример #9
0
 public static fp2x4 transpose(fp4x2 v)
 {
     return(fp2x4(
                v.c0.x, v.c0.y, v.c0.z, v.c0.w,
                v.c1.x, v.c1.y, v.c1.z, v.c1.w));
 }