diff --git a/include/bx/cl.h b/include/bx/cl.h index 3a524f9..0514950 100644 --- a/include/bx/cl.h +++ b/include/bx/cl.h @@ -12,12 +12,6 @@ /// To use it, just #include without defining BX_CL_IMPLEMENTATION. /// To load dynamic library call bx::clLoad(), to unload it call bx::clUnload. -#if defined(BX_CL_IMPLEMENTATION) && defined(__OPENCL_CL_H) -# error message("CL/cl.h is already included.") -#endif // defined(BX_CL_IMPLEMENTATION) && defined(__OPENCL_CL_H) - -#include "os.h" - namespace bx { /// Load OpenCL dynamic library. @@ -31,10 +25,15 @@ namespace bx /// /// Returns internal reference count. When reference count reaches 0 /// library is fully unloaded. + /// int32_t clUnload(); } // namespace bx +#if defined(BX_CL_IMPLEMENTATION) && defined(__OPENCL_CL_H) +# error message("CL/cl.h is already included, it cannot be included before bx/cl.h header when BX_CL_IMPLEMENTATION is defined!") +#endif // defined(BX_CL_IMPLEMENTATION) && defined(__OPENCL_CL_H) + #ifndef __OPENCL_CL_H #define __OPENCL_CL_H @@ -829,6 +828,8 @@ BX_CL_IMPORT_ALL #undef BX_CL_IMPORT }; +#include "os.h" + namespace bx { struct OpenCLContext