Skip to content

Commit 6ee28f2

Browse files
authored
Merge pull request #1331 from boostorg/fix_missing_headers
Fix missing headers and types
2 parents 975672b + 863c7eb commit 6ee28f2

10 files changed

+82
-72
lines changed

include/boost/math/interpolators/cubic_hermite.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define BOOST_MATH_INTERPOLATORS_CUBIC_HERMITE_HPP
99
#include <memory>
1010
#include <boost/math/interpolators/detail/cubic_hermite_detail.hpp>
11+
#include <cstdint>
1112

1213
namespace boost {
1314
namespace math {
@@ -41,7 +42,7 @@ class cubic_hermite {
4142
impl_->push_back(x, y, dydx);
4243
}
4344

44-
int64_t bytes() const
45+
std::int64_t bytes() const
4546
{
4647
return impl_->bytes() + sizeof(impl_);
4748
}
@@ -80,7 +81,7 @@ class cardinal_cubic_hermite {
8081
return os;
8182
}
8283

83-
int64_t bytes() const
84+
std::int64_t bytes() const
8485
{
8586
return impl_->bytes() + sizeof(impl_);
8687
}
@@ -121,7 +122,7 @@ class cardinal_cubic_hermite_aos {
121122
return os;
122123
}
123124

124-
int64_t bytes() const
125+
std::int64_t bytes() const
125126
{
126127
return impl_->bytes() + sizeof(impl_);
127128
}

include/boost/math/interpolators/detail/barycentric_rational_detail.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <utility> // for std::move
1313
#include <algorithm> // for std::is_sorted
1414
#include <string>
15+
#include <cstdint>
1516
#include <boost/math/special_functions/fpclassify.hpp>
1617
#include <boost/math/tools/assert.hpp>
1718

@@ -100,22 +101,22 @@ template<class Real>
100101
void barycentric_rational_imp<Real>::calculate_weights(size_t approximation_order)
101102
{
102103
using std::abs;
103-
int64_t n = m_x.size();
104+
std::int64_t n = m_x.size();
104105
m_w.resize(n, 0);
105-
for(int64_t k = 0; k < n; ++k)
106+
for(std::int64_t k = 0; k < n; ++k)
106107
{
107-
int64_t i_min = (std::max)(k - static_cast<int64_t>(approximation_order), static_cast<int64_t>(0));
108-
int64_t i_max = k;
108+
std::int64_t i_min = (std::max)(k - static_cast<std::int64_t>(approximation_order), static_cast<std::int64_t>(0));
109+
std::int64_t i_max = k;
109110
if (k >= n - (std::ptrdiff_t)approximation_order)
110111
{
111112
i_max = n - approximation_order - 1;
112113
}
113114

114-
for(int64_t i = i_min; i <= i_max; ++i)
115+
for(std::int64_t i = i_min; i <= i_max; ++i)
115116
{
116117
Real inv_product = 1;
117-
int64_t j_max = (std::min)(static_cast<int64_t>(i + approximation_order), static_cast<int64_t>(n - 1));
118-
for(int64_t j = i; j <= j_max; ++j)
118+
std::int64_t j_max = (std::min)(static_cast<std::int64_t>(i + approximation_order), static_cast<std::int64_t>(n - 1));
119+
for(std::int64_t j = i; j <= j_max; ++j)
119120
{
120121
if (j == k)
121122
{

include/boost/math/interpolators/detail/cardinal_quintic_b_spline_detail.hpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#ifndef BOOST_MATH_INTERPOLATORS_CARDINAL_QUINTIC_B_SPLINE_DETAIL_HPP
88
#define BOOST_MATH_INTERPOLATORS_CARDINAL_QUINTIC_B_SPLINE_DETAIL_HPP
99
#include <cmath>
10+
#include <cstdint>
1011
#include <vector>
1112
#include <utility>
1213
#include <boost/math/special_functions/cardinal_b_spline.hpp>
@@ -157,7 +158,7 @@ class cardinal_quintic_b_spline_detail
157158

158159
m_alpha[n+3] = rhs[n+3]/diagonal[n+3];
159160
m_alpha[n+2] = rhs[n+2] - first_superdiagonal[n+2]*m_alpha[n+3];
160-
for (int64_t i = int64_t(n+1); i >= 0; --i) {
161+
for (std::int64_t i = std::int64_t(n+1); i >= 0; --i) {
161162
m_alpha[i] = rhs[i] - first_superdiagonal[i]*m_alpha[i+1] - second_superdiagonal[i]*m_alpha[i+2];
162163
}
163164

@@ -176,10 +177,10 @@ class cardinal_quintic_b_spline_detail
176177
Real x = (t-m_t0)*m_inv_h;
177178
// Support of B_5 is [-3, 3]. So -3 < x - j + 2 < 3, so x-1 < j < x+5.
178179
// TODO: Zero pad m_alpha so that only the domain check is necessary.
179-
int64_t j_min = (std::max)(int64_t(0), int64_t(ceil(x-1)));
180-
int64_t j_max = (std::min)(int64_t(m_alpha.size() - 1), int64_t(floor(x+5)) );
180+
std::int64_t j_min = (std::max)(std::int64_t(0), std::int64_t(ceil(x-1)));
181+
std::int64_t j_max = (std::min)(std::int64_t(m_alpha.size() - 1), std::int64_t(floor(x+5)) );
181182
Real s = 0;
182-
for (int64_t j = j_min; j <= j_max; ++j) {
183+
for (std::int64_t j = j_min; j <= j_max; ++j) {
183184
// TODO: Use Cox 1972 to generate all integer translates of B5 simultaneously.
184185
s += m_alpha[j]*cardinal_b_spline<5, Real>(x - j + 2);
185186
}
@@ -196,10 +197,10 @@ class cardinal_quintic_b_spline_detail
196197
}
197198
Real x = (t-m_t0)*m_inv_h;
198199
// Support of B_5 is [-3, 3]. So -3 < x - j + 2 < 3, so x-1 < j < x+5
199-
int64_t j_min = (std::max)(int64_t(0), int64_t(ceil(x-1)));
200-
int64_t j_max = (std::min)(int64_t(m_alpha.size() - 1), int64_t(floor(x+5)) );
200+
std::int64_t j_min = (std::max)(std::int64_t(0), std::int64_t(ceil(x-1)));
201+
std::int64_t j_max = (std::min)(std::int64_t(m_alpha.size() - 1), std::int64_t(floor(x+5)) );
201202
Real s = 0;
202-
for (int64_t j = j_min; j <= j_max; ++j) {
203+
for (std::int64_t j = j_min; j <= j_max; ++j) {
203204
s += m_alpha[j]*cardinal_b_spline_prime<5, Real>(x - j + 2);
204205
}
205206
return s*m_inv_h;
@@ -216,10 +217,10 @@ class cardinal_quintic_b_spline_detail
216217
}
217218
Real x = (t-m_t0)*m_inv_h;
218219
// Support of B_5 is [-3, 3]. So -3 < x - j + 2 < 3, so x-1 < j < x+5
219-
int64_t j_min = (std::max)(int64_t(0), int64_t(ceil(x-1)));
220-
int64_t j_max = (std::min)(int64_t(m_alpha.size() - 1), int64_t(floor(x+5)) );
220+
std::int64_t j_min = (std::max)(std::int64_t(0), std::int64_t(ceil(x-1)));
221+
std::int64_t j_max = (std::min)(std::int64_t(m_alpha.size() - 1), std::int64_t(floor(x+5)) );
221222
Real s = 0;
222-
for (int64_t j = j_min; j <= j_max; ++j) {
223+
for (std::int64_t j = j_min; j <= j_max; ++j) {
223224
s += m_alpha[j]*cardinal_b_spline_double_prime<5, Real>(x - j + 2);
224225
}
225226
return s*m_inv_h*m_inv_h;

include/boost/math/interpolators/detail/cubic_hermite_detail.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <iostream>
1313
#include <sstream>
1414
#include <limits>
15+
#include <cstdint>
1516

1617
namespace boost {
1718
namespace math {
@@ -154,7 +155,7 @@ class cubic_hermite_detail {
154155
return x_.size();
155156
}
156157

157-
int64_t bytes() const
158+
std::int64_t bytes() const
158159
{
159160
return 3*x_.size()*sizeof(Real) + 3*sizeof(x_);
160161
}
@@ -278,7 +279,7 @@ class cardinal_cubic_hermite_detail {
278279
return y_.size();
279280
}
280281

281-
int64_t bytes() const
282+
std::int64_t bytes() const
282283
{
283284
return 2*y_.size()*sizeof(Real) + 2*sizeof(y_) + 2*sizeof(Real);
284285
}
@@ -413,7 +414,7 @@ class cardinal_cubic_hermite_detail_aos {
413414
return dat_.size();
414415
}
415416

416-
int64_t bytes() const
417+
std::int64_t bytes() const
417418
{
418419
return dat_.size()*dat_[0].size()*sizeof(Real) + sizeof(dat_) + 2*sizeof(Real);
419420
}

include/boost/math/interpolators/detail/quintic_hermite_detail.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <sstream>
1212
#include <limits>
1313
#include <cmath>
14+
#include <cstdint>
1415

1516
namespace boost {
1617
namespace math {
@@ -193,7 +194,7 @@ class quintic_hermite_detail {
193194
return os;
194195
}
195196

196-
int64_t bytes() const
197+
std::int64_t bytes() const
197198
{
198199
return 4*x_.size()*sizeof(x_);
199200
}
@@ -380,7 +381,7 @@ class cardinal_quintic_hermite_detail {
380381
return d2ydx2;
381382
}
382383

383-
int64_t bytes() const
384+
std::int64_t bytes() const
384385
{
385386
return 3*y_.size()*sizeof(Real) + 2*sizeof(Real);
386387
}
@@ -561,7 +562,7 @@ class cardinal_quintic_hermite_detail_aos {
561562
return d2ydx2;
562563
}
563564

564-
int64_t bytes() const
565+
std::int64_t bytes() const
565566
{
566567
return data_.size()*data_[0].size()*sizeof(Real) + 2*sizeof(Real);
567568
}

include/boost/math/interpolators/detail/septic_hermite_detail.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <sstream>
1212
#include <limits>
1313
#include <cmath>
14+
#include <cstdint>
1415

1516
namespace boost {
1617
namespace math {
@@ -189,7 +190,7 @@ class septic_hermite_detail {
189190
return os;
190191
}
191192

192-
int64_t bytes()
193+
std::int64_t bytes()
193194
{
194195
return 5*x_.size()*sizeof(Real) + 5*sizeof(x_);
195196
}
@@ -419,7 +420,7 @@ class cardinal_septic_hermite_detail {
419420
return d2ydx2;
420421
}
421422

422-
int64_t bytes() const
423+
std::int64_t bytes() const
423424
{
424425
return 4*y_.size()*sizeof(Real) + 2*sizeof(Real) + 4*sizeof(y_);
425426
}
@@ -629,7 +630,7 @@ class cardinal_septic_hermite_detail_aos {
629630
return d2ydx2;
630631
}
631632

632-
int64_t bytes() const
633+
std::int64_t bytes() const
633634
{
634635
return data_.size()*data_[0].size()*sizeof(Real) + 2*sizeof(Real) + sizeof(data_);
635636
}

include/boost/math/interpolators/detail/vector_barycentric_rational_detail.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#ifndef BOOST_MATH_INTERPOLATORS_VECTOR_BARYCENTRIC_RATIONAL_DETAIL_HPP
99
#define BOOST_MATH_INTERPOLATORS_VECTOR_BARYCENTRIC_RATIONAL_DETAIL_HPP
1010

11+
#include <cstdint>
1112
#include <cmath>
1213
#include <vector>
1314
#include <utility> // for std::move
@@ -64,22 +65,22 @@ void vector_barycentric_rational_imp<TimeContainer, SpaceContainer>::calculate_w
6465
{
6566
using Real = typename TimeContainer::value_type;
6667
using std::abs;
67-
int64_t n = t_.size();
68+
std::int64_t n = t_.size();
6869
w_.resize(n, Real(0));
69-
for(int64_t k = 0; k < n; ++k)
70+
for(std::int64_t k = 0; k < n; ++k)
7071
{
71-
int64_t i_min = (std::max)(k - static_cast<int64_t>(approximation_order), static_cast<int64_t>(0));
72-
int64_t i_max = k;
72+
std::int64_t i_min = (std::max)(k - static_cast<std::int64_t>(approximation_order), static_cast<std::int64_t>(0));
73+
std::int64_t i_max = k;
7374
if (k >= n - (std::ptrdiff_t)approximation_order)
7475
{
7576
i_max = n - approximation_order - 1;
7677
}
7778

78-
for(int64_t i = i_min; i <= i_max; ++i)
79+
for(std::int64_t i = i_min; i <= i_max; ++i)
7980
{
8081
Real inv_product = 1;
81-
int64_t j_max = (std::min)(static_cast<int64_t>(i + approximation_order), static_cast<int64_t>(n - 1));
82-
for(int64_t j = i; j <= j_max; ++j)
82+
std::int64_t j_max = (std::min)(static_cast<std::int64_t>(i + approximation_order), static_cast<std::int64_t>(n - 1));
83+
for(std::int64_t j = i; j <= j_max; ++j)
8384
{
8485
if (j == k)
8586
{

include/boost/math/interpolators/quintic_hermite.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <algorithm>
1111
#include <stdexcept>
1212
#include <memory>
13+
#include <cstdint>
1314
#include <boost/math/interpolators/detail/quintic_hermite_detail.hpp>
1415

1516
namespace boost {
@@ -50,7 +51,7 @@ class quintic_hermite {
5051
impl_->push_back(x, y, dydx, d2ydx2);
5152
}
5253

53-
int64_t bytes() const
54+
std::int64_t bytes() const
5455
{
5556
return impl_->bytes() + sizeof(impl_);
5657
}
@@ -85,7 +86,7 @@ class cardinal_quintic_hermite {
8586
return impl_->double_prime(x);
8687
}
8788

88-
int64_t bytes() const
89+
std::int64_t bytes() const
8990
{
9091
return impl_->bytes() + sizeof(impl_);
9192
}
@@ -123,7 +124,7 @@ class cardinal_quintic_hermite_aos {
123124
return impl_->double_prime(x);
124125
}
125126

126-
int64_t bytes() const
127+
std::int64_t bytes() const
127128
{
128129
return impl_->bytes() + sizeof(impl_);
129130
}

include/boost/math/interpolators/septic_hermite.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <algorithm>
1010
#include <stdexcept>
1111
#include <memory>
12+
#include <cstdint>
1213
#include <boost/math/interpolators/detail/septic_hermite_detail.hpp>
1314

1415
namespace boost {
@@ -47,7 +48,7 @@ class septic_hermite
4748
return os;
4849
}
4950

50-
int64_t bytes() const
51+
std::int64_t bytes() const
5152
{
5253
return impl_->bytes() + sizeof(impl_);
5354
}
@@ -87,7 +88,7 @@ class cardinal_septic_hermite
8788
return impl_->double_prime(x);
8889
}
8990

90-
int64_t bytes() const
91+
std::int64_t bytes() const
9192
{
9293
return impl_->bytes() + sizeof(impl_);
9394
}
@@ -126,7 +127,7 @@ class cardinal_septic_hermite_aos {
126127
return impl_->double_prime(x);
127128
}
128129

129-
int64_t bytes() const
130+
std::int64_t bytes() const
130131
{
131132
return impl_.size() + sizeof(impl_);
132133
}

0 commit comments

Comments
 (0)