Commit 62a1199e authored by erodrigu's avatar erodrigu
Browse files

Added some comments

parent fa02fdc8
# Script that automatically creates different versions of a routine with different precisions
# It creates all the possible combinations of the real variables.
#
# If the subroutine has the reals foo and bar, it would generates the routines:
# - subroutine_name_0000
# * foo(dp)
# * bar(dp)
# - subroutine_name_0001
# * foo(sp)
# * bar(dp)
# - subroutine_name_0002
# * foo(dp)
# * bar(sp)
# - subroutine_name_0003
# * foo(sp)
# * bar(sp)
#
# Import classes and functions from UtilsRPE
from AutoRPE.UtilsRPE.CurrentBlock import CurrentBlock
......@@ -74,6 +90,7 @@ def obtain_routine_source(routine, sources_path):
for index, line in enumerate(lines):
line = remove_comments(line).strip()
# if it's the start or end of the routine
if re.search(pattern, line, re.I):
indices.append(index)
routine_code = "".join(lines[indices[0]:indices[1]+1])
......
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