
''' Generated by OTF2 Template Engine '''

import ctypes

from .Config import EnumBase, EnumBitset

VERSION_MAJOR = 3
VERSION_MINOR = 0
VERSION_BUGFIX = 2
VERSION_SUFFIX = ""
VERSION = "3.0.2"

# Symbols for undefined values

UNDEFINED_UINT8 = ctypes.c_uint8(-1)
UNDEFINED_INT8 = ctypes.c_int8(0x80)
UNDEFINED_UINT16 = ctypes.c_uint16(-1)
UNDEFINED_INT16 = ctypes.c_int16(0x8000)
UNDEFINED_UINT32 = ctypes.c_uint32(-1)
UNDEFINED_INT32 = ctypes.c_int32(0x80000000)
UNDEFINED_UINT64 = ctypes.c_uint64(-1)
UNDEFINED_INT64 = ctypes.c_int64(0x8000000000000000)

UNDEFINED_TYPE = UNDEFINED_UINT8

# Handle Typedefs

TimeStamp = ctypes.c_uint64
UNDEFINED_TIMESTAMP = UNDEFINED_UINT64

IoParadigmRef = ctypes.c_uint8
UNDEFINED_IO_PARADIGM = IoParadigmRef(UNDEFINED_UINT8.value)

StringRef = ctypes.c_uint32
UNDEFINED_STRING = StringRef(UNDEFINED_UINT32.value)

AttributeRef = ctypes.c_uint32
UNDEFINED_ATTRIBUTE = AttributeRef(UNDEFINED_UINT32.value)

SystemTreeNodeRef = ctypes.c_uint32
UNDEFINED_SYSTEM_TREE_NODE = SystemTreeNodeRef(UNDEFINED_UINT32.value)

LocationGroupRef = ctypes.c_uint32
UNDEFINED_LOCATION_GROUP = LocationGroupRef(UNDEFINED_UINT32.value)

LocationRef = ctypes.c_uint64
UNDEFINED_LOCATION = LocationRef(UNDEFINED_UINT64.value)

RegionRef = ctypes.c_uint32
UNDEFINED_REGION = RegionRef(UNDEFINED_UINT32.value)

CallsiteRef = ctypes.c_uint32
UNDEFINED_CALLSITE = CallsiteRef(UNDEFINED_UINT32.value)

CallpathRef = ctypes.c_uint32
UNDEFINED_CALLPATH = CallpathRef(UNDEFINED_UINT32.value)

GroupRef = ctypes.c_uint32
UNDEFINED_GROUP = GroupRef(UNDEFINED_UINT32.value)

MetricMemberRef = ctypes.c_uint32
UNDEFINED_METRIC_MEMBER = MetricMemberRef(UNDEFINED_UINT32.value)

MetricRef = ctypes.c_uint32
UNDEFINED_METRIC = MetricRef(UNDEFINED_UINT32.value)

CommRef = ctypes.c_uint32
UNDEFINED_COMM = CommRef(UNDEFINED_UINT32.value)

ParameterRef = ctypes.c_uint32
UNDEFINED_PARAMETER = ParameterRef(UNDEFINED_UINT32.value)

RmaWinRef = ctypes.c_uint32
UNDEFINED_RMA_WIN = RmaWinRef(UNDEFINED_UINT32.value)

CartDimensionRef = ctypes.c_uint32
UNDEFINED_CART_DIMENSION = CartDimensionRef(UNDEFINED_UINT32.value)

CartTopologyRef = ctypes.c_uint32
UNDEFINED_CART_TOPOLOGY = CartTopologyRef(UNDEFINED_UINT32.value)

SourceCodeLocationRef = ctypes.c_uint32
UNDEFINED_SOURCE_CODE_LOCATION = SourceCodeLocationRef(UNDEFINED_UINT32.value)

CallingContextRef = ctypes.c_uint32
UNDEFINED_CALLING_CONTEXT = CallingContextRef(UNDEFINED_UINT32.value)

InterruptGeneratorRef = ctypes.c_uint32
UNDEFINED_INTERRUPT_GENERATOR = InterruptGeneratorRef(UNDEFINED_UINT32.value)

IoFileRef = ctypes.c_uint32
UNDEFINED_IO_FILE = IoFileRef(UNDEFINED_UINT32.value)

IoHandleRef = ctypes.c_uint32
UNDEFINED_IO_HANDLE = IoHandleRef(UNDEFINED_UINT32.value)

CHUNK_SIZE_MIN = ctypes.c_uint64(256 * 1024)

CHUNK_SIZE_MAX = ctypes.c_uint64(1024 * 1024 * 16)

class FileMode(EnumBase, ctypes.c_uint8):
    pass

FILEMODE_WRITE = FileMode._construct(0, "WRITE")
FILEMODE_READ = FileMode._construct(1, "READ")
FILEMODE_MODIFY = FileMode._construct(2, "MODIFY")

class Compression(EnumBase, ctypes.c_uint8):
    pass

COMPRESSION_UNDEFINED = Compression._construct(0, "UNDEFINED")
COMPRESSION_NONE = Compression._construct(1, "NONE")
COMPRESSION_ZLIB = Compression._construct(2, "ZLIB")

# CallbackCode is even an enum on the C-Side
# usually used as return value, evtl. should be a restype method?
class CallbackCode(EnumBase, ctypes.c_int):
    pass

CALLBACK_SUCCESS = CallbackCode._construct(0, "SUCCESS")
CALLBACK_INTERRUPT = CallbackCode._construct(1, "INTERRUPT")
CALLBACK_ERROR = CallbackCode._construct(1, "ERROR")

class FlushType(EnumBase, ctypes.c_uint8):
    pass

NO_FLUSH = FlushType._construct(0, "NO_FLUSH")
FLUSH = FlushType._construct(1, "FLUSH")

class Hint(EnumBase, ctypes.c_uint8):
    pass

HINT_GLOBAL_READER = Hint._construct(0, "GLOBAL_READER")

class Boolean(EnumBase, ctypes.c_uint8):
    pass

FALSE = Boolean._construct(0, "FALSE")

class FileType(EnumBase, ctypes.c_uint8):
    pass

FILETYPE_ANCHOR = FileType._construct(0, "ANCHOR")
FILETYPE_GLOBAL_DEFS = FileType._construct(1, "GLOBAL_DEFS")
FILETYPE_LOCAL_DEFS = FileType._construct(2, "LOCAL_DEFS")
FILETYPE_EVENTS = FileType._construct(3, "EVENTS")
FILETYPE_SNAPSHOTS = FileType._construct(4, "SNAPSHOTS")
FILETYPE_THUMBNAIL = FileType._construct(5, "THUMBNAIL")
FILETYPE_MARKER = FileType._construct(6, "MARKER")
FILETYPE_SIONRANKMAP = FileType._construct(7, "SIONRANKMAP")

class FileSubstrate(EnumBase, ctypes.c_uint8):
    pass

SUBSTRATE_UNDEFINED = FileSubstrate._construct(0, "UNDEFINED")
SUBSTRATE_POSIX = FileSubstrate._construct(1, "POSIX")
SUBSTRATE_SION = FileSubstrate._construct(2, "SION")
SUBSTRATE_NONE = FileSubstrate._construct(3, "NONE")

class MappingType(EnumBase, ctypes.c_uint8):
    pass

MAPPING_STRING = MappingType._construct(0, "STRING")
MAPPING_ATTRIBUTE = MappingType._construct(1, "ATTRIBUTE")
MAPPING_LOCATION = MappingType._construct(2, "LOCATION")
MAPPING_REGION = MappingType._construct(3, "REGION")
MAPPING_GROUP = MappingType._construct(4, "GROUP")
MAPPING_METRIC = MappingType._construct(5, "METRIC")
MAPPING_COMM = MappingType._construct(6, "COMM")
MAPPING_PARAMETER = MappingType._construct(7, "PARAMETER")
MAPPING_RMA_WIN = MappingType._construct(8, "RMA_WIN")
MAPPING_SOURCE_CODE_LOCATION = MappingType._construct(9, "SOURCE_CODE_LOCATION")
MAPPING_CALLING_CONTEXT = MappingType._construct(10, "CALLING_CONTEXT")
MAPPING_INTERRUPT_GENERATOR = MappingType._construct(11, "INTERRUPT_GENERATOR")
MAPPING_IO_FILE = MappingType._construct(12, "IO_FILE")
MAPPING_IO_HANDLE = MappingType._construct(13, "IO_HANDLE")
MAPPING_LOCATION_GROUP = MappingType._construct(14, "LOCATION_GROUP")
MAPPING_MAX = MappingType(15)

class Type(EnumBase, ctypes.c_uint8):
    pass

TYPE_NONE = Type._construct(0, "NONE")
TYPE_UINT8 = Type._construct(1, "UINT8")
TYPE_UINT16 = Type._construct(2, "UINT16")
TYPE_UINT32 = Type._construct(3, "UINT32")
TYPE_UINT64 = Type._construct(4, "UINT64")
TYPE_INT8 = Type._construct(5, "INT8")
TYPE_INT16 = Type._construct(6, "INT16")
TYPE_INT32 = Type._construct(7, "INT32")
TYPE_INT64 = Type._construct(8, "INT64")
TYPE_FLOAT = Type._construct(9, "FLOAT")
TYPE_DOUBLE = Type._construct(10, "DOUBLE")
TYPE_STRING = Type._construct(11, "STRING")
TYPE_ATTRIBUTE = Type._construct(12, "ATTRIBUTE")
TYPE_LOCATION = Type._construct(13, "LOCATION")
TYPE_REGION = Type._construct(14, "REGION")
TYPE_GROUP = Type._construct(15, "GROUP")
TYPE_METRIC = Type._construct(16, "METRIC")
TYPE_COMM = Type._construct(17, "COMM")
TYPE_PARAMETER = Type._construct(18, "PARAMETER")
TYPE_RMA_WIN = Type._construct(19, "RMA_WIN")
TYPE_SOURCE_CODE_LOCATION = Type._construct(20, "SOURCE_CODE_LOCATION")
TYPE_CALLING_CONTEXT = Type._construct(21, "CALLING_CONTEXT")
TYPE_INTERRUPT_GENERATOR = Type._construct(22, "INTERRUPT_GENERATOR")
TYPE_IO_FILE = Type._construct(23, "IO_FILE")
TYPE_IO_HANDLE = Type._construct(24, "IO_HANDLE")
TYPE_LOCATION_GROUP = Type._construct(25, "LOCATION_GROUP")

class Paradigm(EnumBase, ctypes.c_uint8):
    pass

PARADIGM_UNKNOWN = Paradigm._construct(0, "UNKNOWN")
PARADIGM_USER = Paradigm._construct(1, "USER")
PARADIGM_COMPILER = Paradigm._construct(2, "COMPILER")
PARADIGM_OPENMP = Paradigm._construct(3, "OPENMP")
PARADIGM_MPI = Paradigm._construct(4, "MPI")
PARADIGM_CUDA = Paradigm._construct(5, "CUDA")
PARADIGM_MEASUREMENT_SYSTEM = Paradigm._construct(6, "MEASUREMENT_SYSTEM")
PARADIGM_PTHREAD = Paradigm._construct(7, "PTHREAD")
PARADIGM_HMPP = Paradigm._construct(8, "HMPP")
PARADIGM_OMPSS = Paradigm._construct(9, "OMPSS")
PARADIGM_HARDWARE = Paradigm._construct(10, "HARDWARE")
PARADIGM_GASPI = Paradigm._construct(11, "GASPI")
PARADIGM_UPC = Paradigm._construct(12, "UPC")
PARADIGM_SHMEM = Paradigm._construct(13, "SHMEM")
PARADIGM_WINTHREAD = Paradigm._construct(14, "WINTHREAD")
PARADIGM_QTTHREAD = Paradigm._construct(15, "QTTHREAD")
PARADIGM_ACETHREAD = Paradigm._construct(16, "ACETHREAD")
PARADIGM_TBBTHREAD = Paradigm._construct(17, "TBBTHREAD")
PARADIGM_OPENACC = Paradigm._construct(18, "OPENACC")
PARADIGM_OPENCL = Paradigm._construct(19, "OPENCL")
PARADIGM_MTAPI = Paradigm._construct(20, "MTAPI")
PARADIGM_SAMPLING = Paradigm._construct(21, "SAMPLING")
PARADIGM_NONE = Paradigm._construct(22, "NONE")
PARADIGM_HIP = Paradigm._construct(23, "HIP")
PARADIGM_KOKKOS = Paradigm._construct(24, "KOKKOS")

class ParadigmClass(EnumBase, ctypes.c_uint8):
    pass

PARADIGM_CLASS_PROCESS = ParadigmClass._construct(0, "PROCESS")
PARADIGM_CLASS_THREAD_FORK_JOIN = ParadigmClass._construct(1, "THREAD_FORK_JOIN")
PARADIGM_CLASS_THREAD_CREATE_WAIT = ParadigmClass._construct(2, "THREAD_CREATE_WAIT")
PARADIGM_CLASS_ACCELERATOR = ParadigmClass._construct(3, "ACCELERATOR")

class ParadigmProperty(EnumBase, ctypes.c_uint8):
    pass

PARADIGM_PROPERTY_COMM_NAME_TEMPLATE = ParadigmProperty._construct(0, "COMM_NAME_TEMPLATE")
PARADIGM_PROPERTY_RMA_WIN_NAME_TEMPLATE = ParadigmProperty._construct(1, "RMA_WIN_NAME_TEMPLATE")
PARADIGM_PROPERTY_RMA_ONLY = ParadigmProperty._construct(2, "RMA_ONLY")

class ThumbnailType(EnumBase, ctypes.c_uint8):
    pass

THUMBNAIL_TYPE_REGION = ThumbnailType._construct(0, "REGION")
THUMBNAIL_TYPE_METRIC = ThumbnailType._construct(1, "METRIC")
THUMBNAIL_TYPE_ATTRIBUTES = ThumbnailType._construct(2, "ATTRIBUTES")


TRUE = Boolean._construct(1, "TRUE")

__all__ = [
    'VERSION_MAJOR',
    'VERSION_MINOR',
    'VERSION_BUGFIX',
    'VERSION_SUFFIX',
    'VERSION',
    'UNDEFINED_UINT8',
    'UNDEFINED_INT8',
    'UNDEFINED_UINT16',
    'UNDEFINED_INT16',
    'UNDEFINED_UINT32',
    'UNDEFINED_INT32',
    'UNDEFINED_UINT64',
    'UNDEFINED_INT64',
    'UNDEFINED_TYPE',
    'TimeStamp',
    'UNDEFINED_TIMESTAMP',
    'IoParadigmRef',
    'UNDEFINED_IO_PARADIGM',
    'StringRef',
    'UNDEFINED_STRING',
    'AttributeRef',
    'UNDEFINED_ATTRIBUTE',
    'SystemTreeNodeRef',
    'UNDEFINED_SYSTEM_TREE_NODE',
    'LocationGroupRef',
    'UNDEFINED_LOCATION_GROUP',
    'LocationRef',
    'UNDEFINED_LOCATION',
    'RegionRef',
    'UNDEFINED_REGION',
    'CallsiteRef',
    'UNDEFINED_CALLSITE',
    'CallpathRef',
    'UNDEFINED_CALLPATH',
    'GroupRef',
    'UNDEFINED_GROUP',
    'MetricMemberRef',
    'UNDEFINED_METRIC_MEMBER',
    'MetricRef',
    'UNDEFINED_METRIC',
    'CommRef',
    'UNDEFINED_COMM',
    'ParameterRef',
    'UNDEFINED_PARAMETER',
    'RmaWinRef',
    'UNDEFINED_RMA_WIN',
    'CartDimensionRef',
    'UNDEFINED_CART_DIMENSION',
    'CartTopologyRef',
    'UNDEFINED_CART_TOPOLOGY',
    'SourceCodeLocationRef',
    'UNDEFINED_SOURCE_CODE_LOCATION',
    'CallingContextRef',
    'UNDEFINED_CALLING_CONTEXT',
    'InterruptGeneratorRef',
    'UNDEFINED_INTERRUPT_GENERATOR',
    'IoFileRef',
    'UNDEFINED_IO_FILE',
    'IoHandleRef',
    'UNDEFINED_IO_HANDLE',
    'CHUNK_SIZE_MIN',
    'CHUNK_SIZE_MAX',
    'FileMode',
    'FILEMODE_WRITE',
    'FILEMODE_READ',
    'FILEMODE_MODIFY',
    'Compression',
    'COMPRESSION_UNDEFINED',
    'COMPRESSION_NONE',
    'COMPRESSION_ZLIB',
    'CallbackCode',
    'CALLBACK_SUCCESS',
    'CALLBACK_INTERRUPT',
    'CALLBACK_ERROR',
    'FlushType',
    'NO_FLUSH',
    'FLUSH',
    'Boolean',
    'FALSE',
    'TRUE',
    'FileType',
    'FILETYPE_ANCHOR',
    'FILETYPE_GLOBAL_DEFS',
    'FILETYPE_LOCAL_DEFS',
    'FILETYPE_EVENTS',
    'FILETYPE_SNAPSHOTS',
    'FILETYPE_THUMBNAIL',
    'FILETYPE_MARKER',
    'FILETYPE_SIONRANKMAP',
    'FileSubstrate',
    'SUBSTRATE_UNDEFINED',
    'SUBSTRATE_POSIX',
    'SUBSTRATE_SION',
    'SUBSTRATE_NONE',
    'MappingType',
    'MAPPING_STRING',
    'MAPPING_ATTRIBUTE',
    'MAPPING_LOCATION',
    'MAPPING_REGION',
    'MAPPING_GROUP',
    'MAPPING_METRIC',
    'MAPPING_COMM',
    'MAPPING_PARAMETER',
    'MAPPING_RMA_WIN',
    'MAPPING_SOURCE_CODE_LOCATION',
    'MAPPING_CALLING_CONTEXT',
    'MAPPING_INTERRUPT_GENERATOR',
    'MAPPING_IO_FILE',
    'MAPPING_IO_HANDLE',
    'MAPPING_LOCATION_GROUP',
    'MAPPING_MAX',
    'Type',
    'TYPE_NONE',
    'TYPE_UINT8',
    'TYPE_UINT16',
    'TYPE_UINT32',
    'TYPE_UINT64',
    'TYPE_INT8',
    'TYPE_INT16',
    'TYPE_INT32',
    'TYPE_INT64',
    'TYPE_FLOAT',
    'TYPE_DOUBLE',
    'TYPE_STRING',
    'TYPE_ATTRIBUTE',
    'TYPE_LOCATION',
    'TYPE_REGION',
    'TYPE_GROUP',
    'TYPE_METRIC',
    'TYPE_COMM',
    'TYPE_PARAMETER',
    'TYPE_RMA_WIN',
    'TYPE_SOURCE_CODE_LOCATION',
    'TYPE_CALLING_CONTEXT',
    'TYPE_INTERRUPT_GENERATOR',
    'TYPE_IO_FILE',
    'TYPE_IO_HANDLE',
    'TYPE_LOCATION_GROUP',
    'Paradigm',
    'PARADIGM_UNKNOWN',
    'PARADIGM_USER',
    'PARADIGM_COMPILER',
    'PARADIGM_OPENMP',
    'PARADIGM_MPI',
    'PARADIGM_CUDA',
    'PARADIGM_MEASUREMENT_SYSTEM',
    'PARADIGM_PTHREAD',
    'PARADIGM_HMPP',
    'PARADIGM_OMPSS',
    'PARADIGM_HARDWARE',
    'PARADIGM_GASPI',
    'PARADIGM_UPC',
    'PARADIGM_SHMEM',
    'PARADIGM_WINTHREAD',
    'PARADIGM_QTTHREAD',
    'PARADIGM_ACETHREAD',
    'PARADIGM_TBBTHREAD',
    'PARADIGM_OPENACC',
    'PARADIGM_OPENCL',
    'PARADIGM_MTAPI',
    'PARADIGM_SAMPLING',
    'PARADIGM_NONE',
    'PARADIGM_HIP',
    'PARADIGM_KOKKOS',
    'ParadigmClass',
    'PARADIGM_CLASS_PROCESS',
    'PARADIGM_CLASS_THREAD_FORK_JOIN',
    'PARADIGM_CLASS_THREAD_CREATE_WAIT',
    'PARADIGM_CLASS_ACCELERATOR',
    'ParadigmProperty',
    'PARADIGM_PROPERTY_COMM_NAME_TEMPLATE',
    'PARADIGM_PROPERTY_RMA_WIN_NAME_TEMPLATE',
    'PARADIGM_PROPERTY_RMA_ONLY',
    'ThumbnailType',
    'THUMBNAIL_TYPE_REGION',
    'THUMBNAIL_TYPE_METRIC',
    'THUMBNAIL_TYPE_ATTRIBUTES',
    'Hint',
    'HINT_GLOBAL_READER'
]
