cl.hpp always wraps functions from cl.h which are only declared with CL_USE_DEPRECATED_OPENCL_1_1_APIS

Bug #1071239 reported by Václav Šmilauer
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
khronos-opencl-headers (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

CL/cl.hpp declares wrappers around functions from CL/cl.h. Some of those functions are only declared when CL_USE_DEPRECATED_OPENCL_1_1_APIS is #defined.

For example, CL/cl.hpp: 1603:

    static inline cl_int
    UnloadCompiler()
    {
        return ::clUnloadCompiler();
    }

but CL/cl.h:1192 declareds ::clUnloadCompiler:

    #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
        /* ... */
        extern CL_API_ENTRY cl_int CL_API_CALL
        clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
        /* ... */
    #endif

This is the result of compiling the CL/cl.hpp header directly:

$ g++ -x c++ /usr/include/CL/cl.hpp
/usr/include/CL/cl.hpp: In function ‘cl_int cl::UnloadCompiler()’:
/usr/include/CL/cl.hpp:1606:12: error: ‘::clUnloadCompiler’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image2D::Image2D(const cl::Context&, cl_mem_flags, cl::ImageFormat, size_t, size_t, size_t, void*, cl_int*)’:
/usr/include/CL/cl.hpp:2365:19: error: ‘::clCreateImage2D’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image2DGL::Image2DGL(const cl::Context&, cl_mem_flags, GLenum, GLint, GLuint, cl_int*)’:
/usr/include/CL/cl.hpp:2410:19: error: ‘::clCreateFromGLTexture2D’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image3D::Image3D(const cl::Context&, cl_mem_flags, cl::ImageFormat, size_t, size_t, size_t, size_t, size_t, void*, cl_int*)’:
/usr/include/CL/cl.hpp:2464:19: error: ‘::clCreateImage3D’ has not been declared
/usr/include/CL/cl.hpp: In constructor ‘cl::Image3DGL::Image3DGL(const cl::Context&, cl_mem_flags, GLenum, GLint, GLuint, cl_int*)’:
/usr/include/CL/cl.hpp:2510:19: error: ‘::clCreateFromGLTexture3D’ has not been declared
/usr/include/CL/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueMarker(cl::Event*) const’:
/usr/include/CL/cl.hpp:3745:13: error: ‘::clEnqueueMarker’ has not been declared
/usr/include/CL/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueWaitForEvents(const std::vector<cl::Event>&) const’:
/usr/include/CL/cl.hpp:3752:13: error: ‘::clEnqueueWaitForEvents’ has not been declared
/usr/include/CL/cl.hpp: In member function ‘cl_int cl::CommandQueue::enqueueBarrier() const’:
/usr/include/CL/cl.hpp:3867:13: error: ‘::clEnqueueBarrier’ has not been declared

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: opencl-headers 1.2-2012.04.18a-1
ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
Uname: Linux 3.5.0-17-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.6.1-0ubuntu3
Architecture: amd64
Date: Thu Oct 25 11:48:22 2012
Dependencies:

PackageArchitecture: all
SourcePackage: khronos-opencl-headers
UpgradeStatus: Upgraded to quantal on 2012-03-12 (226 days ago)

Revision history for this message
Václav Šmilauer (eudoxos) wrote :
summary: cl.hpp always wraps functions from cl.h which are only declared with
- feature macros
+ CL_USE_DEPRECATED_OPENCL_1_1_APIS
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in khronos-opencl-headers (Ubuntu):
status: New → Confirmed
Revision history for this message
Graham Inggs (ginggs) wrote :

Fix released in Debian version 1.2-2012.11.30-1 and 1.2-2013.06.28-2 in Saucy.

Changed in khronos-opencl-headers (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.