From 598f25c85793aab78b5ecce733c65a66860d0c5c Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 27 Nov 2014 17:43:55 +0200 Subject: 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 --- include/opencl/openclwrapper.hxx | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'include/opencl') 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 > 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& fillOpenCLInfo(); /** -- cgit