MCPcopy Create free account
hub / github.com/NVIDIA/stdexec / spawn_partial_solve

Function spawn_partial_solve

examples/sudoku.cpp:353–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353void spawn_partial_solve(stdexec::parallel_scheduler sch,
354 stdexec::simple_counting_scope &scope,
355 stdexec::inplace_stop_source &stop,
356 std::unique_ptr<board_element[]> board,
357 unsigned first_potential_set)
358{
359 stdexec::spawn(stdexec::schedule(sch)
360 | stdexec::then(
361 [=, &scope, &stop, board = std::move(board)]() mutable noexcept
362 {
363 ++nTasks;
364 partial_solve(sch, scope, stop, std::move(board), first_potential_set);
365 })
366 | stdexec::upon_error([](auto) noexcept {}), // no-op, just swallow errors
367 scope.get_token());
368}
369
370std::tuple<unsigned, unsigned, unsigned, std::chrono::steady_clock::duration>
371solve(stdexec::parallel_scheduler sch, unsigned short const *init_values)

Callers 2

partial_solveFunction · 0.85
solveFunction · 0.85

Calls 4

thenFunction · 0.85
partial_solveFunction · 0.85
scheduleFunction · 0.50
get_tokenMethod · 0.45

Tested by

no test coverage detected