
# Autogenerated by mlir-tblgen; don't manually edit.

from enum import IntEnum, auto, IntFlag
from ._ods_common import _cext as _ods_cext
from ..ir import register_attribute_builder
_ods_ir = _ods_cext.ir

class LayoutMapOption(IntEnum):
    """option for map layout"""

    InferLayoutMap = 0
    IdentityLayoutMap = 1
    FullyDynamicLayoutMap = 2

    def __str__(self):
        if self is LayoutMapOption.InferLayoutMap:
            return "InferLayoutMap"
        if self is LayoutMapOption.IdentityLayoutMap:
            return "IdentityLayoutMap"
        if self is LayoutMapOption.FullyDynamicLayoutMap:
            return "FullyDynamicLayoutMap"
        raise ValueError("Unknown LayoutMapOption enum entry.")



@register_attribute_builder("LayoutMapOption", allow_existing=True)
def _layoutmapoption(x, context):
    return _ods_ir.IntegerAttr.get(_ods_ir.IntegerType.get_signless(32, context=context), int(x))

