diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-11-27 17:43:55 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-11-27 19:12:21 +0200 |
commit | 598f25c85793aab78b5ecce733c65a66860d0c5c (patch) | |
tree | 651e800bc1a74263d3bd32ce957ec6492e3e6907 /include/opencl | |
parent | a02a54f51367f276544f45e67023338a32d22ee6 (diff) |
Clean up confusing OpenCL code a bit
Get rid of the silly OpenCLDevice class that had only static members. We can
as well just use namespacing. Remove functions only used internally in
openclwrapper.cxx from the now public openclwrapper.hxx header.
Change-Id: If7336edd262c772564dc13e64113d72d0b52428c
Diffstat (limited to 'include/opencl')
-rw-r--r-- | include/opencl/openclwrapper.hxx | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/include/opencl/openclwrapper.hxx b/include/opencl/openclwrapper.hxx index ba7aada44f14..1a392e53c924 100644 --- a/include/opencl/openclwrapper.hxx +++ b/include/opencl/openclwrapper.hxx @@ -68,25 +68,10 @@ struct GPUEnv bool mnAmdFp64Flag; }; -class OPENCL_DLLPUBLIC OpenCLDevice -{ -public: - static GPUEnv gpuEnv; - static bool bIsInited; - static OString maCacheFolder; - - static bool initOpenCLRunEnv( GPUEnv *gpu ); - static void releaseOpenCLEnv( GPUEnv *gpuInfo ); - static bool initOpenCLRunEnv( int argc ); - static bool generatBinFromKernelSource( cl_program program, const char * clFileName ); - static bool writeBinaryToFile( const OString& rName, const char* birary, size_t numBytes ); - static std::vector<boost::shared_ptr<osl::File> > binaryGenerated( const char * clFileName, cl_context context); - static bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuEnv, const char* filename, int idx); - - static bool initOpenCLAttr( OpenCLEnv * env ); - static void setKernelEnv( KernelEnv *envInfo ); -}; - +extern OPENCL_DLLPUBLIC GPUEnv gpuEnv; +OPENCL_DLLPUBLIC bool generatBinFromKernelSource( cl_program program, const char * clFileName ); +OPENCL_DLLPUBLIC bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuEnv, const char* filename, int idx); +OPENCL_DLLPUBLIC void setKernelEnv( KernelEnv *envInfo ); OPENCL_DLLPUBLIC const std::vector<OpenCLPlatformInfo>& fillOpenCLInfo(); /** |