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

Method next_batch

test/test.cpp:371–376  ·  view source on GitHub ↗

Get the start of the next batch and the batch size. Important, may be a number larger than available number of tests

Source from the content-addressed store, hash-verified

369 /// Get the start of the next batch and the batch size.
370 /// Important, may be a number larger than available number of tests
371 std::pair<size_t, size_t> next_batch() {
372 const size_t current_start = next_tests.load();
373 const size_t batch_size = choose_batch_size(tests.size() - current_start, running_threads);
374 const size_t next_start = next_tests.fetch_add(batch_size);
375 return std::make_pair(next_start, batch_size);
376 }
377
378 /// True iff the runners should continue running tests
379 bool continue_testing() {

Callers 1

runMethod · 0.80

Calls 2

loadMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected