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

Method expand

gecode/search/options.cpp:42–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 const Options Options::def;
41
42 Options
43 Options::expand(void) const {
44#ifdef GECODE_HAS_THREADS
45 double t = threads;
46 if (t <= -1.0) {
47 t = Support::Thread::npu() + t;
48 } else if (t < 0.0) {
49 t = (1.0 + t) * Support::Thread::npu();
50 } else if (t == 0.0) {
51 t = Support::Thread::npu();
52 } else if (t < 1.0) {
53 t = t * Support::Thread::npu();
54 }
55 t = floor(t+0.5);
56 if (t < 1.0)
57 t = 1.0;
58 Options o(*this);
59 o.threads = t;
60 return o;
61#else
62 return *this;
63#endif
64 }
65
66}}
67

Callers 6

PBSMethod · 0.45
buildMethod · 0.45
RBSMethod · 0.45
babengineFunction · 0.45
dfsengineFunction · 0.45
build.hppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected