pystencils.backend.platforms.Platform#

class pystencils.backend.platforms.Platform(ctx)#

Abstract base class for all supported platforms.

Platform classes are responsible for lowering abstract IR constructs to target-specific implementations.

Runtime Library: In the pystencils runtime library (include/pystencils_runtime) each platform should have a single corresponding public header file of the same name. That header file should be listed in required_headers, and must contain or re-export all platform- specific runtime functions (including vendors’ intrinsics headers, etc)..

Parameters:

ctx (KernelCreationContext)

abstract property required_headers: set[str]#

Set of header files that must be included at the point of definition of a kernel running on this platform.

materialize_iteration_space(body, ispace)#

Materialize the given iteration space as an indexing structure and embed the given kernel body into that structure.

Deprecated; code generation pipelines should use the axis expansion system instead.

Return type:

PsBlock

Parameters:
abstract select_function(call)#

Select an implementation for the given function on the given data type.

If no viable implementation exists, raise a MaterializationError.

Return type:

PsExpression

Parameters:

call (PsCall)