Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming Operating Systems Software Apple

Apple Open Sources Grand Central Dispatch 342

bonch writes "Apple has open sourced libdispatch, also known as Grand Central Dispatch, which is technology in Snow Leopard that makes it easier for developers to take advantage of multi-core parallelism. Kernel support is not required, but performance optimizations Apple made for supporting GCD are visible in xnu. Block support in C is required and is currently available in LLVM (note that Apple has submitted their implementation of C blocks for standardization)." Update: 09/11 15:32 GMT by KD : Drew McCormack has a post up speculating on what Apple's move means to Linux and other communities (but probably not Microsoft): "...this is also very interesting for scientific developers. It may be possible to parallelize code in the not too distant future using Grand Central Dispatch, and run that code not only on Macs, but also on clusters and supercomputers."
This discussion has been archived. No new comments can be posted.

Apple Open Sources Grand Central Dispatch

Comments Filter:
  • What? (Score:3, Interesting)

    by julesh ( 229690 ) on Friday September 11, 2009 @09:09AM (#29388375)

    Can somebody explain what this "blocks" is? I mean, C being a block-structured language, I thought it already supported them...

  • Awesome! (Score:5, Interesting)

    by gers0667 ( 459800 ) on Friday September 11, 2009 @09:10AM (#29388381) Homepage

    I'm not too well versed in Cocoa development. I pushed some code that should have been in a separate thread into GCD, which requires you to use a block. All in all, I had to add an include, 1 line of code and a closing bracket.

    Apple has made some seriously cool stuff here.

  • by Anonymous Coward on Friday September 11, 2009 @09:29AM (#29388537)

    Apple has a long tradition to make things its own way, not always in the cleanest way under the hood. This does not always help, and sometimes it just adds to the confusion. Why parallel programming has to be tied to a kernel change and to a language spec change, when a good library (OpenMP, anyone?, but I'm sure there are others) will suffice... Good support for OpenMP or any of the existing shared memory parallel programming libraries would have been much cleaner and portable.

    Disclaimer: I use/program/work with an Intel Macbook Pro.

  • by Anonymous Coward on Friday September 11, 2009 @10:10AM (#29388923)

    Why parallel programming has to be tied to a kernel change and to a language spec change, when a good library (OpenMP, anyone?, but I'm sure there are others) will suffice...

    OpenMP requires "language changes" - it introduces new compiler keywords, and the compiler must support it, it's not "a library".

    Get yourself a clue.

  • Re:What? (Score:4, Interesting)

    by LO0G ( 606364 ) on Friday September 11, 2009 @10:28AM (#29389075)

    They're basically lambda functions [wikipedia.org] which are a part of C++0x.

  • Once developers start using GCD for their applications, you'll start noticing significant improvements in performance.

    Shoot, I already noticed the difference on my 2.5 yr old Mac Pro (1.1). First boot on 10.6 and I was like "wow, feels like a new machine again". All of the bundled apps have been recompiled (64 bit) and cleaned up (and apparently take advantage of GCD everywhere possible). I really didn't think I would see that much of a difference with 10.6 and really only upgraded because I could for $29 (I mean at that price, why not right?) I am very happy with my $29 purchase thus far. I've only had to work through a couple app incompatibilities (and as I have been able to work around them just fine, I am happy.) This is of course just my experience thus far with 10.6. I have no hard benchmark numbers for you. But I noticed right away the smoothness it brought to my older Mac Pro. And it was an easier upgrade than going from 10.4 --> 10.5.

  • by _LORAX_ ( 4790 ) on Friday September 11, 2009 @11:16AM (#29389603) Homepage

    SMP = Symmetric Multi-Processing. GCD, in theory, will also allow access to Asymmetric Multi-Processing as well since you can take advantage of GPU resources and cores as well.

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...