diff --git a/pystencils_walberla/templates/Sweep.tmpl.h b/pystencils_walberla/templates/Sweep.tmpl.h index 9de4b96c2284560b920a6c592d8b2e5749a2bbf7..b4db0f35bd6fc9ad5046c83bd99eca004291cc6f 100644 --- a/pystencils_walberla/templates/Sweep.tmpl.h +++ b/pystencils_walberla/templates/Sweep.tmpl.h @@ -57,10 +57,10 @@ public: {{ kernel| generate_destructor(class_name) |indent(4) }} - void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} ); + void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} ); void runOnCellInterval(const shared_ptr<StructuredBlockStorage> & blocks, const CellInterval & globalCellInterval, cell_idx_t ghostLayers, IBlock * block - {%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %}); + {%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %}); @@ -74,8 +74,8 @@ public: const CellInterval & globalCellInterval, cell_idx_t ghostLayers=1 ) { - return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %}) { - kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%},stream {% endif %}); + return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %}) { + kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%}, stream {% endif %}); }; } diff --git a/pystencils_walberla/templates/SweepInnerOuter.tmpl.h b/pystencils_walberla/templates/SweepInnerOuter.tmpl.h index cf7ef4bcc684d663f9a7d5d0a908c9fdc43c5818..6f6094d0e08dfe00e7873cfb204f636c81c0a04a 100644 --- a/pystencils_walberla/templates/SweepInnerOuter.tmpl.h +++ b/pystencils_walberla/templates/SweepInnerOuter.tmpl.h @@ -60,11 +60,11 @@ public: {{ kernel| generate_destructor(class_name) |indent(4) }} - void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} ); + void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} ); void runOnCellInterval(const shared_ptr<StructuredBlockStorage> & blocks, const CellInterval & globalCellInterval, cell_idx_t ghostLayers, IBlock * block - {%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %}); + {%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %}); @@ -78,14 +78,14 @@ public: const CellInterval & globalCellInterval, cell_idx_t ghostLayers=1 ) { - return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %}) { - kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%},stream {% endif %}); + return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %}) { + kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%}, stream {% endif %}); }; } - void inner( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} ); - void outer( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} ); + void inner( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} ); + void outer( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} ); void setOuterPriority(int priority ) { {%if target is equalto 'gpu'%}