Coverage for src/pystencilssfg/composer/composer.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-04-04 07:16 +0000

1from __future__ import annotations 

2from typing import TYPE_CHECKING 

3 

4from .basic_composer import SfgBasicComposer 

5from .class_composer import SfgClassComposer 

6from .gpu_composer import SfgGpuComposer 

7 

8if TYPE_CHECKING: 

9 from ..context import SfgContext 

10 

11 

12class SfgComposer(SfgBasicComposer, SfgClassComposer, SfgGpuComposer): 

13 """Primary interface for constructing source files in pystencils-sfg. 

14 

15 The SfgComposer combines the `SfgBasicComposer` 

16 for the basic components (kernel namespaces, includes, definitions, and functions) 

17 and the `SfgClassComposer` for constructing ``struct`` s and ``class`` es. 

18 """ 

19 

20 def __init__(self, sfg: SfgContext | SfgBasicComposer): 

21 SfgBasicComposer.__init__(self, sfg) 

22 SfgClassComposer.__init__(self) 

23 SfgGpuComposer.__init__(self)