aboutsummaryrefslogtreecommitdiffstats
path: root/chilbert/chilbert.ipp
diff options
context:
space:
mode:
Diffstat (limited to 'chilbert/chilbert.ipp')
-rw-r--r--chilbert/chilbert.ipp20
1 files changed, 10 insertions, 10 deletions
diff --git a/chilbert/chilbert.ipp b/chilbert/chilbert.ipp
index c4e8249..a62a258 100644
--- a/chilbert/chilbert.ipp
+++ b/chilbert/chilbert.ipp
@@ -82,7 +82,7 @@ template <class H, class I>
inline void
get_bits(const H& h, const size_t n, const size_t i, I& w)
{
- for (size_t j = 0; j < n; j++) {
+ for (size_t j = 0; j < n; ++j) {
set_bit(w, j, test_bit(h, i + j));
}
}
@@ -98,7 +98,7 @@ template <class H, class I>
inline void
set_bits(H& h, const size_t n, const size_t i, const I& w)
{
- for (size_t j = 0; j < n; j++) {
+ for (size_t j = 0; j < n; ++j) {
set_bit(h, i + j, test_bit(w, j));
}
}
@@ -130,7 +130,7 @@ template <class P, class I>
inline void
set_location(P* const p, const size_t n, const size_t i, const I& l)
{
- for (size_t j = 0; j < n; j++) {
+ for (size_t j = 0; j < n; ++j) {
set_bit(p[j], i, test_bit(l, j));
}
}
@@ -221,7 +221,7 @@ coords_to_index(const P* const p,
// Work from MSB to LSB
size_t d = D0;
size_t ho = m * n;
- for (intptr_t i = static_cast<intptr_t>(m - 1); i >= 0; i--) {
+ for (intptr_t i = static_cast<intptr_t>(m - 1); i >= 0; --i) {
if (ds) {
ds[i] = d;
}
@@ -262,14 +262,14 @@ index_to_coords(P* p, const size_t m, const size_t n, const H& h, I&& scratch)
// Initialize
e.reset();
l.reset();
- for (size_t j = 0; j < n; j++) {
+ for (size_t j = 0; j < n; ++j) {
reset_bits(p[j]);
}
// Work from MSB to LSB
size_t d = D0;
size_t ho = m * n;
- for (intptr_t i = static_cast<intptr_t>(m - 1); i >= 0; i--) {
+ for (intptr_t i = static_cast<intptr_t>(m - 1); i >= 0; --i) {
// Get the Hilbert index bits
ho -= n;
get_bits<H, I>(h, n, ho, w);
@@ -305,7 +305,7 @@ coords_to_compact_index(const P* const p,
// Get total precision and max precision if not supplied
if (M == 0 || m == 0) {
M = m = 0;
- for (size_t i = 0; i < n; i++) {
+ for (size_t i = 0; i < n; ++i) {
assert(num_bits(p[i]) >= ms[i]);
if (ms[i] > m) {
m = ms[i];
@@ -360,7 +360,7 @@ compact_index_to_coords(P* const p,
// if not supplied
if (M == 0 || m == 0) {
M = m = 0;
- for (size_t i = 0; i < n; i++) {
+ for (size_t i = 0; i < n; ++i) {
if (ms[i] > m) {
m = ms[i];
}
@@ -374,14 +374,14 @@ compact_index_to_coords(P* const p,
// Initialize
e.reset();
l.reset();
- for (size_t j = 0; j < n; j++) {
+ for (size_t j = 0; j < n; ++j) {
reset_bits(p[j]);
}
// Work from MSB to LSB
size_t d = D0;
- for (intptr_t i = static_cast<intptr_t>(m - 1); i >= 0; i--) {
+ for (intptr_t i = static_cast<intptr_t>(m - 1); i >= 0; --i) {
// Get the mask and ptrn
size_t b = 0;
extract_mask<I>(ms, n, d, static_cast<size_t>(i), mask, b);