aligator  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
work.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cassert>
4
5namespace aligator {
6namespace gar {
7using uint = unsigned int;
8
13
14inline workrange_t get_work(uint horz, uint tid, uint num_threads) {
15 uint start = tid * (horz + 1) / num_threads;
16 uint stop = (tid + 1) * (horz + 1) / num_threads;
17 assert(stop <= horz + 1);
18 return {start, stop};
19}
20
21} // namespace gar
22} // namespace aligator
unsigned int uint
Definition work.hpp:7
workrange_t get_work(uint horz, uint tid, uint num_threads)
Definition work.hpp:14
Main package namespace.