Commit bbb7ab95 authored by Martin Bauer's avatar Martin Bauer
Browse files

Merge branch 'kernel-wrapper-typeannotations' into 'master'

Add typeannotations and docstring for KernelWrapper

See merge request pycodegen/pystencils!136
parents f16225d5 2e7f2703
import os
import runpy
import sys
import warnings
import tempfile
import warnings
import nbformat
import pytest
......@@ -34,7 +34,7 @@ def add_path_to_ignore(path):
collect_ignore = [os.path.join(SCRIPT_FOLDER, "doc", "conf.py"),
os.path.join(SCRIPT_FOLDER, "pystencils", "opencl", "opencl.autoinit")]
os.path.join(SCRIPT_FOLDER, "pystencils", "opencl", "opencl.autoinit")]
add_path_to_ignore('pystencils_tests/benchmark')
add_path_to_ignore('_local_tmp')
......@@ -83,8 +83,6 @@ for root, sub_dirs, files in os.walk('.'):
collect_ignore.append(f)
class IPythonMockup:
def run_line_magic(self, *args, **kwargs):
pass
......
"""
Light-weight wrapper around a compiled kernel
"""
import pystencils
class KernelWrapper:
def __init__(self, kernel, parameters, ast_node):
"""
Light-weight wrapper around a compiled kernel.
Can be called while still providing access to underlying AST.
"""
def __init__(self, kernel, parameters, ast_node: pystencils.astnodes.KernelFunction):
self.kernel = kernel
self.parameters = parameters
self.ast = ast_node
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment