|
1 | 1 | """ |
2 | 2 | .. currentmodule:: arraycontext |
3 | 3 | .. autofunction:: make_loopy_program |
| 4 | +
|
| 5 | +References |
| 6 | +---------- |
| 7 | +
|
| 8 | +.. class:: InstructionBase |
| 9 | +
|
| 10 | + See :class:`loopy.InstructionBase`. |
| 11 | +
|
| 12 | +.. class:: SubstitutionRule |
| 13 | +
|
| 14 | + See :class:`loopy.SubstitutionRule`. |
| 15 | +
|
| 16 | +.. class:: ValueArg |
| 17 | +
|
| 18 | + See :class:`loopy.ValueArg`. |
| 19 | +
|
| 20 | +.. class:: ArrayArg |
| 21 | +
|
| 22 | + See :class:`loopy.ArrayArg`. |
| 23 | +
|
| 24 | +.. class:: TemporaryVariable |
| 25 | +
|
| 26 | + See :class:`loopy.TemporaryVariable`. |
| 27 | +
|
| 28 | +.. class:: EllipsisType |
| 29 | +
|
| 30 | + See :data:`types.EllipsisType`. |
4 | 31 | """ |
5 | 32 | from __future__ import annotations |
6 | 33 |
|
|
42 | 69 |
|
43 | 70 |
|
44 | 71 | if TYPE_CHECKING: |
45 | | - from collections.abc import Mapping |
| 72 | + from collections.abc import Mapping, Sequence |
| 73 | + from types import EllipsisType |
| 74 | + |
| 75 | + import islpy as isl |
| 76 | + |
| 77 | + from loopy.kernel.data import ( |
| 78 | + ArrayArg, |
| 79 | + SubstitutionRule, |
| 80 | + TemporaryVariable, |
| 81 | + ValueArg, |
| 82 | + ) |
| 83 | + from loopy.kernel.instruction import InstructionBase |
| 84 | + from pytools.tag import ToTagSetConvertible |
46 | 85 |
|
47 | 86 |
|
48 | 87 | # {{{ loopy |
|
52 | 91 | return_dict=True) |
53 | 92 |
|
54 | 93 |
|
55 | | -def make_loopy_program(domains, statements, kernel_data=None, |
56 | | - name="mm_actx_kernel", tags=None): |
| 94 | +def make_loopy_program( |
| 95 | + domains: str | Sequence[str | isl.BasicSet], |
| 96 | + statements: str | Sequence[InstructionBase | SubstitutionRule | str], |
| 97 | + kernel_data: Sequence[ |
| 98 | + ValueArg | ArrayArg | TemporaryVariable | EllipsisType | str |
| 99 | + ] | None = None, |
| 100 | + name: str = "mm_actx_kernel", |
| 101 | + tags: ToTagSetConvertible = None): |
57 | 102 | """Return a :class:`loopy.LoopKernel` suitable for use with |
58 | 103 | :meth:`ArrayContext.call_loopy`. |
59 | 104 | """ |
|
0 commit comments