numba_dpex.core.types.kernel_api.literal_intenum

Definition of a new Literal type in numba-dpex that allows treating IntEnum members as integer literals inside a JIT compiled function.

Overview

Classes

IntEnumLiteral

A Literal type for IntEnum objects. The type contains the original Python

Function

box_literal_integer(typ, val, ctx)

Defines how a Numba representation for an IntEnumLiteral object should

Classes

class IntEnumLiteral(value)

Bases: numba.core.types.Literal, numba.core.types.Integer

A Literal type for IntEnum objects. The type contains the original Python value of the IntEnum class in it.

Overview

Methods

can_convert_to(typingctx, other)

Check whether this type can be converted to the other.

Members

can_convert_to(typingctx, other) bool

Check whether this type can be converted to the other. If successful, must return a string describing the conversion, e.g. “exact”, “promote”, “unsafe”, “safe”; otherwise None is returned.

Functions

box_literal_integer(typ, val, ctx)

Defines how a Numba representation for an IntEnumLiteral object should be converted to a PyObject* object and returned back to Python.