Skip to content

Commit 6fd2ca9

Browse files
committed
Multiple fixes for the function generation.
1 parent bd64ad5 commit 6fd2ca9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

kernel_tuner/utils/directives.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -582,12 +582,11 @@ def generate_directive_function(
582582
else:
583583
code = code.replace("<!?USER_DEFINES?!>", "")
584584
code = code.replace("<!?SIGNATURE?!>", signature)
585-
if len(initialization) > 1:
586-
code = code.replace("<!?INITIALIZATION?!>", initialization)
587-
if len(deinitialization) > 1:
588-
code = code.replace("<!?DEINITIALIZATION?!>", deinitialization)
585+
code = code.replace("<!?INITIALIZATION?!>", initialization)
586+
code = code.replace("<!?DEINITIALIZATION?!>", deinitialization)
589587
if data is not None:
590588
body = add_present_openacc(body, langs, data, preprocessor, user_dimensions)
589+
code = code.replace("<!?BODY?!>", body)
591590

592591
return code
593592

0 commit comments

Comments
 (0)