Loading [MathJax]/extensions/tex2jax.js
Thrill
0.1
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Variables
a
b
c
d
f
g
i
k
l
m
n
p
r
s
t
v
w
x
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Enumerations
+
Enumerator
c
d
h
i
m
s
t
w
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerations
+
Enumerator
a
b
c
d
f
m
n
o
p
r
s
t
v
w
+
Related Functions
o
p
s
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
w
+
Functions
b
c
d
f
g
h
j
l
m
o
p
r
s
t
u
w
Variables
Typedefs
+
Macros
_
a
b
c
d
f
h
i
l
m
o
p
s
t
u
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
div_ceil.hpp
Go to the documentation of this file.
1
/*******************************************************************************
2
* tlx/math/div_ceil.hpp
3
*
4
* Part of tlx - http://panthema.net/tlx
5
*
6
* Copyright (C) 2016-2017 Timo Bingmann <tb@panthema.net>
7
*
8
* All rights reserved. Published under the Boost Software License, Version 1.0
9
******************************************************************************/
10
11
#ifndef TLX_MATH_DIV_CEIL_HEADER
12
#define TLX_MATH_DIV_CEIL_HEADER
13
14
namespace
tlx
{
15
16
//! \addtogroup tlx_math
17
//! \{
18
19
/******************************************************************************/
20
// div_ceil() - calculate n div k with rounding up
21
22
//! calculate n div k with rounding up, for n and k positive!
23
template
<
typename
IntegralN,
typename
IntegralK>
24
static
inline
constexpr
25
auto
div_ceil
(
const
IntegralN& n,
const
IntegralK& k)->decltype(n + k) {
26
return
(n + k - 1) / k;
27
}
28
29
//! \}
30
31
}
// namespace tlx
32
33
#endif // !TLX_MATH_DIV_CEIL_HEADER
34
35
/******************************************************************************/
tlx
Definition:
exclusive_scan.hpp:17
tlx::div_ceil
static constexpr auto div_ceil(const IntegralN &n, const IntegralK &k) -> decltype(n+k)
calculate n div k with rounding up, for n and k positive!
Definition:
div_ceil.hpp:25
extlib
tlx
tlx
math
div_ceil.hpp
Generated on Mon Apr 6 2020 09:17:55 for Thrill by
1.8.13