MCPcopy Create free account
hub / github.com/Gecode/gecode / post

Method post

test/int/exec.cpp:111–129  ·  view source on GitHub ↗

Post wait on \a x

Source from the content-addressed store, hash-verified

109 }
110 /// Post wait on \a x
111 virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
112 using namespace Gecode;
113 BoolVarArgs b(x.size());
114 for (int i=b.size(); i--; )
115 b[i]=channel(home,x[i]);
116 auto f = static_cast<std::function<void(Space&)>>
117 ([](Space& home) { c(home); });
118 if (b.size() > 1) {
119 if (sf)
120 Gecode::wait(home, b, f);
121 else
122 Gecode::wait(home, b, &c);
123 } else {
124 if (sf)
125 Gecode::wait(home, b[0], f);
126 else
127 Gecode::wait(home, b[0], &c);
128 }
129 }
130 /// Continuation to be executed
131 static void c(Gecode::Space& _home) {
132 TestSpace& home = static_cast<TestSpace&>(_home);

Callers

nothing calls this directly

Calls 4

channelFunction · 0.50
cFunction · 0.50
waitFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected