Lines Matching defs:I32
501 struct I32 {
630 void assert_true(I32 cond, I32 debug);
631 void assert_true(I32 cond, F32 debug) { assert_true(cond, pun_to_I32(debug)); }
632 void assert_true(I32 cond) { assert_true(cond, cond); }
635 void trace_line(I32 mask, int line);
636 void trace_var(I32 mask, int slot, I32 val);
637 void trace_var(I32 mask, int slot, F32 val);
638 void trace_var(I32 mask, int slot, bool b);
639 void trace_call_enter(I32 mask, int line);
640 void trace_call_exit(I32 mask, int line);
643 void store8 (Ptr ptr, I32 val);
644 void store16 (Ptr ptr, I32 val);
645 void store32 (Ptr ptr, I32 val);
647 void store64 (Ptr ptr, I32 lo, I32 hi); // *ptr = lo|(hi<<32)
648 void store128(Ptr ptr, I32 x, I32 y, I32 z, I32 w); // *ptr = x|(y<<32)|(z<<64)|(w<<96)
651 I32 index();
654 I32 load8 (Ptr ptr);
655 I32 load16 (Ptr ptr);
656 I32 load32 (Ptr ptr);
658 I32 load64 (Ptr ptr, int lane); // Load 32-bit lane 0-1 of 64-bit value.
659 I32 load128(Ptr ptr, int lane); // Load 32-bit lane 0-3 of 128-bit value.
662 I32 uniform32(UPtr ptr, int offset);
667 I32 array32 (UPtr ptr, int offset, int index);
676 I32 gather8 (UPtr ptr, int offset, I32 index);
677 I32 gather16(UPtr ptr, int offset, I32 index);
678 I32 gather32(UPtr ptr, int offset, I32 index);
679 F32 gatherF (UPtr ptr, int offset, I32 index) {
684 I32 uniform32(Uniform u) { return this->uniform32(u.ptr, u.offset); }
686 I32 gather8 (Uniform u, I32 index) { return this->gather8 (u.ptr, u.offset, index); }
687 I32 gather16 (Uniform u, I32 index) { return this->gather16 (u.ptr, u.offset, index); }
688 I32 gather32 (Uniform u, I32 index) { return this->gather32 (u.ptr, u.offset, index); }
689 F32 gatherF (Uniform u, I32 index) { return this->gatherF (u.ptr, u.offset, index); }
693 I32 array32 (Uniform a, int index) { return this->array32 (a.ptr, a.offset, index); }
697 I32 splat(int n);
698 I32 splat(unsigned u) { return splat((int)u); }
798 I32 is_NaN (F32 x) { return neq(x,x); }
799 I32 is_finite(F32 x) { return lt(bit_and(pun_to_I32(x), 0x7f80'0000), 0x7f80'0000); }
801 I32 trunc(F32 x);
802 I32 round(F32 x); // Round to int using current rounding mode (as if lrintf()).
803 I32 pun_to_I32(F32 x) { return {x.builder, x.id}; }
805 I32 to_fp16(F32 x);
806 F32 from_fp16(I32 x);
808 I32 eq(F32, F32);
809 I32 eq(F32 x, float y) { return eq(x, splat(y)); }
810 I32 eq(float x, F32 y) { return eq(splat(x), y); }
812 I32 neq(F32, F32);
813 I32 neq(F32 x, float y) { return neq(x, splat(y)); }
814 I32 neq(float x, F32 y) { return neq(splat(x), y); }
816 I32 lt(F32, F32);
817 I32 lt(F32 x, float y) { return lt(x, splat(y)); }
818 I32 lt(float x, F32 y) { return lt(splat(x), y); }
820 I32 lte(F32, F32);
821 I32 lte(F32 x, float y) { return lte(x, splat(y)); }
822 I32 lte(float x, F32 y) { return lte(splat(x), y); }
824 I32 gt(F32, F32);
825 I32 gt(F32 x, float y) { return gt(x, splat(y)); }
826 I32 gt(float x, F32 y) { return gt(splat(x), y); }
828 I32 gte(F32, F32);
829 I32 gte(F32 x, float y) { return gte(x, splat(y)); }
830 I32 gte(float x, F32 y) { return gte(splat(x), y); }
833 I32 add(I32, I32);
834 I32 add(I32 x, int y) { return add(x, splat(y)); }
835 I32 add(int x, I32 y) { return add(splat(x), y); }
837 I32 sub(I32, I32);
838 I32 sub(I32 x, int y) { return sub(x, splat(y)); }
839 I32 sub(int x, I32 y) { return sub(splat(x), y); }
841 I32 mul(I32, I32);
842 I32 mul(I32 x, int y) { return mul(x, splat(y)); }
843 I32 mul(int x, I32 y) { return mul(splat(x), y); }
845 I32 shl(I32 x, int bits);
846 I32 shr(I32 x, int bits);
847 I32 sra(I32 x, int bits);
849 I32 eq(I32, I32);
850 I32 eq(I32 x, int y) { return eq(x, splat(y)); }
851 I32 eq(int x, I32 y) { return eq(splat(x), y); }
853 I32 neq(I32, I32);
854 I32 neq(I32 x, int y) { return neq(x, splat(y)); }
855 I32 neq(int x, I32 y) { return neq(splat(x), y); }
857 I32 lt(I32, I32);
858 I32 lt(I32 x, int y) { return lt(x, splat(y)); }
859 I32 lt(int x, I32 y) { return lt(splat(x), y); }
861 I32 lte(I32, I32);
862 I32 lte(I32 x, int y) { return lte(x, splat(y)); }
863 I32 lte(int x, I32 y) { return lte(splat(x), y); }
865 I32 gt(I32, I32);
866 I32 gt(I32 x, int y) { return gt(x, splat(y)); }
867 I32 gt(int x, I32 y) { return gt(splat(x), y); }
869 I32 gte(I32, I32);
870 I32 gte(I32 x, int y) { return gte(x, splat(y)); }
871 I32 gte(int x, I32 y) { return gte(splat(x), y); }
873 F32 to_F32(I32 x);
874 F32 pun_to_F32(I32 x) { return {x.builder, x.id}; }
877 I32 bit_and(I32, I32);
878 I32 bit_and(I32 x, int y) { return bit_and(x, splat(y)); }
879 I32 bit_and(int x, I32 y) { return bit_and(splat(x), y); }
881 I32 bit_or(I32, I32);
882 I32 bit_or(I32 x, int y) { return bit_or(x, splat(y)); }
883 I32 bit_or(int x, I32 y) { return bit_or(splat(x), y); }
885 I32 bit_xor(I32, I32);
886 I32 bit_xor(I32 x, int y) { return bit_xor(x, splat(y)); }
887 I32 bit_xor(int x, I32 y) { return bit_xor(splat(x), y); }
889 I32 bit_clear(I32, I32);
890 I32 bit_clear(I32 x, int y) { return bit_clear(x, splat(y)); }
891 I32 bit_clear(int x, I32 y) { return bit_clear(splat(x), y); }
893 I32 min(I32 x, I32 y) { return select(lte(x,y), x, y); }
894 I32 min(I32 x, int y) { return min(x, splat(y)); }
895 I32 min(int x, I32 y) { return min(splat(x), y); }
897 I32 max(I32 x, I32 y) { return select(gte(x,y), x, y); }
898 I32 max(I32 x, int y) { return max(x, splat(y)); }
899 I32 max(int x, I32 y) { return max(splat(x), y); }
901 I32 select(I32 cond, I32 t, I32 f); // cond ? t : f
902 I32 select(I32 cond, int t, I32 f) { return select(cond, splat(t), f ); }
903 I32 select(I32 cond, I32 t, int f) { return select(cond, t , splat(f)); }
904 I32 select(I32 cond, int t, int f) { return select(cond, splat(t), splat(f)); }
906 F32 select(I32 cond, F32 t, F32 f) {
910 F32 select(I32 cond, float t, F32 f) { return select(cond, splat(t), f ); }
911 F32 select(I32 cond, F32 t, float f) { return select(cond, t , splat(f)); }
912 F32 select(I32 cond, float t, float f) { return select(cond, splat(t), splat(f)); }
914 I32 extract(I32 x, int bits, I32 z); // (x>>bits) & z
915 I32 extract(I32 x, int bits, int z) { return extract(x, bits, splat(z)); }
916 I32 extract(int x, int bits, I32 z) { return extract(splat(x), bits, z); }
918 I32 pack(I32 x, I32 y, int bits); // x | (y<<bits)
919 I32 pack(I32 x, int y, int bits) { return pack(x, splat(y), bits); }
920 I32 pack(int x, I32 y, int bits) { return pack(splat(x), y, bits); }
924 F32 from_unorm(int bits, I32); // E.g. from_unorm(8, x) -> x * (1/255.0f)
925 I32 to_unorm(int bits, F32); // E.g. to_unorm(8, x) -> round(x * 255)
929 Color gather(PixelFormat, UPtr ptr, int offset, I32 index);
930 Color gather(PixelFormat f, Uniform u, I32 index) {
1072 SI I32 operator+(I32 x, I32 y) { return x->add(x,y); }
1073 SI I32 operator+(I32 x, int y) { return x->add(x,y); }
1074 SI I32 operator+(int x, I32 y) { return y->add(x,y); }
1076 SI I32 operator-(I32 x, I32 y) { return x->sub(x,y); }
1077 SI I32 operator-(I32 x, int y) { return x->sub(x,y); }
1078 SI I32 operator-(int x, I32 y) { return y->sub(x,y); }
1080 SI I32 operator*(I32 x, I32 y) { return x->mul(x,y); }
1081 SI I32 operator*(I32 x, int y) { return x->mul(x,y); }
1082 SI I32 operator*(int x, I32 y) { return y->mul(x,y); }
1084 SI I32 min(I32 x, I32 y) { return x->min(x,y); }
1085 SI I32 min(I32 x, int y) { return x->min(x,y); }
1086 SI I32 min(int x, I32 y) { return y->min(x,y); }
1088 SI I32 max(I32 x, I32 y) { return x->max(x,y); }
1089 SI I32 max(I32 x, int y) { return x->max(x,y); }
1090 SI I32 max(int x, I32 y) { return y->max(x,y); }
1092 SI I32 operator==(I32 x, I32 y) { return x->eq(x,y); }
1093 SI I32 operator==(I32 x, int y) { return x->eq(x,y); }
1094 SI I32 operator==(int x, I32 y) { return y->eq(x,y); }
1096 SI I32 operator!=(I32 x, I32 y) { return x->neq(x,y); }
1097 SI I32 operator!=(I32 x, int y) { return x->neq(x,y); }
1098 SI I32 operator!=(int x, I32 y) { return y->neq(x,y); }
1100 SI I32 operator< (I32 x, I32 y) { return x->lt(x,y); }
1101 SI I32 operator< (I32 x, int y) { return x->lt(x,y); }
1102 SI I32 operator< (int x, I32 y) { return y->lt(x,y); }
1104 SI I32 operator<=(I32 x, I32 y) { return x->lte(x,y); }
1105 SI I32 operator<=(I32 x, int y) { return x->lte(x,y); }
1106 SI I32 operator<=(int x, I32 y) { return y->lte(x,y); }
1108 SI I32 operator> (I32 x, I32 y) { return x->gt(x,y); }
1109 SI I32 operator> (I32 x, int y) { return x->gt(x,y); }
1110 SI I32 operator> (int x, I32 y) { return y->gt(x,y); }
1112 SI I32 operator>=(I32 x, I32 y) { return x->gte(x,y); }
1113 SI I32 operator>=(I32 x, int y) { return x->gte(x,y); }
1114 SI I32 operator>=(int x, I32 y) { return y->gte(x,y); }
1144 SI I32 operator==(F32 x, F32 y) { return x->eq(x,y); }
1145 SI I32 operator==(F32 x, float y) { return x->eq(x,y); }
1146 SI I32 operator==(float x, F32 y) { return y->eq(x,y); }
1148 SI I32 operator!=(F32 x, F32 y) { return x->neq(x,y); }
1149 SI I32 operator!=(F32 x, float y) { return x->neq(x,y); }
1150 SI I32 operator!=(float x, F32 y) { return y->neq(x,y); }
1152 SI I32 operator< (F32 x, F32 y) { return x->lt(x,y); }
1153 SI I32 operator< (F32 x, float y) { return x->lt(x,y); }
1154 SI I32 operator< (float x, F32 y) { return y->lt(x,y); }
1156 SI I32 operator<=(F32 x, F32 y) { return x->lte(x,y); }
1157 SI I32 operator<=(F32 x, float y) { return x->lte(x,y); }
1158 SI I32 operator<=(float x, F32 y) { return y->lte(x,y); }
1160 SI I32 operator> (F32 x, F32 y) { return x->gt(x,y); }
1161 SI I32 operator> (F32 x, float y) { return x->gt(x,y); }
1162 SI I32 operator> (float x, F32 y) { return y->gt(x,y); }
1164 SI I32 operator>=(F32 x, F32 y) { return x->gte(x,y); }
1165 SI I32 operator>=(F32 x, float y) { return x->gte(x,y); }
1166 SI I32 operator>=(float x, F32 y) { return y->gte(x,y); }
1168 SI I32& operator+=(I32& x, I32 y) { return (x = x + y); }
1169 SI I32& operator+=(I32& x, int y) { return (x = x + y); }
1171 SI I32& operator-=(I32& x, I32 y) { return (x = x - y); }
1172 SI I32& operator-=(I32& x, int y) { return (x = x - y); }
1174 SI I32& operator*=(I32& x, I32 y) { return (x = x * y); }
1175 SI I32& operator*=(I32& x, int y) { return (x = x * y); }
1188 SI void assert_true(I32 cond, I32 debug) { cond->assert_true(cond,debug); }
1189 SI void assert_true(I32 cond, F32 debug) { cond->assert_true(cond,debug); }
1190 SI void assert_true(I32 cond) { cond->assert_true(cond); }
1192 SI void store8 (Ptr ptr, I32 val) { val->store8 (ptr, val); }
1193 SI void store16 (Ptr ptr, I32 val) { val->store16 (ptr, val); }
1194 SI void store32 (Ptr ptr, I32 val) { val->store32 (ptr, val); }
1196 SI void store64 (Ptr ptr, I32 lo, I32 hi) { lo ->store64 (ptr, lo,hi); }
1197 SI void store128(Ptr ptr, I32 x, I32 y, I32 z, I32 w) { x ->store128(ptr, x,y,z,w); }
1199 SI I32 gather8 (UPtr ptr, int off, I32 ix) { return ix->gather8 (ptr, off, ix); }
1200 SI I32 gather16(UPtr ptr, int off, I32 ix) { return ix->gather16(ptr, off, ix); }
1201 SI I32 gather32(UPtr ptr, int off, I32 ix) { return ix->gather32(ptr, off, ix); }
1202 SI F32 gatherF (UPtr ptr, int off, I32 ix) { return ix->gatherF (ptr, off, ix); }
1204 SI I32 gather8 (Uniform u, I32 ix) { return ix->gather8 (u, ix); }
1205 SI I32 gather16(Uniform u, I32 ix) { return ix->gather16(u, ix); }
1206 SI I32 gather32(Uniform u, I32 ix) { return ix->gather32(u, ix); }
1207 SI F32 gatherF (Uniform u, I32 ix) { return ix->gatherF (u, ix); }
1233 SI I32 is_NaN(F32 x) { return x-> is_NaN(x); }
1234 SI I32 is_finite(F32 x) { return x->is_finite(x); }
1236 SI I32 trunc(F32 x) { return x-> trunc(x); }
1237 SI I32 round(F32 x) { return x-> round(x); }
1238 SI I32 pun_to_I32(F32 x) { return x-> pun_to_I32(x); }
1239 SI F32 pun_to_F32(I32 x) { return x-> pun_to_F32(x); }
1240 SI F32 to_F32(I32 x) { return x-> to_F32(x); }
1241 SI I32 to_fp16(F32 x) { return x-> to_fp16(x); }
1242 SI F32 from_fp16(I32 x) { return x-> from_fp16(x); }
1260 SI I32 operator<<(I32 x, int bits) { return x->shl(x, bits); }
1261 SI I32 shl(I32 x, int bits) { return x->shl(x, bits); }
1262 SI I32 shr(I32 x, int bits) { return x->shr(x, bits); }
1263 SI I32 sra(I32 x, int bits) { return x->sra(x, bits); }
1265 SI I32 operator&(I32 x, I32 y) { return x->bit_and(x,y); }
1266 SI I32 operator&(I32 x, int y) { return x->bit_and(x,y); }
1267 SI I32 operator&(int x, I32 y) { return y->bit_and(x,y); }
1269 SI I32 operator|(I32 x, I32 y) { return x->bit_or (x,y); }
1270 SI I32 operator|(I32 x, int y) { return x->bit_or (x,y); }
1271 SI I32 operator|(int x, I32 y) { return y->bit_or (x,y); }
1273 SI I32 operator^(I32 x, I32 y) { return x->bit_xor(x,y); }
1274 SI I32 operator^(I32 x, int y) { return x->bit_xor(x,y); }
1275 SI I32 operator^(int x, I32 y) { return y->bit_xor(x,y); }
1277 SI I32& operator&=(I32& x, I32 y) { return (x = x & y); }
1278 SI I32& operator&=(I32& x, int y) { return (x = x & y); }
1279 SI I32& operator|=(I32& x, I32 y) { return (x = x | y); }
1280 SI I32& operator|=(I32& x, int y) { return (x = x | y); }
1281 SI I32& operator^=(I32& x, I32 y) { return (x = x ^ y); }
1282 SI I32& operator^=(I32& x, int y) { return (x = x ^ y); }
1284 SI I32 bit_clear(I32 x, I32 y) { return x->bit_clear(x,y); }
1285 SI I32 bit_clear(I32 x, int y) { return x->bit_clear(x,y); }
1286 SI I32 bit_clear(int x, I32 y) { return y->bit_clear(x,y); }
1288 SI I32 select(I32 c, I32 t, I32 f) { return c->select(c, t , f ); }
1289 SI I32 select(I32 c, I32 t, int f) { return c->select(c, t , c->splat(f)); }
1290 SI I32 select(I32 c, int t, I32 f) { return c->select(c, c->splat(t), f ); }
1291 SI I32 select(I32 c, int t, int f) { return c->select(c, c->splat(t), c->splat(f)); }
1293 SI F32 select(I32 c, F32 t, F32 f) { return c->select(c, t , f ); }
1294 SI F32 select(I32 c, F32 t, float f) { return c->select(c, t , c->splat(f)); }
1295 SI F32 select(I32 c, float t, F32 f) { return c->select(c, c->splat(t), f ); }
1296 SI F32 select(I32 c, float t, float f) { return c->select(c, c->splat(t), c->splat(f)); }
1298 SI I32 extract(I32 x, int bits, I32 z) { return x->extract(x,bits,z); }
1299 SI I32 extract(I32 x, int bits, int z) { return x->extract(x,bits,z); }
1300 SI I32 extract(int x, int bits, I32 z) { return z->extract(x,bits,z); }
1302 SI I32 pack(I32 x, I32 y, int bits) { return x->pack (x,y,bits); }
1303 SI I32 pack(I32 x, int y, int bits) { return x->pack (x,y,bits); }
1304 SI I32 pack(int x, I32 y, int bits) { return y->pack (x,y,bits); }
1306 SI I32 operator~(I32 x) { return ~0 ^ x; }
1307 SI I32 operator-(I32 x) { return 0 - x; }
1310 SI F32 from_unorm(int bits, I32 x) { return x->from_unorm(bits,x); }
1311 SI I32 to_unorm(int bits, F32 x) { return x-> to_unorm(bits,x); }
1315 SI Color gather(PixelFormat f, UPtr p, int off, I32 ix) { return ix->gather(f,p,off,ix); }
1316 SI Color gather(PixelFormat f, Uniform u , I32 ix) { return ix->gather(f,u,ix); }