diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-02-26 14:51:45 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-02-26 14:51:45 +0100 |
commit | ea6790665d228e9ff9ba39983a60cd91611ee1fe (patch) | |
tree | 043ca277a867507f97f804cc4057fe50e548b9b1 /scripts | |
parent | a145890aaac0087d36b414bd59c247ae4b70b3e5 (diff) | |
parent | 0643a29af51f9eb13e2b276d0a0e74590c699d3b (diff) |
Merge branch 'development' into triangular_solvers
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/generator/generator.py | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/scripts/generator/generator.py b/scripts/generator/generator.py index ebbaa6e6..741aa80c 100755 --- a/scripts/generator/generator.py +++ b/scripts/generator/generator.py @@ -41,8 +41,10 @@ FILES = [ "/include/clblast_netlib_c.h", "/src/clblast_netlib_c.cpp", ] -HEADER_LINES = [117, 75, 118, 22, 29, 41, 65, 32] -FOOTER_LINES = [17, 95, 19, 18, 6, 6, 9, 2] +HEADER_LINES = [121, 75, 125, 23, 29, 41, 65, 32] +FOOTER_LINES = [25, 139, 27, 38, 6, 6, 9, 2] +HEADER_LINES_DOC = 0 +FOOTER_LINES_DOC = 63 # 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:]) |