if (++reprobe_cnt >= reprobe_limit(len) ||
K == TOMBSTONE) { // Found a Tombstone key, no more keys
newkvs = chm->resize(topmap, kvs);
- model_print("resize1\n");
+ //model_print("resize1\n");
// Help along an existing copy
if (expVal != NULL) topmap->help_copy(newkvs);
return putIfMatch(topmap, newkvs, key_slot, val_slot, expVal);
newkvs = chm->_newkvs.load(memory_order_acquire);
if (newkvs == NULL &&
((V == NULL && chm->table_full(reprobe_cnt, len)) || is_prime(V))) {
- model_print("resize2\n");
+ //model_print("resize2\n");
newkvs = chm->resize(topmap, kvs); // Force the copy to start
}
table->put(k1, v1);
//table->put(k2, v2);
//table->put(k3, v3);
-
+ /*
val1 = table->get(k3);
if (val1 != NULL)
model_print("val1: %d\n", val1->_val);
else
model_print("val1: NULL\n");
+ */
//table->put(k3, v3);
}
}
void threadMain(void *arg) {
- table->put(k3, v3);
+ //table->put(k3, v3);
val2 = table->get(k1);
if (val2 != NULL)
model_print("val2: %d\n", val1->_val);
new File(homeDir + "/benchmark/mpmc-queue/mpmc-queue.h"),
new File(homeDir + "/benchmark/mpmc-queue/mpmc-queue.cc") };
-// File[][] sources = { srcLinuxRWLocks, srcMSQueue, srcRCU,
-// srcDeque, srcMCSLock, srcSPSCQueue, srcMPMCQueue, srcHashtable };
+ File[][] sources = { srcLinuxRWLocks, srcMSQueue, srcRCU,
+ srcDeque, srcMCSLock, srcSPSCQueue, srcMPMCQueue, srcHashtable };
- File[][] sources = { srcHashtable, srcMPMCQueue };
+// File[][] sources = { srcHashtable, srcMPMCQueue };
// Compile all the benchmarks
for (int i = 0; i < sources.length; i++) {
CodeGenerator gen = new CodeGenerator(sources[i]);
--- /dev/null
+package edu.uci.eecs.specCompiler.codeGenerator;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.ArrayList;
+
+/**
+ * <p>
+ * This class represents the structured code before and after compilation.
+ * </p>
+ * @author peizhaoo
+ *
+ */
+public class ProgramUnit {
+ private File[] files;
+
+ private HashMap<File, ArrayList<String>> newCode;
+
+ public ProgramUnit(File[] files) {
+ this.files = files;
+ }
+
+ public void compileSpec() {
+
+ }
+
+ public void writeToFile() {
+
+ }
+}