Type inference for kernel invariants #13
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As mentioned in #5 (comment):
It seems that the type of the tuples/lists in the kernel invariants may be complicated for such usage. It may be helpful for us to infer the type of the kernel invariants instead of requiring the users to write it. For example:
However, this may force us to defer the type checking and code generation until the kernel instance is built...
Btw, do users prefer to use
numpy.ndarray
for a list of objects? Just wondering what is the benefit of it comparing to a typical list.No.
Let's keep the compiler simple, explicit and consistent. It's rather weird that type annotations would magically disappear when
KernelInvariant
is used, and it also goes against the goals of simplicity and explicitness.KernelInvariant(Tuple[TTLOut])
seems fine to me, as well asKernelInvariant(Tuple[Callable[None]])
.