#include <iomanip>#include <stdlib.h>#include <cmath>#include <stack>Go to the source code of this file.
Classes | |
| class | par< T > |
| CLASS PAR --- Simple data-parallel vectors. More... | |
Defines | |
| #define | ifp(x) |
| Macro for data parallel ifp( par<bool> expression ). | |
| #define | elsep() |
| Macro for data parallel elsep. | |
| #define | endifp |
| Macro for data parallel endifp which should be 1-to-1 for the ifp(). | |
Functions | |
| template<class T> | |
| T | par_add (T x, T y) |
| -------------- symbolic functions --------------- | |
| template<class T> | |
| T | par_sub (T x, T y) |
| template<class T> | |
| T | par_mul (T x, T y) |
| template<class T> | |
| T | par_div (T x, T y) |
| template<class T> | |
| T | par_mod (T x, T y) |
| template<class T> | |
| T | par_or (T x, T y) |
| template<class T> | |
| T | par_and (T x, T y) |
| template<class T> | |
| T | par_max (T x, T y) |
| template<class T> | |
| T | par_min (T x, T y) |
| template<class T> | |
| T | par_neg (T x) |
| template<class T> | |
| T | par_nop (T x) |
| template<class T> | |
| T | par_not (T x) |
| template<class T> | |
| T | par_pow (T x, T y) |
| template<class T> | |
| bool | par_eq (T x, T y) |
| -------------- boolean functions ----------------- | |
| template<class T> | |
| bool | par_ne (T x, T y) |
| template<class T> | |
| bool | par_lt (T x, T y) |
| template<class T> | |
| bool | par_gt (T x, T y) |
| template<class T> | |
| bool | par_le (T x, T y) |
| template<class T> | |
| bool | par_ge (T x, T y) |
Variables | |
| bool * | flag = NULL |
| -------------- Flags for immedate bool operation --------------- | |
| int | flag_N = 0 |
| bool * | flagtemp = NULL |
| -------------- Flags for ifp() endifp, top of bool stack is flagtemp --------- | |
| bool | restrict = false |
| bool | ifelseflag = true |
| stack< bool * > | rs |
| -------------- Stack of boolean flags for ifp() and endifp() ----------------- | |
| stack< bool > | ifelses |
|
|
Value: flagtemp = rs.top(); \ ifelseflag = false; \ ifelses.pop(); \ ifelses.push(false);
|
|
|
Value: flagtemp = rs.top(); \ delete [] flagtemp; \ rs.pop(); \ ifelses.pop(); \ if (!ifelses.empty()) ifelseflag = ifelses.top(); \ else ifelseflag = true; \ if (!rs.empty()) flagtemp = rs.top(); \ else { flagtemp=NULL; restrict = false; }
Definition at line 73 of file par.h. Referenced by main(). |
|
|
Value: (x); \
flagtemp = new bool[flag_N]; \
memcpy(flagtemp, flag, flag_N); \
rs.push(flagtemp); \
ifelses.push(true); \
restrict = true; \
ifelseflag = true;
Definition at line 55 of file par.h. Referenced by main(). |
|
||||||||||||||||
|
-------------- symbolic functions ---------------
Definition at line 16 of file par.h. Referenced by par< T >::operator+(), par< T >::operator++(), and par< T >::operator+=(). 00016 { return x + y; }
|
|
||||||||||||||||
|
Definition at line 22 of file par.h. Referenced by par< T >::operator &(), and par< T >::operator &=(). 00022 { return x & y; }
|
|
||||||||||||||||
|
Definition at line 19 of file par.h. Referenced by par< T >::operator/(), and par< T >::operator/=(). 00019 { return x / y; }
|
|
||||||||||||||||
|
-------------- boolean functions -----------------
Definition at line 34 of file par.h. 00034 { return x==y; }
|
|
||||||||||||||||
|
Definition at line 39 of file par.h. 00039 { return x>=y; }
|
|
||||||||||||||||
|
Definition at line 37 of file par.h. 00037 { return x>y; }
|
|
||||||||||||||||
|
Definition at line 38 of file par.h. 00038 { return x<=y; }
|
|
||||||||||||||||
|
Definition at line 36 of file par.h. 00036 { return x<y; }
|
|
||||||||||||||||
|
Definition at line 23 of file par.h. Referenced by par< T >::max_value(). 00023 { return x>=y ? x : y; }
|
|
||||||||||||||||
|
Definition at line 24 of file par.h. Referenced by par< T >::min_value(). 00024 { return x<=y ? x : y; }
|
|
||||||||||||||||
|
Definition at line 20 of file par.h. Referenced by par< T >::operator%(), and par< T >::operator%=(). 00020 { return x % y; }
|
|
||||||||||||||||
|
Definition at line 18 of file par.h. Referenced by par< T >::operator *(), and par< T >::operator *=(). 00018 { return x * y; }
|
|
||||||||||||||||
|
Definition at line 35 of file par.h. 00035 { return x!=y; }
|
|
||||||||||
|
Definition at line 25 of file par.h. Referenced by par< T >::operator-(). 00025 { return -x; }
|
|
||||||||||
|
Definition at line 26 of file par.h. 00026 { return x; }
|
|
||||||||||
|
Definition at line 27 of file par.h. Referenced by par< T >::operator!(). 00027 { return !x; }
|
|
||||||||||||||||
|
Definition at line 21 of file par.h. Referenced by par< T >::operator|(), and par< T >::operator|=(). 00021 { return x | y; }
|
|
||||||||||||||||
|
Definition at line 31 of file par.h. 00031 { return pow(x,y); }
|
|
||||||||||||||||
|
Definition at line 17 of file par.h. Referenced by par< T >::operator-(), par< T >::operator--(), and par< T >::operator-=(). 00017 { return x - y; }
|
|
|
-------------- Flags for immedate bool operation ---------------
Definition at line 42 of file par.h. Referenced by par< T >::all_on(), par< T >::dumpflags(), and par< T >::operator=(). |
|
|
Definition at line 43 of file par.h. Referenced by par< T >::all_on(). |
|
|
-------------- Flags for ifp() endifp, top of bool stack is flagtemp ---------
Definition at line 46 of file par.h. Referenced by par< T >::operator=(). |
|
|
|
|
|
|
|
|
|
|
|
-------------- Stack of boolean flags for ifp() and endifp() -----------------
|
1.3.9.1