Skip to content

Commit

Permalink
use prefix increment
Browse files Browse the repository at this point in the history
  • Loading branch information
tpadioleau committed Sep 8, 2024
1 parent b3f3de5 commit 97f1ea8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/ddc/kernels/fft.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ void impl(
std::array<int, sizeof...(DDimX)> n = {static_cast<int>(ddc::get<DDimX>(mesh.extents()))...};
int idist = 1;
int odist = 1;
for (std::size_t i = 0; i < sizeof...(DDimX); i++) {
for (std::size_t i = 0; i < sizeof...(DDimX); ++i) {
idist = transform_type_v<Tin, Tout> == TransformType::C2R && i == sizeof...(DDimX) - 1
? idist * (n[i] / 2 + 1)
: idist * n[i];
Expand Down
2 changes: 1 addition & 1 deletion include/ddc/kernels/splines/bsplines_non_uniform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ KOKKOS_INLINE_FUNCTION ddc::DiscreteElement<DDim> NonUniformBSplines<CDim, D>::

int r = degree();
for (int k = 1; k < int(n + 1); ++k) {
for (std::size_t i = 0; i < derivs.extent(0); i++) {
for (std::size_t i = 0; i < derivs.extent(0); ++i) {
derivs(i, k) *= r;
}
r *= degree() - k;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class GrevilleInterpolationPoints
while (greville_points[npoints] < ddc::discrete_space<BSplines>().rmin()) {
temp_knots[npoints]
= greville_points[npoints] + ddc::discrete_space<BSplines>().length();
npoints++;
++npoints;
}
// Shift the points
for (std::size_t i = 0; i < ddc::discrete_space<BSplines>().nbasis() - npoints; ++i) {
Expand Down
4 changes: 2 additions & 2 deletions include/ddc/kernels/splines/spline_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ operator()(
exec_space(),
batch_domain(),
KOKKOS_LAMBDA(typename batch_domain_type::discrete_element_type const j) {
for (std::size_t i = 0; i < nbasis_proxy; i++) {
for (std::size_t i = 0; i < nbasis_proxy; ++i) {
spline_tr(ddc::DiscreteElement<bsplines_type>(i), j)
= spline(ddc::DiscreteElement<bsplines_type>(i + offset_proxy), j);
}
Expand All @@ -902,7 +902,7 @@ operator()(
exec_space(),
batch_domain(),
KOKKOS_LAMBDA(typename batch_domain_type::discrete_element_type const j) {
for (std::size_t i = 0; i < nbasis_proxy; i++) {
for (std::size_t i = 0; i < nbasis_proxy; ++i) {
spline(ddc::DiscreteElement<bsplines_type>(i + offset_proxy), j)
= spline_tr(ddc::DiscreteElement<bsplines_type>(i), j);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ class SplinesLinearProblem2x2Blocks : public SplinesLinearProblem<ExecSpace>
"dense2coo",
Kokkos::RangePolicy(ExecSpace(), 0, 1),
KOKKOS_LAMBDA(const int) {
for (int i = 0; i < dense_matrix.extent(0); i++) {
for (int j = 0; j < dense_matrix.extent(1); j++) {
for (int i = 0; i < dense_matrix.extent(0); ++i) {
for (int j = 0; j < dense_matrix.extent(1); ++j) {
double const aij = dense_matrix(i, j);
if (Kokkos::abs(aij) >= tol) {
rows_idx(n_nonzeros.d_view()) = i;
Expand Down

0 comments on commit 97f1ea8

Please sign in to comment.