From 60b70bb332d29fb5a2aecb801517be659cf4daf9 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Fri, 30 Nov 2018 00:37:07 -0800 Subject: [PATCH] Add restrict keyword to pointers (not sharing the same memory for multiple fields) --- opencl_fdtd/simulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencl_fdtd/simulation.py b/opencl_fdtd/simulation.py index d24dcf2..1e573c9 100644 --- a/opencl_fdtd/simulation.py +++ b/opencl_fdtd/simulation.py @@ -166,7 +166,7 @@ class Simulation(object): ctype = type_to_C(self.arg_type) def ptr(arg: str) -> str: - return ctype + ' *' + arg + return ctype + ' * restrict ' + arg base_fields = OrderedDict() base_fields[ptr('E')] = self.E