• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Better late than never! OpenCL Example (mostly)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Better late than never! OpenCL Example (mostly)


  • Subject: Re: Better late than never! OpenCL Example (mostly)
  • From: Brian Gardner <email@hidden>
  • Date: Fri, 4 Sep 2009 13:56:23 -0700

Thank you, Darrin.

This is an invaluable example!

I guess I have some really basic newbie questions.

1. Do we need to use OpenCL to get the benefit of Grand Central Dispatch?

2. Is there a document that lists the functions,
      statements, and structure available in OpenCL?

(Like, how did you know that there existed a "write_imagef" procedure and "sampler_t" data type?)

3. To what extent is 64 bit programming available inside an FxPlug?
And is it available through OpenCL, independent of OpenCL, or both?


   -- Brian

On Sep 4, 2009, at 10:19 AM, Darrin Cardani wrote:

OK, I've got a simple OpenCL example working. One caveat: I don't yet have the GPU path working, but the CPU path is working fine. I've left in what I wrote for the GPU, but it's commented out. Feel free to uncomment it, tweak it, and let me know if you can get it working. :) I'm talking to the OpenCL and OpenGL teams to see if they have any advice on getting it working.

This is a very simple example which just adjusts the brightness of the image. The cool thing is that with the exception of setting up the OpenCL context and images, there's basically one code path that should (eventually) work on both the CPU and GPU. The actual code of the image processing is written only once!

One other caveat - this might not be the fastest implementation. With the goal of simplicity in mind, I didn't bother to cache the context or the built kernel. I believe that you can probably increase the speed by caching both of those. Hopefully by the time I work this into a real world piece of sample code that we can ship, both of those things will be done.

But in the meantime, enjoy, and let me know if you have any questions, comments, bug reports, etc.:

<FxOpenCL.zip>


Darrin -- Darrin Cardani email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • FCP, plugins and time/date format
      • From: "Jay Boyer" <email@hidden>
    • Re: Better late than never! OpenCL Example (mostly)
      • From: Paul Schneider <email@hidden>
References: 
 >Better late than never! OpenCL Example (mostly) (From: Darrin Cardani <email@hidden>)

  • Prev by Date: Better late than never! OpenCL Example (mostly)
  • Next by Date: Re: Better late than never! OpenCL Example (mostly)
  • Previous by thread: Better late than never! OpenCL Example (mostly)
  • Next by thread: Re: Better late than never! OpenCL Example (mostly)
  • Index(es):
    • Date
    • Thread