Commit 2f91c7ed authored by sparonuz's avatar sparonuz
Browse files

[regex_module]: This also can be added to VariablePrecision module

parent 9b39963a
......@@ -52,7 +52,7 @@ if __name__ == "__main__":
track = args.omit_tracking
# Set the proper working precision
VariablePrecision.wp = VariablePrecision.precisions[wp]
VariablePrecision.wp = VariablePrecision.precision2type[wp]
print("Creating a database from sources found in:\n %s\n\n" % path_to_input_sources)
# In case no vault has been provided it will create it from the sources in the input sources folder
......@@ -81,10 +81,9 @@ if __name__ == "__main__":
length = len(real_variables)
# Assigning id and precision
type_to_precision = {"single": 23, "double": 52}
for index, var in enumerate(real_variables):
var.id = index
var.precision = type_to_precision[var.type]
var.precision = VariablePrecision.type2precision[var.type]
if track:
# Track dependencies and propagate it
......
......@@ -3,7 +3,8 @@
# i.e. double precision when implementing the emulator, single precision when modifying the code.
# I'll keep double by default, so everything will work as before except in the places where we specifically change it
precisions = {52: "double", 23: "single"}
precision2type = {52: "double", 23: "single"}
type2precision = {"double": 52, "single": 23}
wp = "double"
sp = "single"
dp = "double"
......
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