Deeploy.Targets.MemPool.DataTypes.MemPoolStructDataTypes

class Deeploy.Targets.MemPool.DataTypes.MemPoolStructDataTypes

Bases: object

Methods

__init__() None

__init__()

class ita_quant_t(structDict: str | Struct | Dict[str, BaseType], ctxt: _NetworkContext | None = None)

Bases: Struct

value

the value of the struct; corresponds to an element with type layout defined in cls.structTypeDict

Type:

structTypeDict

classmethod checkPromotion(_other: str | Dict[str, BaseType] | Struct, ctxt: _NetworkContext | None = None)

Checks whether a given Python-typed or Deeploy-typed value can be represented with the Deeploy type

Parameters:
  • value (Union[_PythonType, _DeeployType]) – Python-typed or Deeploy-typed value to be checked for promotion to cls

  • ctxt (Optional[_NetworkContext]) – Current NetworkContext

Returns:

Returns true if the value can be promoted to cls

Return type:

bool

classmethod checkValue(value: str | Dict[str, BaseType], ctxt: _NetworkContext | None = None)

Checks whether a given Python-type value (usually FP64) can be represented with a Deeploy type

Parameters:
  • value (_PythonType) – Python-typed value to check

  • ctxt (Optional[_NetworkContext]) – Current NetworkContext

Returns:

Returns true if value can represented by cls

Return type:

bool

structTypeDict: Dict[str, Type[BaseType]] = {'add': <class 'Deeploy.AbstractDataTypes.int32_tPtr'>, 'eps_mult': <class 'Deeploy.AbstractDataTypes.uint8_tPtr'>, 'right_shift': <class 'Deeploy.AbstractDataTypes.uint8_tPtr'>}

The definition of the struct mapping its field names to their associated Deeploy-types

Type:

Dict[str, Type[BaseType]]

typeName: str = 'ita_quant_t'

The C typename of this type

Type:

str

typeWidth: int = 96

the number of BITS to be assigned to the type

Type:

int