Skip to content

Documentation for type.py

titan.common.type

DataType

Bases: Enum

Enum to map primative (Python) datatypes onto more abstract keys.

Source code in titan/common/type.py
3
4
5
6
7
8
9
class DataType(Enum):
    """ Enum to map primative (Python) datatypes onto more abstract keys."""
    VOID = auto()
    NONE = None
    INTEGER = int
    FLOAT = float
    BOOLEAN = bool

StorageType

Bases: Enum

Enum to define an analog to SPIR-V's own storage operations.

This is required because SPIR-V can define variables as being inputs or outputs, or function variables depending on where they are declared. It's important to keep track of these so that the generated SPIR-V is correct.

Source code in titan/common/type.py
11
12
13
14
15
16
17
18
19
20
21
class StorageType(Enum):
    """ Enum to define an analog to SPIR-V's own storage operations.

        This is required because SPIR-V can define variables as being inputs or outputs, or function variables
        depending on where they are declared. It's important to keep track of these so that the generated SPIR-V
        is correct.
    """
    IN = "Input"
    OUT = "Output"
    FUNCTION_VAR = "Function"
    NONE = auto()

Last update: 2023-12-24