Commit f4b28fe3 authored by Vladislav Perepelkin's avatar Vladislav Perepelkin
Browse files

minor improvements

parent 90c1c276
videos: run
make -B density/density.avi
make -B rest/rest.avi
make -B move/move.avi
make -B density/density.avi >/dev/null
make -B rest/rest.avi >/dev/null
make -B move/move.avi >/dev/null
run: hpprp FORCE
./hpprp
......
......@@ -158,6 +158,8 @@ int main()
if (iter%SAVE_PERIOD==0) {
save(iter);
printf("%d/%d\r", iter, ITERS);
fflush(stdout);
}
}
#pragma omp barrier
......
......@@ -117,10 +117,11 @@ try:
cur_prob=0
for s1, prob in rules[s0].iteritems():
cur_prob+=prob
if prob<1.0:
if cur_prob<1.0:
f.write("\t\t\tif (r<" + str(cur_prob) + ") return " +\
str(s1) + ";\n")
f.write("\t\t\tbreak;\n")
else:
f.write("\t\t\treturn " + str(s1) + ";\n");
f.write("\t\tdefault:\n")
f.write("\t\t\treturn cell;\n")
f.write("\t}\n")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment