Results 1 to 5 of 5

Thread: recreate clCreateKernel

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    2

    recreate clCreateKernel

    hello,everyone
    i don't know how to recreate the clCreateKernel()?i want to Processing video?but they cost so much time to create kernel program?please help me~~~~~~~

  2. #2
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: recreate clCreateKernel

    You don't need to call clCreateKernel() very often. You can reuse the same kernel all the time and instead call clSetKernelArg() multiple times when you want to change the kernel arguments.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

  3. #3
    Junior Member
    Join Date
    Nov 2011
    Posts
    2

    Re: recreate clCreateKernel

    can you give me a sample?
    because i try to reuse the kernel,but the program have error,thank!

  4. #4

    Re: recreate clCreateKernel

    Quote Originally Posted by david.garcia
    and instead call clSetKernelArg() multiple times when you want to change the kernel arguments.
    Don't really understand that

  5. #5
    Senior Member
    Join Date
    Aug 2011
    Posts
    271

    Re: recreate clCreateKernel

    Quote Originally Posted by donintosh
    Quote Originally Posted by david.garcia
    and instead call clSetKernelArg() multiple times when you want to change the kernel arguments.
    Don't really understand that
    This is a very basic library calling technique, seen in pretty much any computer language in existence.

    Think of the kernel as an object, clSetKernelArg just sets state on the object, and clEnqueueNDRangeKernel uses it's current state to invoke a remote procedure. The object is then free to be changed and re-used as required.

    If you don't understand this you are going to have real trouble using opencl as this is pretty much the simplest part of the whole system.

Similar Threads

  1. Crash after trying recreate buffers
    By denis_k in forum OpenCL
    Replies: 3
    Last Post: 01-24-2012, 07:39 AM

Posting Permissions

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