yaxunl marked 4 inline comments as done.

================
Comment at: lib/Headers/opencl.h:15636-15637
@@ +15635,4 @@
+#if defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ >= 200
+#define PIPE_RESERVE_ID_VALID_BIT (1U << 30)
+#define CLK_NULL_RESERVE_ID 
(__builtin_astype(((void*)(~PIPE_RESERVE_ID_VALID_BIT)), reserve_id_t))
+bool __attribute__((overloadable)) is_valid_reserve_id(reserve_id_t 
reserve_id);
----------------
yaxunl wrote:
> pxli168 wrote:
> > Is this macro needed in this header?
> > And what happens to spir32 and spir64 difference?
> The spec requires to define this macro.
> 
> I agree this definition seems arbitrary since the spec does not define 
> PIPE_RESERVE_ID_VALID_BIT.
> 
> How about
> 
>   // Define an internally used macro for the maximum value of size_t.
>   #if defined(__SPIR32__)
>   #define _SIZET_MAX UINT_MAX
>   #elif defined(__SPIR64__ )
>   #define _SIZET_MAX ULONG_MAX
>   #endif
> 
> and use it for defining CLK_NULL_RESERVE_ID.
Actually there is a predefined macro `__SIZE_MAX__` by Clang which is just for 
this purpose.


http://reviews.llvm.org/D18369



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to