stress-exec.cc
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "examples/support.hh"
00023
00030 class StressExec : public Example {
00031 protected:
00033 IntVarArray x;
00034 public:
00036 StressExec(const Options& opt)
00037 : x(this,2,0,opt.size) {
00038
00039 rel(this, x[0], IRT_LE, x[1]);
00040 rel(this, x[1], IRT_LE, x[0]);
00041
00042 }
00043
00045 StressExec(bool share, StressExec& s) : Example(share,s) {
00046 x.update(this, share, s.x);
00047 }
00048
00050 virtual Space*
00051 copy(bool share) {
00052 return new StressExec(share,*this);
00053 }
00054
00056 virtual void
00057 print(void) {}
00058 };
00059
00063 int
00064 main(int argc, char** argv) {
00065 Options opt("StressExec");
00066 opt.iterations = 20;
00067 opt.size = 1000000;
00068 opt.parse(argc,argv);
00069 Example::run<StressExec,DFS>(opt);
00070 return 0;
00071 }
00072
00073
00074