Skip to content

Commit

Permalink
Bug fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
isazi committed Aug 22, 2024
1 parent 3d32c47 commit 21e56af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel_tuner/utils/directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def wrap_data(code: str, langs: Code, data: dict, preprocessor: list = None, use
for name in data.keys():
if "*" in data[name][0]:
size = parse_size(data[name][1], preprocessor=preprocessor, dimensions=user_dimensions)
temp = None
temp = []
if is_openacc(langs.directive):
temp = wrap_data_openacc(name, size)
elif is_openmp(langs.directive):
Expand All @@ -491,7 +491,7 @@ def wrap_data(code: str, langs: Code, data: dict, preprocessor: list = None, use
return "\n".join([intro, code, outro])


def wrap_data_openacc(name: str, size: int) -> Tuple[str, str]:
def wrap_data_openacc(name: str, size: int, langs: Code) -> Tuple[str, str]:
"""Create language specific data directives"""
if is_cxx(langs.language):
intro = create_data_directive_openacc_cxx(name, size)
Expand All @@ -502,7 +502,7 @@ def wrap_data_openacc(name: str, size: int) -> Tuple[str, str]:
return intro, outro


def wrap_data_openmp(name: str, size: int) -> Tuple[str, str]:
def wrap_data_openmp(name: str, size: int, langs: Code) -> Tuple[str, str]:
"""Create language specific data directives"""
if is_cxx(langs.language):
intro += create_data_directive_openmp_cxx(name, size)
Expand Down

0 comments on commit 21e56af

Please sign in to comment.