Skip to content
Snippets Groups Projects
Commit ae1ea301 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Also rename KernelFunctionCall -> FunctionCall in test

parent 2dfe28b0
No related branches found
No related tags found
No related merge requests found
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
""" """
import pytest import pytest
import sympy as sp
import pystencils import pystencils
import sympy as sp
from pystencils.astnodes import Block from pystencils.astnodes import Block
from pystencils_autodiff.framework_integration.astnodes import ( from pystencils_autodiff.framework_integration.astnodes import (
DestructuringBindingsForFieldClass, KernelFunctionCall, WrapperFunction, generate_kernel_call) DestructuringBindingsForFieldClass, FunctionCall, WrapperFunction, generate_kernel_call)
from pystencils_autodiff.framework_integration.printer import FrameworkIntegrationPrinter from pystencils_autodiff.framework_integration.printer import FrameworkIntegrationPrinter
# TODO # TODO
...@@ -31,7 +31,7 @@ def test_pure_call(): ...@@ -31,7 +31,7 @@ def test_pure_call():
for target in ('cpu', 'gpu'): for target in ('cpu', 'gpu'):
ast = pystencils.create_kernel(forward_assignments, target=target) ast = pystencils.create_kernel(forward_assignments, target=target)
kernel_call_ast = KernelFunctionCall(ast) kernel_call_ast = FunctionCall(ast)
code = FrameworkIntegrationPrinter()(kernel_call_ast) code = FrameworkIntegrationPrinter()(kernel_call_ast)
print(code) print(code)
...@@ -44,7 +44,7 @@ def test_call_with_destructuring(): ...@@ -44,7 +44,7 @@ def test_call_with_destructuring():
for target in ('cpu', 'gpu'): for target in ('cpu', 'gpu'):
ast = pystencils.create_kernel(forward_assignments, target=target) ast = pystencils.create_kernel(forward_assignments, target=target)
kernel_call_ast = KernelFunctionCall(ast) kernel_call_ast = FunctionCall(ast)
wrapper = DestructuringBindingsForFieldClass(kernel_call_ast) wrapper = DestructuringBindingsForFieldClass(kernel_call_ast)
code = FrameworkIntegrationPrinter()(wrapper) code = FrameworkIntegrationPrinter()(wrapper)
print(code) print(code)
...@@ -59,7 +59,7 @@ def test_call_with_destructuring_fixed_size(): ...@@ -59,7 +59,7 @@ def test_call_with_destructuring_fixed_size():
for target in ('cpu', 'gpu'): for target in ('cpu', 'gpu'):
ast = pystencils.create_kernel(forward_assignments, target=target) ast = pystencils.create_kernel(forward_assignments, target=target)
kernel_call_ast = KernelFunctionCall(ast) kernel_call_ast = FunctionCall(ast)
wrapper = DestructuringBindingsForFieldClass(kernel_call_ast) wrapper = DestructuringBindingsForFieldClass(kernel_call_ast)
code = FrameworkIntegrationPrinter()(wrapper) code = FrameworkIntegrationPrinter()(wrapper)
print(code) print(code)
...@@ -73,14 +73,14 @@ def test_wrapper_function(): ...@@ -73,14 +73,14 @@ def test_wrapper_function():
for target in ('cpu', 'gpu'): for target in ('cpu', 'gpu'):
ast = pystencils.create_kernel(forward_assignments, target=target) ast = pystencils.create_kernel(forward_assignments, target=target)
kernel_call_ast = KernelFunctionCall(ast) kernel_call_ast = FunctionCall(ast)
wrapper = WrapperFunction(DestructuringBindingsForFieldClass(kernel_call_ast)) wrapper = WrapperFunction(DestructuringBindingsForFieldClass(kernel_call_ast))
code = FrameworkIntegrationPrinter()(wrapper) code = FrameworkIntegrationPrinter()(wrapper)
print(code) print(code)
for target in ('cpu', 'gpu'): for target in ('cpu', 'gpu'):
ast = pystencils.create_kernel(forward_assignments, target=target) ast = pystencils.create_kernel(forward_assignments, target=target)
kernel_call_ast = KernelFunctionCall(ast) kernel_call_ast = FunctionCall(ast)
wrapper = WrapperFunction(Block([kernel_call_ast])) wrapper = WrapperFunction(Block([kernel_call_ast]))
code = FrameworkIntegrationPrinter()(wrapper) code = FrameworkIntegrationPrinter()(wrapper)
print(code) print(code)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment