Skip to content

Commit

Permalink
Add blank line before function instead of at the end
Browse files Browse the repository at this point in the history
Authored-By: Jim Lin <jim@andestech.com>
  • Loading branch information
tclin914 authored and eopXD committed Oct 24, 2023
1 parent 36b4e34 commit f73ea2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rvv-intrinsic-generator/rvv_intrinsic_gen/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,9 @@ def write_file_header(self, has_float_type):
self.fd.write(gnu_header)
else:
self.fd.write("#include <stdint.h>\n")
self.fd.write("#include <riscv_vector.h>\n\n")
self.fd.write("#include <riscv_vector.h>\n")
if self.toolchain_type != ToolChainType.LLVM:
self.fd.write("\n")
self.fd.write("typedef _Float16 float16_t;\n")
self.fd.write("typedef float float32_t;\n")
self.fd.write("typedef double float64_t;\n")
Expand Down Expand Up @@ -559,6 +560,7 @@ def output_call_arg(arg_name, type_name):

# Write test func body.
# Write test func. func_decl has end of ";" and "\n"
self.fd.write("\n")
self.fd.write(func_decl[:-2])
self.fd.write(" {\n")

Expand All @@ -567,7 +569,7 @@ def output_call_arg(arg_name, type_name):
map(lambda a: output_call_arg(a[0], a[1]), kwargs.items()))
self.fd.write(call_args)
self.fd.write(");\n")
self.fd.write("}\n\n")
self.fd.write("}\n")
self.fd.flush() # To make sure the data flushed when post_gen.

def post_gen(self):
Expand Down

0 comments on commit f73ea2b

Please sign in to comment.