aboutsummaryrefslogtreecommitdiff
path: root/internal/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'internal/kernel.h')
-rw-r--r--internal/kernel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/kernel.h b/internal/kernel.h
index 4d006af..825a7f3 100644
--- a/internal/kernel.h
+++ b/internal/kernel.h
@@ -183,6 +183,7 @@ inline const char* CellOrderName(CellOrder o) {
// Returns the offset into a cell, at which a given coefficient is stored.
template <typename CellFormat>
inline int OffsetIntoCell(int w, int d) {
+ const int size = CellFormat::kWidth;
switch (CellFormat::kOrder) {
case CellOrder::DepthMajor:
return w + d * CellFormat::kWidth;
@@ -190,7 +191,6 @@ inline int OffsetIntoCell(int w, int d) {
return d + w * CellFormat::kDepth;
case CellOrder::Diagonal:
assert(CellFormat::kWidth == CellFormat::kDepth);
- static const int size = CellFormat::kWidth;
return ((size + w - d) * size + d) % (size * size);
default:
assert(false);