55 #define OPH_DLL __declspec(dllexport) 57 #define OPH_DLL __attribute__((visibility("default"))) 82 v[0] = v_1; v[1] = v_2;
87 v[0] = a[0]; v[1] = a[1];
92 v[0] = a[0]; v[1] = a[1];
97 inline int& operator[] (
int i) {
return v[i]; }
98 inline const int& operator[] (
int i)
const {
return v[i]; }
99 inline int& operator() (
int i) {
return v[i % 2]; }
100 inline const int& operator() (
int i)
const {
return v[i % 2]; }
112 for (
int i = 0; i < 2; ++i) { c[i] = a[i] + b[i]; }
119 for (
int i = 0; i < 2; ++i) { c[i] = a + b[i]; }
126 for (
int i = 0; i < 2; ++i) { c[i] = a[i] + b; }
135 for (
int i = 0; i < 2; ++i) { c[i] = a[i] - b[i]; }
142 for (
int i = 0; i < 2; ++i) { c[i] = a - b[i]; }
149 for (
int i = 0; i < 2; ++i) { c[i] = a[i] - b; }
158 for (
int i = 0; i < 2; ++i) { c[i] = a[i] * b[i]; }
165 for (
int i = 0; i < 2; ++i) { c[i] = a * b[i]; }
172 for (
int i = 0; i < 2; ++i) { c[i] = a[i] * b; }
258 for (
int i = 0; i < 2; ++i) { c = c & (a[i] == b[i]); }
265 for (
int i = 0; i < 2; ++i) { c = c & (a == b[i]); }
272 for (
int i = 0; i < 2; ++i) { c = c & (a[i] == b); }
281 for (
int i = 0; i < 2; ++i) { c = c & (a[i] < b[i]); }
288 for (
int i = 0; i < 2; ++i) { c = c & (a < b[i]); }
295 for (
int i = 0; i < 2; ++i) { c = c & (a[i] < b); }
304 for (
int i = 0; i < 2; ++i) { c = c & (a[i] <= b[i]); }
311 for (
int i = 0; i < 2; ++i) { c = c & (a <= b[i]); }
318 for (
int i = 0; i < 2; ++i) { c = c & (a[i] <= b); }
327 for (
int i = 0; i < 2; ++i) { c = c & (a[i] > b[i]); }
334 for (
int i = 0; i < 2; ++i) { c = c & (a > b[i]); }
341 for (
int i = 0; i < 2; ++i) { c = c & (a[i] > b); }
351 for (
int i = 0; i < 2; ++i) { c = c & (a[i] >= b[i]); }
357 for (
int i = 0; i < 2; ++i) { c = c & (a >= b[i]); }
364 for (
int i = 0; i < 2; ++i) { c = c & (a[i] >= b); }
371 for (
int i = 0; i < 2; ++i) { c = c & (a[i] != b[i]); }
379 for (
int i = 0; i < 2; ++i) { c[i] = -a[i]; }
392 v[0] = v[1] = v[2] = 0;
397 v[0] = v[1] = v[2] = a;
400 inline ivec3(
int v_1,
int v_2,
int v_3)
402 v[0] = v_1; v[1] = v_2; v[2] = v_3;
407 v[0] = a[0]; v[1] = a[1]; v[2] = a[2];
412 v[0] = a[0]; v[1] = a[1]; v[2] = a[2];
417 inline int& operator[] (
int i) {
return v[i]; }
418 inline const int& operator[] (
int i)
const {
return v[i]; }
419 inline int& operator() (
int i) {
return v[i % 3]; }
420 inline const int& operator() (
int i)
const {
return v[i % 3]; }
427 for (
int i = 0; i < 3; ++i) { c[i] = a[i] + b[i]; }
434 for (
int i = 0; i < 3; ++i) { c[i] = a + b[i]; }
441 for (
int i = 0; i < 3; ++i) { c[i] = a[i] + b; }
450 for (
int i = 0; i < 3; ++i) { c[i] = a[i] - b[i]; }
457 for (
int i = 0; i < 3; ++i) { c[i] = a - b[i]; }
464 for (
int i = 0; i < 3; ++i) { c[i] = a[i] - b; }
473 for (
int i = 0; i < 3; ++i) { c[i] = a[i] * b[i]; }
480 for (
int i = 0; i < 3; ++i) { c[i] = a * b[i]; }
487 for (
int i = 0; i < 3; ++i) { c[i] = a[i] * b; }
573 for (
int i = 0; i < 3; ++i) { c = c & (a[i] == b[i]); }
580 for (
int i = 0; i < 3; ++i) { c = c & (a == b[i]); }
587 for (
int i = 0; i < 3; ++i) { c = c & (a[i] == b); }
596 for (
int i = 0; i < 3; ++i) { c = c & (a[i] < b[i]); }
603 for (
int i = 0; i < 3; ++i) { c = c & (a < b[i]); }
610 for (
int i = 0; i < 3; ++i) { c = c & (a[i] < b); }
619 for (
int i = 0; i < 3; ++i) { c = c & (a[i] <= b[i]); }
626 for (
int i = 0; i < 3; ++i) { c = c & (a <= b[i]); }
633 for (
int i = 0; i < 3; ++i) { c = c & (a[i] <= b); }
642 for (
int i = 0; i < 3; ++i) { c = c & (a[i] > b[i]); }
649 for (
int i = 0; i < 3; ++i) { c = c & (a > b[i]); }
656 for (
int i = 0; i < 3; ++i) { c = c & (a[i] > b); }
665 for (
int i = 0; i < 3; ++i) { c = c & (a[i] >= b[i]); }
672 for (
int i = 0; i < 3; ++i) { c = c & (a >= b[i]); }
679 for (
int i = 0; i < 3; ++i) { c = c & (a[i] >= b); }
686 for (
int i = 0; i < 3; ++i) { c = c & (a[i] != b[i]); }
694 for (
int i = 0; i < 3; ++i) { c[i] = -a[i]; }
707 v[0] = v[1] = v[2] = v[3] = 0;
712 v[0] = a; v[1] = a; v[2] = a; v[3] = a;
715 inline ivec4(
int v_1,
int v_2,
int v_3,
int v_4)
717 v[0] = v_1; v[1] = v_2; v[2] = v_3; v[3] = v_4;
722 v[0] = a[0]; v[1] = a[1]; v[2] = a[2]; v[3] = a[3];
727 v[0] = a[0]; v[1] = a[1]; v[2] = a[2]; v[3] = a[3];
732 inline int& operator[] (
int i) {
return v[i]; }
733 inline const int& operator[] (
int i)
const {
return v[i]; }
734 inline int& operator() (
int i) {
return v[i % 4]; }
735 inline const int& operator() (
int i)
const {
return v[i % 4]; }
747 for (
int i = 0; i < 4; ++i) { c[i] = a[i] + b[i]; }
754 for (
int i = 0; i < 4; ++i) { c[i] = a + b[i]; }
761 for (
int i = 0; i < 4; ++i) { c[i] = a[i] + b; }
770 for (
int i = 0; i < 4; ++i) { c[i] = a[i] - b[i]; }
777 for (
int i = 0; i < 4; ++i) { c[i] = a - b[i]; }
784 for (
int i = 0; i < 4; ++i) { c[i] = a[i] - b; }
793 for (
int i = 0; i < 4; ++i) { c[i] = a[i] * b[i]; }
800 for (
int i = 0; i < 4; ++i) { c[i] = a * b[i]; }
807 for (
int i = 0; i < 4; ++i) { c[i] = a[i] * b; }
893 for (
int i = 0; i < 4; ++i) { c = c & (a[i] == b[i]); }
900 for (
int i = 0; i < 4; ++i) { c = c & (a == b[i]); }
907 for (
int i = 0; i < 4; ++i) { c = c & (a[i] == b); }
916 for (
int i = 0; i < 4; ++i) { c = c & (a[i] < b[i]); }
923 for (
int i = 0; i < 4; ++i) { c = c & (a < b[i]); }
930 for (
int i = 0; i < 4; ++i) { c = c & (a[i] < b); }
939 for (
int i = 0; i < 4; ++i) { c = c & (a[i] <= b[i]); }
946 for (
int i = 0; i < 4; ++i) { c = c & (a <= b[i]); }
953 for (
int i = 0; i < 4; ++i) { c = c & (a[i] <= b); }
962 for (
int i = 0; i < 4; ++i) { c = c & (a[i] > b[i]); }
969 for (
int i = 0; i < 4; ++i) { c = c & (a > b[i]); }
976 for (
int i = 0; i < 4; ++i) { c = c & (a[i] > b); }
985 for (
int i = 0; i < 4; ++i) { c = c & (a[i] >= b[i]); }
992 for (
int i = 0; i < 4; ++i) { c = c & (a[i] != b[i]); }
999 for (
int i = 0; i < 4; ++i) { c = c & (a >= b[i]); }
1006 for (
int i = 0; i < 4; ++i) { c = c & (a[i] >= b); }
1016 for (
int i = 0; i < 4; ++i) { c[i] = -a[i]; }
ivec2 operator+=(ivec2 &a, const ivec2 &b)
ivec2 & operator=(const ivec2 &a)
ivec4(int v_1, int v_2, int v_3, int v_4)
ivec2 operator-(const ivec2 &a, const ivec2 &b)
ivec3(int v_1, int v_2, int v_3)
structure for 2-dimensional integer vector and its arithmetic.
int operator>=(const ivec2 &a, const ivec2 &b)
ivec3 & operator=(const ivec3 &a)
ivec2 operator+(const ivec2 &a, const ivec2 &b)
ivec2 operator*(const ivec2 &a, const ivec2 &b)
int operator<=(const ivec2 &a, const ivec2 &b)
structure for 4-dimensional integer vector and its arithmetic.
ivec2 operator-=(ivec2 &a, const ivec2 &b)
int operator>(const ivec2 &a, const ivec2 &b)
int operator!=(const ivec2 &a, const ivec2 &b)
int operator==(const ivec2 &a, const ivec2 &b)
structure for 3-dimensional integer vector and its arithmetic.
int operator<(const ivec2 &a, const ivec2 &b)
ivec4 & operator=(const ivec4 &a)
ivec2 operator*=(ivec2 &a, const ivec2 &b)