Skip to content

Commit cd66cfd

Browse files
committed
WIP for DpctlSyclQueue support
1 parent 4c18ebd commit cd66cfd

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

numba_dpex/core/datamodel/models.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44

55
from numba.core import datamodel, types
66
from numba.core.datamodel.models import ArrayModel as DpnpNdArrayModel
7-
from numba.core.datamodel.models import OpaqueModel, PrimitiveModel, StructModel
7+
from numba.core.datamodel.models import (
8+
ListModel,
9+
OpaqueModel,
10+
PrimitiveModel,
11+
StructModel,
12+
)
813
from numba.core.extending import register_model
914

1015
from numba_dpex.utils import address_space
@@ -54,6 +59,21 @@ def __init__(self, dmm, fe_type):
5459
super(ArrayModel, self).__init__(dmm, fe_type, members)
5560

5661

62+
class ExecutionQueueModel(ListModel):
63+
def __init__(self, dmm, fe_type):
64+
members = [
65+
(
66+
"meminfo",
67+
types.CPointer(fe_type.dtype, addrspace=fe_type.addrspace),
68+
),
69+
(
70+
"parent",
71+
types.CPointer(fe_type.dtype, addrspace=fe_type.addrspace),
72+
),
73+
]
74+
super(ExecutionQueueModel, self).__init__(dmm, fe_type, members)
75+
76+
5777
def _init_data_model_manager():
5878
dmm = datamodel.default_manager.copy()
5979
dmm.register(types.CPointer, GenericPointerModel)

0 commit comments

Comments
 (0)