KhronosGroup / OpenCL-Headers

Khronos OpenCL-Headers
Apache License 2.0
666 stars 236 forks source link

how can i generate libOpenCL.so #173

Open mittkongg opened 3 years ago

mittkongg commented 3 years ago

some runtime func need load like extern CL_RUNTIME_EXPORT cl_int (CL_API_CALLclGetPlatformIDs)(cl_uint, cl_platform_id, cl_uint); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALLclGetPlatformInfo)(cl_platform_id, cl_platform_info, size_t, void, size_t); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALLclGetProgramBuildInfo)(cl_program, cl_device_id, cl_program_build_info, size_t, void, size_t); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALLclGetProgramInfo)(cl_program, cl_program_info, size_t, void, size_t); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALLclGetSamplerInfo)(cl_sampler, cl_sampler_info, size_t, void, size_t); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALLclGetSupportedImageFormats)(cl_context, cl_mem_flags, cl_mem_object_type, cl_uint, cl_image_format, cl_uint); extern CL_RUNTIME_EXPORT cl_program (CL_API_CALLclLinkProgram)(cl_context, cl_uint, const cl_device_id, const char, cl_uint, const cl_program, void (CL_CALLBACK) (cl_program, void), void, cl_int); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseCommandQueue)(cl_command_queue);

bashbaug commented 3 years ago

Hello, if you want to build a libOpenCL.so you can do so from either the Khronos OpenCL-ICD-Loader repo or the ocl-icd repo.

The OpenCL SDK demonstrates how to use the OpenCL-Headers and OpenCL-ICD-Loader together to build OpenCL applications.

Note that many Linux distributions provide packages with libOpenCL.so if you don't want to build it yourself.

mittkongg commented 3 years ago

Hello, if you want to build a libOpenCL.so you can do so from either the Khronos OpenCL-ICD-Loader repo or the ocl-icd repo.

The OpenCL SDK demonstrates how to use the OpenCL-Headers and OpenCL-ICD-Loader together to build OpenCL applications.

Note that many Linux distributions provide packages with libOpenCL.so if you don't want to build it yourself.

thanks reply , i get it