Starting tuner framework
authorbdemsky <bdemsky@uci.edu>
Mon, 21 Aug 2017 06:18:22 +0000 (23:18 -0700)
committerbdemsky <bdemsky@uci.edu>
Mon, 21 Aug 2017 06:18:22 +0000 (23:18 -0700)
src/Makefile
src/Tuner/tunable.c [new file with mode: 0644]
src/Tuner/tunable.h [new file with mode: 0644]
src/classlist.h

index 35468a0..965d4d7 100644 (file)
@@ -4,9 +4,9 @@ PHONY += directories
 MKDIR_P = mkdir -p
 OBJ_DIR = bin
 
-C_SOURCES := $(wildcard *.c) $(wildcard AST/*.c) $(wildcard Collections/*.c) $(wildcard Backend/*.c) $(wildcard Encoders/*.c)
+C_SOURCES := $(wildcard *.c) $(wildcard AST/*.c) $(wildcard Tuner/*.c) $(wildcard Collections/*.c) $(wildcard Backend/*.c) $(wildcard Encoders/*.c)
 
-HEADERS := $(wildcard *.h) $(wildcard AST/*.h) $(wildcard Collections/*.h) $(wildcard Backend/*.h) $(wildcard Encoders/*.h)
+HEADERS := $(wildcard *.h) $(wildcard AST/*.h) $(wildcard Tuner.*.h) $(wildcard Collections/*.h) $(wildcard Backend/*.h) $(wildcard Encoders/*.h)
 
 OBJECTS := $(CPP_SOURCES:%.cc=$(OBJ_DIR)/%.o) $(C_SOURCES:%.c=$(OBJ_DIR)/%.o)
 
@@ -30,6 +30,7 @@ directories: ${OBJ_DIR}
 ${OBJ_DIR}:
        ${MKDIR_P} ${OBJ_DIR}
        ${MKDIR_P} ${OBJ_DIR}/AST
+       ${MKDIR_P} ${OBJ_DIR}/Tuner
        ${MKDIR_P} ${OBJ_DIR}/Collections
        ${MKDIR_P} ${OBJ_DIR}/Backend
        ${MKDIR_P} ${OBJ_DIR}/Encoders
diff --git a/src/Tuner/tunable.c b/src/Tuner/tunable.c
new file mode 100644 (file)
index 0000000..81fe363
--- /dev/null
@@ -0,0 +1 @@
+#include "tunable.h"
diff --git a/src/Tuner/tunable.h b/src/Tuner/tunable.h
new file mode 100644 (file)
index 0000000..84bf862
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef TUNABLE_H
+#define TUNABLE_H
+#include "classlist.h"
+
+
+struct Tuner {
+};
+
+struct TunableDesc {
+       int lowValue;
+       int highValue;
+       int defaultValue;
+};
+
+int getTunable(Tuner This, TunableParam param, TunableDesc * descriptor);
+int getVarTunable(Tuner This, VarType vartype, TunableParam param, TunableDesc * descriptor);
+
+#define GETTUNABLE(This, param, descriptor) getTunable(This, param, descriptor);
+#define GETVARTUNABLE(This, vartype, param, descriptor) getTunable(This, param, descriptor);
+
+#endif
index 339dee3..ca192fa 100644 (file)
@@ -94,6 +94,12 @@ typedef struct OrderEdge OrderEdge;
 struct OrderEncoder;
 typedef struct OrderEncoder OrderEncoder;
 
+struct Tuner;
+typedef struct Tuner Tuner;
+struct TunableDesc;
+typedef struct TunableDesc TunableDesc;
+typedef int TunableParam;
+
 typedef unsigned int uint;
 typedef long int int64;
 typedef uint64_t VarType;