Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (2)
from pystencils import Target, CreateKernelConfig, create_kernel, no_jit
from pystencils import Target, CreateKernelConfig, no_jit
from lbmpy import create_lb_update_rule, LBMOptimisation
from pystencilssfg import SourceFileGenerator, SfgConfiguration
from pystencilssfg.lang.cpp import mdspan_ref
from pystencilssfg import SourceFileGenerator, SfgConfig
sfg_config = SfgConfiguration(
output_directory="out/test_cuda",
outer_namespace="gen_code",
impl_extension="cu"
)
sfg_config = SfgConfig()
sfg_config.extensions.impl = "cu"
sfg_config.output_directory = "out/test_cuda"
sfg_config.outer_namespace = "gen_code"
with SourceFileGenerator(sfg_config) as sfg:
gen_config = CreateKernelConfig(target=Target.CUDA, jit=no_jit)
......@@ -15,6 +13,4 @@ with SourceFileGenerator(sfg_config) as sfg:
update = create_lb_update_rule()
kernel = sfg.kernels.create(update, "lbm_update", gen_config)
sfg.function("lb_update")(
sfg.call(kernel)
)
sfg.function("lb_update")(sfg.call(kernel))
......@@ -24,6 +24,9 @@ class HeaderFile:
return header
system_header = False
if header.startswith('"') and header.endswith('"'):
header = header[1:-1]
if header.startswith("<") and header.endswith(">"):
header = header[1:-1]
system_header = True
......
from pystencilssfg.lang import HeaderFile
import pytest
def test_parse_system():
headerfile = HeaderFile.parse("<test>")
assert str(headerfile) == "<test>" and headerfile.system_header
@pytest.mark.parametrize("header_string", ["test.hpp", '"test.hpp"'])
def test_parse_private(header_string):
headerfile = HeaderFile.parse(header_string)
assert str(headerfile) == "test.hpp" and not headerfile.system_header