Skip to content

Commit

Permalink
Fix AA access pattern for some of the examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjanusz committed Dec 24, 2013
1 parent 8d9b353 commit 34634ea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion examples/entropic_utils.mako
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
Expand Down
4 changes: 2 additions & 2 deletions examples/ldc_2d_entropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])


Expand Down
5 changes: 5 additions & 0 deletions sailfish/templates/boundary.mako
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 34634ea

Please sign in to comment.