Lattice land propagators completion library
Loading...
Searching...
No Matches
pc2.hpp
Go to the documentation of this file.
1struct PC2 {
2
3 // X = Y <op> Z
4
5 struct Constraint {
6 Sig op;
7 AVar x;
8 AVar y;
9 AVar z;
10 }
11 vector<Constraint> constraints;
12
13 vector<Sig> ops;
14 vector<AVar> xs;
15 vector<AVar> ys;
16 vector<AVar> zs;
17
18 vector<Interval> domains; // domains[x] = [0..10]
19
20
21 int i = threadIdx.x;
22 U& r1 = domains[xs[i]];
23 U& r2 = domains[ys[i]];
24 U& r3 = domains[zs[i]];
25 switch(ops[i]) {
26 case ADD: r3.embed(r1 + r2); r2.embed(r1 - r3); .. ...;
27 case SUB: r3.embed(r1 - r2); ...;
28 }
29
31 vector<AVar> xs;
32 vector<AVar> ys;
33 vector<AVar> zs;
34 };
35
36 vector<BinConstraint> eq_mul_constraints;
37 vector<BinConstraint> eq_add_constraints;
38 vector<BinConstraint> eq_sub_constraints;
39
40
41};
Definition pc2.hpp:30
vector< AVar > xs
Definition pc2.hpp:31
vector< AVar > zs
Definition pc2.hpp:33
vector< AVar > ys
Definition pc2.hpp:32
Definition pc2.hpp:5
Sig op
Definition pc2.hpp:6
AVar x
Definition pc2.hpp:7
AVar z
Definition pc2.hpp:9
AVar y
Definition pc2.hpp:8
Definition pc2.hpp:1
vector< AVar > zs
Definition pc2.hpp:16
vector< BinConstraint > eq_add_constraints
Definition pc2.hpp:37
vector< Sig > ops
Definition pc2.hpp:13
U & r2
Definition pc2.hpp:23
vector< AVar > xs
Definition pc2.hpp:14
vector< BinConstraint > eq_sub_constraints
Definition pc2.hpp:38
int i
Definition pc2.hpp:21
U & r1
Definition pc2.hpp:22
vector< AVar > ys
Definition pc2.hpp:15
U & r3
Definition pc2.hpp:24
vector< Interval > domains
Definition pc2.hpp:18
struct PC2::Constraint constraints
vector< BinConstraint > eq_mul_constraints
Definition pc2.hpp:36