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

Method allocate

gecode/kernel/gpi.hpp:165–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163 }
164
165 forceinline GPI::Info*
166 GPI::allocate(unsigned int p, unsigned int gid) {
167 Info* c;
168 m.acquire();
169 if (b->free == 0) {
170 Block* n = new Block;
171 n->next = b; b = n;
172 }
173 c = &b->info[--b->free];
174 m.release();
175 c->init(p,gid);
176 return c;
177 }
178
179 forceinline GPI::Info*
180 GPI::allocate(unsigned int gid) {

Callers 2

afc_unshareMethod · 0.45
core.hppFile · 0.45

Calls 3

acquireMethod · 0.45
releaseMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected