Skip to content

Commit

Permalink
Optimizations: use __restrict__ instead of Kokkos restrict macro as i…
Browse files Browse the repository at this point in the history
…t seems to be more reliable
  • Loading branch information
NaderAlAwar committed Mar 14, 2024
1 parent f02060d commit 26442c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pykokkos/core/optimizations/restrict_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def get_restrict_ptr_type(view_type: str) -> Tuple[cppast.ClassType, int]:
rank: int = view_dtype.count("*")

# Replace "**" with "*"
restrict_type: str = view_dtype.replace(rank * "*", "*") + " KOKKOS_RESTRICT"
restrict_type: str = view_dtype.replace(rank * "*", "*") + " __restrict__"
decltype = cppast.ClassType(restrict_type)

return decltype, rank
Expand Down

0 comments on commit 26442c4

Please sign in to comment.