aboutsummaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
authorShinya Sato <shinnya.sato@gmail.com>2022-03-10 21:10:34 +0900
committerShinya Sato <shinnya.sato@gmail.com>2022-03-10 21:10:34 +0900
commitadd49f1df854ed333252b494d1899c8c899991dd (patch)
tree81f4eab532e12070f07f06afa6b7383a2453810b /src/config.h
parent986915e6c6ee455cd0592aefb770c86e75d24e64 (diff)
downloadinpla-add49f1df854ed333252b494d1899c8c899991dd.tar.gz
inpla-add49f1df854ed333252b494d1899c8c899991dd.zip
v0.8.1-1
Diffstat (limited to '')
-rw-r--r--src/config.h90
1 files changed, 66 insertions, 24 deletions
diff --git a/src/config.h b/src/config.h
index 0a46711..1f878e0 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1,46 +1,86 @@
// Configurations ---------------------------------------------------
-/* Heaps ------------------------------------------
- Choose one among the following three definitions:
- -------------------------------------------------- */
-#define FLEX_EXPANDABLE_HEAP // Inserted heaps size can be flexible.
-//#define EXPANDABLE_HEAP // Expandable heaps for agents and names
-//#define FIXED_HEAP // The heap size is fixed. (Default)
-
-
+// ------------------------------------------------
+// Heaps
+// ------------------------------------------------
+// There are three methods for agents and names heaps:
+// - Fixed-size ring buffers (default)
+// The size is specified by an execution option -c
+//
+// - Expandable ring buffers
+// Automatically new buffers are inserted when all are run up.
+//
+// - Ring buffers whose Initial size and newly inserted size
+// are flexibly changed.
+// The initial size and the expansion magnification are
+// specified by execution options -Xms, -Xmt, respectively.
+//
+// Choose one among the following three definitions with uncomment.
+
+
+//#define FIXED_HEAP
+//#define EXPANDABLE_HEAP
+#define FLEX_EXPANDABLE_HEAP
+
+
+//
+// For the expandable ring buffer, the unit size HOOP_SIZE can be changed.
+// We note that HOOP_SIZE must be two to power.
+//
#ifdef EXPANDABLE_HEAP
-// HOOP_SIZE must be two to power
-#define HOOP_SIZE (1 << 18)
+//#define HOOP_SIZE (1 << 12) // good for small heaps such as fib
+#define HOOP_SIZE (1 << 18) // good for large heaps such as msort-80000
#endif
+
+
+// ------------------------------------------------
+// RuleTable
+// ------------------------------------------------
+// There are two implementation for the rule table:
+// - Hashed linear table (default)
+// - Simple array table
+// To use the hashed one, comment out the following RULETABLE_SIMPLE definition.
+
+//#define RULETABLE_SIMPLE
+
+
+
+
+
-/* Optimisation ------------------------------------
- Comment out definitions if not needed.
- ------------------------------------------------- */
+// ------------------------------------------------
+// Optimisation
+// ------------------------------------------------
+// Comment out definitions if not needed.
+//
// Optimisation inspired by Tail Recursion Optimisation
+//
#define OPTIMISE_IMCODE_TRO
-
+//
// Optimisation of the intermediate codes
-/*
- * Assign registers as little as possible with expecting cache works.
- * Copy propagation and Dead code elimination for LOAD are performed.
- * Reg0 is used as a special one that stores results of comparison.
- * Some combinations are rewritten.
- For instance, `SUBI src $1 dest' becomes `DEC src dest'.
-*/
+//
+//
+// - Assign registers as little as possible with expecting cache works.
+// - Copy propagation and Dead code elimination for LOAD are performed.
+// - Reg0 is used as a special one that stores results of comparison.
+// - Some combinations are rewritten.
+// For instance, `SUBI src $1 dest' becomes `DEC src dest'.
+//
#define OPTIMISE_IMCODE
#ifdef OPTIMISE_IMCODE
-// Furthermore optimisations for codes:
+// Furthermore optimisations on virtual machine codes:
// the following can work when the OPTIMISE_IMCODE is defined:
-
+//
// Generate virtual machine codes with two-address notation
+//
#define OPTIMISE_TWO_ADDRESS
#ifdef OPTIMISE_TWO_ADDRESS
@@ -52,7 +92,9 @@
#endif
-// END Optimisation configuration --------------
+// -------------------------------------------------
+
+
#define COUNT_INTERACTION // Count interaction.