Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Added construct kernel for KernelBuilderBase
Browse files Browse the repository at this point in the history
  • Loading branch information
Clara committed Apr 25, 2020
1 parent de2b63f commit 33bfbc1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tsfc/kernel_interface/firedrake_loopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ def create_element(self, element, **kwargs):
a UFL element."""
return create_element(element, **kwargs)

def construct_kernel(self, name, args, impero_c, precision):
"""Constructs a KernelBuilderBase Loopy kernel.
:arg name: Name of the kernel
:arg args: loopy.GlobalArg array for the values in kernel
:arg impero_c: gem.ImperoC object that represents the kernel
:arg precision: floating point precision for code generation
:returns: :class:`KernelBuilderBase` object
"""

loopy_kernel = generate_loopy(impero_c, args, precision, self.scalar_type,
"loopy_kernel_" + name)
return loopy_kernel


class ExpressionKernelBuilder(KernelBuilderBase):
"""Builds expression kernels for UFL interpolation in Firedrake."""
Expand Down

0 comments on commit 33bfbc1

Please sign in to comment.