From 112818f5e589dcb44ab47a6be55444d714bd0530 Mon Sep 17 00:00:00 2001
From: ab04unyc <michael.zikeli@fau.de>
Date: Tue, 25 Feb 2025 16:57:28 +0100
Subject: [PATCH] V0.3 of dot printer, now supports colored precision output,
 integrates the IRPrinter and uses a context manager and dynamic lifetyle
 halndling of subgraphs.

---
 .../backend/emission/dot_printer.py           | 24 +++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/pystencils/backend/emission/dot_printer.py b/src/pystencils/backend/emission/dot_printer.py
index 51eb62f64..169febee4 100644
--- a/src/pystencils/backend/emission/dot_printer.py
+++ b/src/pystencils/backend/emission/dot_printer.py
@@ -288,29 +288,29 @@ class DotContext:
             dtype = dtype.scalar_type
         match dtype:
             case PsIeeeFloatType(64):
-                return self._dtype_color_map[PsIeeeFloatType(64)]
+                return DotContext._dtype_color_map[PsIeeeFloatType(64)]
             case PsIeeeFloatType(32):
-                return self._dtype_color_map[PsIeeeFloatType(32)]
+                return DotContext._dtype_color_map[PsIeeeFloatType(32)]
             case PsIeeeFloatType(16):
-                return self._dtype_color_map[PsIeeeFloatType(16)]
+                return DotContext._dtype_color_map[PsIeeeFloatType(16)]
             case PsSignedIntegerType(64):
-                return self._dtype_color_map[PsSignedIntegerType(64)]
+                return DotContext._dtype_color_map[PsSignedIntegerType(64)]
             case PsSignedIntegerType(32):
-                return self._dtype_color_map[PsSignedIntegerType(32)]
+                return DotContext._dtype_color_map[PsSignedIntegerType(32)]
             case PsSignedIntegerType(16):
-                return self._dtype_color_map[PsSignedIntegerType(16)]
+                return DotContext._dtype_color_map[PsSignedIntegerType(16)]
             case PsSignedIntegerType(8):
-                return self._dtype_color_map[PsSignedIntegerType(8)]
+                return DotContext._dtype_color_map[PsSignedIntegerType(8)]
             case PsUnsignedIntegerType(64):
-                return self._dtype_color_map[PsUnsignedIntegerType(64)]
+                return DotContext._dtype_color_map[PsUnsignedIntegerType(64)]
             case PsUnsignedIntegerType(32):
-                return self._dtype_color_map[PsUnsignedIntegerType(32)]
+                return DotContext._dtype_color_map[PsUnsignedIntegerType(32)]
             case PsUnsignedIntegerType(16):
-                return self._dtype_color_map[PsUnsignedIntegerType(16)]
+                return DotContext._dtype_color_map[PsUnsignedIntegerType(16)]
             case PsUnsignedIntegerType(8):
-                return self._dtype_color_map[PsUnsignedIntegerType(8)]
+                return DotContext._dtype_color_map[PsUnsignedIntegerType(8)]
             case _:
-                return self._dtype_color_map["other"]
+                return DotContext._dtype_color_map["other"]
 
 
 class DotAstPrinter:
-- 
GitLab