Skip to content

Commit e19e0f7

Browse files
Changes to int values of DeviceType and BackendType enums
DeviceType enums now are [0, 8), BackendType enums have lower 16 bits zero, and span [1<<16, 1<<20)
1 parent bb9022d commit e19e0f7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

dpctl-capi/include/dpctl_sycl_enum_types.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ DPCTL_C_EXTERN_C_BEGIN
3838
enum DPCTLSyclBackendType
3939
{
4040
// clang-format off
41-
DPCTL_CUDA = 1 << 13,
42-
DPCTL_HOST = 1 << 14,
43-
DPCTL_LEVEL_ZERO = 1 << 15,
44-
DPCTL_OPENCL = 1 << 16,
41+
DPCTL_CUDA = 1 << 16,
42+
DPCTL_HOST = 1 << 17,
43+
DPCTL_LEVEL_ZERO = 1 << 18,
44+
DPCTL_OPENCL = 1 << 19,
4545
DPCTL_UNKNOWN_BACKEND = 0,
46-
DPCTL_ALL_BACKENDS = ((1<<10)-1) << 7
46+
DPCTL_ALL_BACKENDS = ((1<<5)-1) << 16
4747
// clang-format on
4848
};
4949

@@ -57,13 +57,13 @@ enum DPCTLSyclDeviceType
5757
// The values should not overlap.
5858

5959
// clang-format off
60-
DPCTL_ACCELERATOR = 1 << 1,
61-
DPCTL_AUTOMATIC = 1 << 2,
62-
DPCTL_CPU = 1 << 3,
63-
DPCTL_CUSTOM = 1 << 4,
64-
DPCTL_GPU = 1 << 5,
65-
DPCTL_HOST_DEVICE = 1 << 6,
66-
DPCTL_ALL = (1 << 7) -1 ,
60+
DPCTL_ACCELERATOR = 1 << 0,
61+
DPCTL_AUTOMATIC = 1 << 1,
62+
DPCTL_CPU = 1 << 2,
63+
DPCTL_CUSTOM = 1 << 3,
64+
DPCTL_GPU = 1 << 4,
65+
DPCTL_HOST_DEVICE = 1 << 5,
66+
DPCTL_ALL = (1 << 6) - 1,
6767
DPCTL_UNKNOWN_DEVICE = 0
6868
// clang-format on
6969
};

0 commit comments

Comments
 (0)