[PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL header file.
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon May 16 10:14:39 PDT 2016
yaxunl added inline comments.
Comment at: lib/Headers/opencl-c.h:17051
@@ +17050,3 @@
+#define CLK_SUCCESS 0
+#define CLK_ENQUEUE_FAILURE -101
+#define CLK_INVALID_QUEUE -102
> yaxunl wrote:
> > Anastasia wrote:
> > > Are those arbitrary taken values I am guessing?
> > How about this?
> > // The value are defined according to their order in the spec.
> > #define CLK_SUCCESS 0
> > #define CLK_ENQUEUE_FAILURE -1
> > #define CLK_INVALID_QUEUE -2
> > #define CLK_INVALID_NDRANGE -3
> > #define CLK_INVALID_EVENT_WAIT_LIST -4
> > #define CLK_DEVICE_QUEUE_FULL -5
> > #define CLK_INVALID_ARG_SIZE -6
> > #define CLK_EVENT_ALLOCATION_FAILURE -8
> > #define CLK_OUT_OF_RESOURCES -9
> These values were taken from the table in section 126.96.36.199 in the SPIR 2.0 provisional spec. Some of the choices seem arbitrary, while others were chosen to match the value of the equivalent runtime API error.
> I imagine changing these values now might cause incompatibilities with existing SPIR consumers?
Then I guess we'd better keep it as is.
More information about the cfe-commits