Skip to content

Commit 3b842ad

Browse files
Reordered DPCTL_USM_HOST and DPCTL_USM_SHARED
DEVICE<SHARED<HOST
1 parent 4ed654f commit 3b842ad

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

dpctl/_backend.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ cdef extern from "syclinterface/dpctl_sycl_enum_types.h":
3737
ctypedef enum _usm_type 'DPCTLSyclUSMType':
3838
_USM_UNKNOWN 'DPCTL_USM_UNKNOWN'
3939
_USM_DEVICE 'DPCTL_USM_DEVICE'
40-
_USM_HOST 'DPCTL_USM_HOST'
4140
_USM_SHARED 'DPCTL_USM_SHARED'
41+
_USM_HOST 'DPCTL_USM_HOST'
4242

4343
ctypedef enum _backend_type 'DPCTLSyclBackendType':
4444
_ALL_BACKENDS 'DPCTL_ALL_BACKENDS'

dpctl/enum_types.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,14 @@ class global_mem_cache_type(Enum):
113113
none = auto()
114114
read_only = auto()
115115
read_write = auto()
116+
117+
118+
class usm_type(Enum):
119+
"""
120+
An enumeration of USM allocation types.
121+
"""
122+
123+
unknown = auto()
124+
device = auto()
125+
shared = auto()
126+
host = auto()

libsyclinterface/include/dpctl_sycl_enum_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ typedef enum
3939
{
4040
DPCTL_USM_UNKNOWN = 0,
4141
DPCTL_USM_DEVICE,
42-
DPCTL_USM_HOST,
43-
DPCTL_USM_SHARED
42+
DPCTL_USM_SHARED,
43+
DPCTL_USM_HOST
4444
} DPCTLSyclUSMType;
4545

4646
/*!

0 commit comments

Comments
 (0)