From 34634ea5e977808fd8cd659107d64061454634c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Januszewski?= Date: Sun, 24 Nov 2013 23:32:05 +0100 Subject: [PATCH] Fix AA access pattern for some of the examples. --- examples/entropic_utils.mako | 4 +++- examples/ldc_2d_entropic.py | 4 ++-- sailfish/templates/boundary.mako | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/entropic_utils.mako b/examples/entropic_utils.mako index a6638393..48e99ad6 100644 --- a/examples/entropic_utils.mako +++ b/examples/entropic_utils.mako @@ -3,7 +3,9 @@ ${kernel} void ComputeEntropy( ${global_ptr} ${const_ptr} int *__restrict__ map, ${global_ptr} float *dist, - ${global_ptr} float *entropy) + ${global_ptr} float *entropy + ${iteration_number_if_required()} +) { ${local_indices()} ${load_node_type()} diff --git a/examples/ldc_2d_entropic.py b/examples/ldc_2d_entropic.py index eef7c607..8a2e4a64 100755 --- a/examples/ldc_2d_entropic.py +++ b/examples/ldc_2d_entropic.py @@ -32,10 +32,10 @@ def get_aux_kernels(self, runner): ce1 = runner.get_kernel('ComputeEntropy', [gpu_map, gpu_dist1b, gpu_entropy], - 'PPP') + 'PPP', needs_iteration=True) ce2 = runner.get_kernel('ComputeEntropy', [gpu_map, gpu_dist1a, gpu_entropy], - 'PPP') + 'PPP', needs_iteration=True) return KernelPair([ce1], [ce2]) diff --git a/sailfish/templates/boundary.mako b/sailfish/templates/boundary.mako index ebd0f7e2..8f619cbb 100644 --- a/sailfish/templates/boundary.mako +++ b/sailfish/templates/boundary.mako @@ -475,6 +475,11 @@ ${device_func} inline void fixMissingDistributions( %endfor } %endif + ## access_pattern == AA + %else: + %if nt.NTYuOutflow in node_types or nt.NTGradFreeflow in node_types or nt.NTCopy in node_types: + #error NTYuOutflow, NTGradFreeflow and NTCopy are not supported with the AA access_pattern. + %endif %endif %if nt.NTWallTMS in node_types: