From b789f010009a75d030763315851aae41c65794ef Mon Sep 17 00:00:00 2001 From: Martin Bauer <martin.bauer@fau.de> Date: Mon, 28 Jan 2019 18:10:41 +0100 Subject: [PATCH] Random number generation support for pystencils - counter-based philox RNG: counter/key is filled with cell coordinate and optional external parameters like block position and time step - works on CPU and GPU - on CPU only for non-vectorized versions - introduced more flexible "CustomCodeNode" that can inject backend-specific hand-written code --- boundaries/boundaryhandling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boundaries/boundaryhandling.py b/boundaries/boundaryhandling.py index fb9225df..1f7b61f9 100644 --- a/boundaries/boundaryhandling.py +++ b/boundaries/boundaryhandling.py @@ -1,7 +1,7 @@ import numpy as np import sympy as sp from pystencils import TypedSymbol, create_indexed_kernel, Assignment -from pystencils.backends.cbackend import CustomCppCode +from pystencils.backends.cbackend import CustomCodeNode from pystencils.boundaries import BoundaryHandling from pystencils.boundaries.boundaryhandling import BoundaryOffsetInfo from pystencils.stencils import inverse_direction @@ -76,7 +76,7 @@ class LatticeBoltzmannBoundaryHandling(BoundaryHandling): boundary_obj, target=self._target, openmp=self._openmp) -class LbmWeightInfo(CustomCppCode): +class LbmWeightInfo(CustomCodeNode): # --------------------------- Functions to be used by boundaries -------------------------- -- GitLab