Skip to content
Snippets Groups Projects

Adapt SFG to field typing changes in pystencils

Merged Frederik Hennig requested to merge fhennig/dynamic-field-types into master
Compare and
6 files
+ 45
7
Preferences
Compare changes
Files
6
@@ -5,7 +5,7 @@ import sympy as sp
with SourceFileGenerator() as sfg:
# Define a copy kernel
src, dst = ps.fields("src, dst: [1D]")
src, dst = ps.fields("src, dst: double[1D]")
c = sp.Symbol("c")
@ps.kernel
@@ -19,7 +19,7 @@ with SourceFileGenerator() as sfg:
import pystencilssfg.lang.cpp.std as std
sfg.include("<span>")
sfg.function("scale_kernel")(
sfg.map_field(src, std.vector.from_field(src)),
sfg.map_field(dst, std.span.from_field(dst)),