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
5
namespace
aligator
{
6
namespace
gar {
7
using
uint
=
unsigned
int;
8
9
struct
workrange_t
{
10
uint
beg
;
11
uint
end
;
12
};
13
14
inline
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
aligator::gar::uint
unsigned int uint
Definition
work.hpp:7
aligator::gar::get_work
workrange_t get_work(uint horz, uint tid, uint num_threads)
Definition
work.hpp:14
aligator
Main package namespace.
Definition
action-model-wrap.hpp:14
aligator::gar::workrange_t
Definition
work.hpp:9
aligator::gar::workrange_t::beg
uint beg
Definition
work.hpp:10
aligator::gar::workrange_t::end
uint end
Definition
work.hpp:11
gar
include
aligator
gar
work.hpp
Generated by
1.11.0