Skip to content
Snippets Groups Projects

Fix kernel function parameters

Closed Daniel Bauer requested to merge hyteg/pystencils:bauerd/kernel-params into backend-rework
1 unresolved thread
2 files
+ 14
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -42,9 +42,21 @@ class PsSymbol:
def get_dtype(self) -> PsType:
if self._dtype is None:
raise PsInternalCompilerError("Symbol had no type assigned yet")
raise PsInternalCompilerError(
f"Symbol {self.name} had no type assigned yet"
)
return self._dtype
def __eq__(self, other: object) -> bool:
return (
isinstance(other, PsSymbol)
and self._name == other._name
and self._dtype == other._dtype
)
def __hash__(self) -> int:
return hash((self._name, self._dtype))
def __str__(self) -> str:
dtype_str = "<untyped>" if self._dtype is None else str(self._dtype)
return f"{self._name}: {dtype_str}"
Loading