aligator  0.6.1
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#include <sys/types.h>
5
6namespace aligator {
7namespace gar {
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
workrange_t get_work(uint horz, uint tid, uint num_threads)
Definition work.hpp:14
Main package namespace.
unsigned int uint
Definition logger.hpp:11