summaryrefslogtreecommitdiff
path: root/gui/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/util.h')
-rw-r--r--gui/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gui/util.h b/gui/util.h
new file mode 100644
index 0000000..87c33f6
--- /dev/null
+++ b/gui/util.h
@@ -0,0 +1,8 @@
+/**
+ * Given `total_levels', returns an integer between 4 and 12 which is a linear map of `level' onto `total_levels'.
+ * This is used for generating cache sizes given a number of levels.
+ * @param the total number of cache levels, zero-indexed.
+ * @param a numberedcache level, zero-indexed.
+ * @return an integer between 4-12, linearly scaled with level.
+ */
+int cache_size_mapper(int total_levels, int level);