summaryrefslogtreecommitdiff
path: root/scripts/generator/generator.py
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-02-18 10:32:32 +0100
committerCedric Nugteren <web@cedricnugteren.nl>2017-02-18 10:32:32 +0100
commit3d10690c830a749d1e9c2c60bcd68a61590ef994 (patch)
tree8d49818cfedd781612d00eefbf0a3fa0fb4ff1df /scripts/generator/generator.py
parentcda449a5c39041b2a0e6893ee254e145447b78ca (diff)
Added missing documentation for the fill and clear cache functions
Diffstat (limited to 'scripts/generator/generator.py')
-rwxr-xr-xscripts/generator/generator.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/generator/generator.py b/scripts/generator/generator.py
index 9bc48502..38f18e8a 100755
--- a/scripts/generator/generator.py
+++ b/scripts/generator/generator.py
@@ -43,6 +43,8 @@ FILES = [
]
HEADER_LINES = [121, 73, 125, 23, 29, 41, 65, 32]
FOOTER_LINES = [26, 139, 28, 38, 6, 6, 9, 2]
+HEADER_LINES_DOC = 0
+FOOTER_LINES_DOC = 35
# Different possibilities for requirements
ald_m = "The value of `a_ld` must be at least `m`."
@@ -233,11 +235,20 @@ def main(argv):
f.write(cpp.performance_test(routine, level_string))
f.write(cpp.FOOTER)
- # Outputs the API documentation
+ # API documentation
filename = cl_args.clblast_root + "/doc/clblast.md"
+
+ # Stores the header and the footer of the original documentation file
+ with open(filename) as f:
+ original = f.readlines()
+ file_header = original[:HEADER_LINES_DOC]
+ file_footer = original[-FOOTER_LINES_DOC:]
+
+ # Outputs the API documentation
with open(filename, "w") as f:
# Outputs the header
+ f.write("".join(file_header))
doc_header = doc.header()
f.write(doc_header)
@@ -248,5 +259,8 @@ def main(argv):
doc_routine = doc.generate(routine)
f.write(doc_routine)
+ # Outputs the footer
+ f.write("".join(file_footer))
+
if __name__ == '__main__':
main(sys.argv[1:])