|
@@ -12,12 +12,6 @@
|
|
|
/// To use it, just #include <bx/cl.h> without defining BX_CL_IMPLEMENTATION.
|
|
/// To use it, just #include <bx/cl.h> without defining BX_CL_IMPLEMENTATION.
|
|
|
/// To load dynamic library call bx::clLoad(), to unload it call bx::clUnload.
|
|
/// 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
|
|
namespace bx
|
|
|
{
|
|
{
|
|
|
/// Load OpenCL dynamic library.
|
|
/// Load OpenCL dynamic library.
|
|
@@ -31,10 +25,15 @@ namespace bx
|
|
|
///
|
|
///
|
|
|
/// Returns internal reference count. When reference count reaches 0
|
|
/// Returns internal reference count. When reference count reaches 0
|
|
|
/// library is fully unloaded.
|
|
/// library is fully unloaded.
|
|
|
|
|
+ ///
|
|
|
int32_t clUnload();
|
|
int32_t clUnload();
|
|
|
|
|
|
|
|
} // namespace bx
|
|
} // 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
|
|
#ifndef __OPENCL_CL_H
|
|
|
#define __OPENCL_CL_H
|
|
#define __OPENCL_CL_H
|
|
|
|
|
|
|
@@ -829,6 +828,8 @@ BX_CL_IMPORT_ALL
|
|
|
#undef BX_CL_IMPORT
|
|
#undef BX_CL_IMPORT
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+#include "os.h"
|
|
|
|
|
+
|
|
|
namespace bx
|
|
namespace bx
|
|
|
{
|
|
{
|
|
|
struct OpenCLContext
|
|
struct OpenCLContext
|