From 8a651aa4e3d467f66b1f036dbf83afbcff734728 Mon Sep 17 00:00:00 2001
From: Stephan Seitz <stephan.seitz@fau.de>
Date: Fri, 12 Jul 2019 18:01:10 +0200
Subject: [PATCH] Make CUDA a language (not only a dialect :wink:)

---
 pystencils/backends/cuda_backend.py           | 1 +
 pystencils_tests/test_cuda_known_functions.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/pystencils/backends/cuda_backend.py b/pystencils/backends/cuda_backend.py
index e9a78160d..15fbde91d 100644
--- a/pystencils/backends/cuda_backend.py
+++ b/pystencils/backends/cuda_backend.py
@@ -58,6 +58,7 @@ class CudaBackend(CBackend):
 
 
 class CudaSympyPrinter(CustomSympyPrinter):
+    language = "CUDA"
 
     def __init__(self):
         super(CudaSympyPrinter, self).__init__()
diff --git a/pystencils_tests/test_cuda_known_functions.py b/pystencils_tests/test_cuda_known_functions.py
index ca0d12053..c249c144b 100644
--- a/pystencils_tests/test_cuda_known_functions.py
+++ b/pystencils_tests/test_cuda_known_functions.py
@@ -55,7 +55,7 @@ def test_cuda_unknown():
     ast = pystencils.create_kernel(assignments, 'gpu')
     code = str(pystencils.show_code(ast))
     print(code)
-    assert "Not supported" in code
+    assert "Not supported in CUDA" in code
 
 
 def main():
-- 
GitLab