Results 1 to 2 of 2

Thread: New bug in C++ binding in cl::LinkProgram.

  1. #1
    Newbie
    Join Date
    Dec 2013
    Posts
    2

    New bug in C++ binding in cl::LinkProgram.

    One of function cl::linkProgram passes improper Context for clLinkProgram (exactly default Context).
    Code:
    Code :
    inline Program linkProgram(
        VECTOR_CLASS<Program> inputPrograms,
        const char* options = NULL,
        void (CL_CALLBACK * notifyFptr)(cl_program, void *) = NULL,
        void* data = NULL,
        cl_int* err = NULL) 
    {
        cl_int err_local;    
        .....
        .....
        cl_program prog = ::clLinkProgram(
            Context::getDefault()(), <--- wrong context, should be from first input program
            0,
            NULL,
            options,
            (cl_uint)inputPrograms.size(),
            programs,
            notifyFptr,
            data,
            &err_local);
     
        ....
    }

    Can you fix it in the next release of C++ binding header?

  2. #2
    Not sure if this is an option for you, but you could use the program::link() method from the Boost.Compute library (which provides its own low-level C++ wrapper for OpenCL) which does use the proper context when linking the program objects.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •