Skip to content

Commit

Permalink
[DLG] Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolodares committed Dec 8, 2023
1 parent 10cda65 commit f6f6999
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lion/foundation/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ using std::size_t;
using std::max;
using std::min;


#ifdef _MSC_VER
#define windows_local_constexpr_auto static constexpr auto
#else
#define windows_local_constexpr_auto constexpr auto
#endif

#endif
5 changes: 5 additions & 0 deletions lion/foundation/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,11 @@ std::vector<ScalarType> grid_vectors2points_rowmaj(const ContainerOfGridVectorsT
// 0, 4, 6,
// 1, 4, 6 }".
//
// Note that the "rows" of points are ordered in
// column-major order w.r.t. to the grid (i.e.,
// first dimension advances first, then the second,
// etc).
//

const auto num_grid_vectors = grid_vectors.size();

Expand Down
2 changes: 1 addition & 1 deletion lion/math/polynomial.h
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ inline Polynomial<T> Polynomial<T>::derivative() const
{
coeffs[n] = std::vector<T>(_n[n],T());
for (size_t i = 0; i <= _n[n]; ++i)
for (int j = i-1 ; j >= 0; j -= 2)
for (std::ptrdiff_t j = static_cast<std::ptrdiff_t>(i) - 1 ; j >= 0; j -= 2)
coeffs[n][j] += _coeffs[n][i]*(2.0*(j+1.0)-1.0);

for (size_t i = 0; i < _n[n]; ++i)
Expand Down

0 comments on commit f6f6999

Please sign in to comment.