Exemple #1
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static int4 select(int4 a, int4 b, bool c)
 {
     return(c ? b : a);
 }
Exemple #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);
 }
Exemple #3
0
 public int4x2(uint4x2 v)
 {
     this.c0 = (int4)v.c0;
     this.c1 = (int4)v.c1;
 }
Exemple #4
0
 public int4x2(double4x2 v)
 {
     this.c0 = (int4)v.c0;
     this.c1 = (int4)v.c1;
 }
Exemple #5
0
 public int4x2(int v)
 {
     this.c0 = v;
     this.c1 = v;
 }
Exemple #6
0
 public static int cmax(int4 a)
 {
     return(max(max(max(a.x, a.y), a.z), a.w));
 }
Exemple #7
0
 public int4x2(float v)
 {
     this.c0 = (int4)v;
     this.c1 = (int4)v;
 }
Exemple #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);
 }
Exemple #9
0
 public uint4(int4 val)
 {
     x = (uint)val.x; y = (uint)val.y; z = (uint)val.z; w = (uint)val.w;
 }
Exemple #10
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static int4 abs(int4 a)
 {
     return(max(-a, a));
 }
Exemple #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)));
 }
Exemple #12
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static int4 clamp(int4 x, int4 a, int4 b)
 {
     return(max(a, min(b, x)));
 }
Exemple #13
0
 [MethodImpl((MethodImplOptions)0x100)] // agressive inline
 public static int4 mad(int4 a, int4 b, int4 c)
 {
     return(a * b + c);
 }
Exemple #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));
 }
Exemple #15
0
 public int4x3(float4x3 v)
 {
     this.c0 = (int4)v.c0;
     this.c1 = (int4)v.c1;
     this.c2 = (int4)v.c2;
 }
Exemple #16
0
 public static uint4 uint4(int4 val)
 {
     return(new uint4(val));
 }
Exemple #17
0
 public static int cmin(int4 a)
 {
     return(min(min(min(a.x, a.y), a.z), a.w));
 }
Exemple #18
0
 public int4x3(double4x3 v)
 {
     this.c0 = (int4)v.c0;
     this.c1 = (int4)v.c1;
     this.c2 = (int4)v.c2;
 }
Exemple #19
0
 public static int csum(int4 a)
 {
     return(a.x + a.y + a.z + a.w);
 }
Exemple #20
0
 public int4x3(int4 c0, int4 c1, int4 c2)
 {
     this.c0 = c0;
     this.c1 = c1;
     this.c2 = c2;
 }
Exemple #21
0
 public int4x2(double v)
 {
     this.c0 = (int4)v;
     this.c1 = (int4)v;
 }
Exemple #22
0
 public int4x3(int v)
 {
     this.c0 = v;
     this.c1 = v;
     this.c2 = v;
 }
Exemple #23
0
 public int4x2(int4 c0, int4 c1)
 {
     this.c0 = c0;
     this.c1 = c1;
 }
Exemple #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);
 }
Exemple #25
0
 public static int4x2 int4x2(int4 c0, int4 c1)
 {
     return(new int4x2(c0, c1));
 }
Exemple #26
0
 public static int4x3 int4x3(int4 c0, int4 c1, int4 c2)
 {
     return(new int4x3(c0, c1, c2));
 }
Exemple #27
0
 public int4x2(uint v)
 {
     this.c0 = (int4)v;
     this.c1 = (int4)v;
 }
Exemple #28
0
 public int4x3(uint v)
 {
     this.c0 = (int4)v;
     this.c1 = (int4)v;
     this.c2 = (int4)v;
 }
Exemple #29
0
 public static int4x4 int4x4(int4 c0, int4 c1, int4 c2, int4 c3)
 {
     return(new int4x4(c0, c1, c2, c3));
 }
Exemple #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);
 }