Ejemplo n.º 1
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static int4 select(int4 a, int4 b, bool c)
 {
     return(c ? b : a);
 }
Ejemplo n.º 2
0
 public int4x2(bool4x2 v)
 {
     this.c0 = math.select(new int4(0), new int4(1), v.c0);
     this.c1 = math.select(new int4(0), new int4(1), v.c1);
 }
Ejemplo n.º 3
0
 public int4x2(uint4x2 v)
 {
     this.c0 = (int4)v.c0;
     this.c1 = (int4)v.c1;
 }
Ejemplo n.º 4
0
 public int4x2(double4x2 v)
 {
     this.c0 = (int4)v.c0;
     this.c1 = (int4)v.c1;
 }
Ejemplo n.º 5
0
 public int4x2(int v)
 {
     this.c0 = v;
     this.c1 = v;
 }
Ejemplo n.º 6
0
 public static int cmax(int4 a)
 {
     return(max(max(max(a.x, a.y), a.z), a.w));
 }
Ejemplo n.º 7
0
 public int4x2(float v)
 {
     this.c0 = (int4)v;
     this.c1 = (int4)v;
 }
Ejemplo n.º 8
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static bool any(int4 a)
 {
     return(a.x != 0 || a.y != 0 || a.z != 0 || a.w != 0);
 }
Ejemplo n.º 9
0
 public uint4(int4 val)
 {
     x = (uint)val.x; y = (uint)val.y; z = (uint)val.z; w = (uint)val.w;
 }
Ejemplo n.º 10
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static int4 abs(int4 a)
 {
     return(max(-a, a));
 }
Ejemplo n.º 11
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static int4 min(int4 a, int4 b)
 {
     return(new int4(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z), min(a.w, b.w)));
 }
Ejemplo n.º 12
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static int4 clamp(int4 x, int4 a, int4 b)
 {
     return(max(a, min(b, x)));
 }
Ejemplo n.º 13
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static int4 mad(int4 a, int4 b, int4 c)
 {
     return(a * b + c);
 }
Ejemplo n.º 14
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static int4 select(int4 a, int4 b, bool4 c)
 {
     return(new int4(c.x ? b.x : a.x, c.y ? a.y : b.y, c.z ? b.z : a.z, c.w ? b.w : a.w));
 }
Ejemplo n.º 15
0
 public int4x3(float4x3 v)
 {
     this.c0 = (int4)v.c0;
     this.c1 = (int4)v.c1;
     this.c2 = (int4)v.c2;
 }
Ejemplo n.º 16
0
 public static uint4 uint4(int4 val)
 {
     return(new uint4(val));
 }
Ejemplo n.º 17
0
 public static int cmin(int4 a)
 {
     return(min(min(min(a.x, a.y), a.z), a.w));
 }
Ejemplo n.º 18
0
 public int4x3(double4x3 v)
 {
     this.c0 = (int4)v.c0;
     this.c1 = (int4)v.c1;
     this.c2 = (int4)v.c2;
 }
Ejemplo n.º 19
0
 public static int csum(int4 a)
 {
     return(a.x + a.y + a.z + a.w);
 }
Ejemplo n.º 20
0
 public int4x3(int4 c0, int4 c1, int4 c2)
 {
     this.c0 = c0;
     this.c1 = c1;
     this.c2 = c2;
 }
Ejemplo n.º 21
0
 public int4x2(double v)
 {
     this.c0 = (int4)v;
     this.c1 = (int4)v;
 }
Ejemplo n.º 22
0
 public int4x3(int v)
 {
     this.c0 = v;
     this.c1 = v;
     this.c2 = v;
 }
Ejemplo n.º 23
0
 public int4x2(int4 c0, int4 c1)
 {
     this.c0 = c0;
     this.c1 = c1;
 }
Ejemplo n.º 24
0
 public int4x3(bool v)
 {
     this.c0 = math.select(new int4(0), new int4(1), v);
     this.c1 = math.select(new int4(0), new int4(1), v);
     this.c2 = math.select(new int4(0), new int4(1), v);
 }
Ejemplo n.º 25
0
 public static int4x2 int4x2(int4 c0, int4 c1)
 {
     return(new int4x2(c0, c1));
 }
Ejemplo n.º 26
0
 public static int4x3 int4x3(int4 c0, int4 c1, int4 c2)
 {
     return(new int4x3(c0, c1, c2));
 }
Ejemplo n.º 27
0
 public int4x2(uint v)
 {
     this.c0 = (int4)v;
     this.c1 = (int4)v;
 }
Ejemplo n.º 28
0
 public int4x3(uint v)
 {
     this.c0 = (int4)v;
     this.c1 = (int4)v;
     this.c2 = (int4)v;
 }
Ejemplo n.º 29
0
 public static int4x4 int4x4(int4 c0, int4 c1, int4 c2, int4 c3)
 {
     return(new int4x4(c0, c1, c2, c3));
 }
Ejemplo n.º 30
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static bool all(int4 a)
 {
     return(a.x != 0 && a.y != 0 && a.z != 0 && a.w != 0);
 }