MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / find_available

Method find_available

Processor/ThreadQueues.cpp:45–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45int ThreadQueues::find_available()
46{
47#ifdef VERBOSE_QUEUES
48 cerr << available.size() << " threads in use" << endl;
49#endif
50 if (not available.empty())
51 return 0;
52 for (size_t i = 1; i < size(); i++)
53 if (at(i)->available())
54 available.push_back(i);
55#ifdef VERBOSE_QUEUES
56 cerr << "Using " << available.size() << " threads" << endl;
57#endif
58 return available.size();
59}
60
61int ThreadQueues::get_n_per_thread(int n_items, int granularity)
62{

Callers 2

addMethod · 0.80
edabit_sacrificeMethod · 0.80

Calls 5

sizeFunction · 0.85
availableMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected