Parallel Programming for C++ Developers: Tasks and Continuations, Part 2 of 2

Play Parallel Programming for C++ Developers: Tasks and Continuations, Part 2 of 2

The Discussion

  • User profile image

    Greeting, Im glad to hear that you had some new parallel sorting algoritms but its still not my favourite sort of all time Tongue Out If you really want to sort 2 million pixels, I'd highly suggest "ShearSort". It maintains data locality fairly well and would be insanely perfect for GPU sorting too since core communication happens predictivaly and at once for all little buckets, Way better than hugely recursive functions like a Quicksort even though IntroSort is fairly good for anything less than 10,000 element to sort. As soon at the amount needing to get sorted increases its till breaks down... call stacks grow too damn large with even those highly recursive things unless you have tail recursion in the PPL implementation being used.

    Thats a great example in The highly buggy Java which shows a ShrearSort advantage with only 10000 elements Tongue Out The more elements... the faster in comparison ShearSort is. It's plenty fun to mess with the parameters since you can use many algorithms listed below the sort to see how each work by tweaking the URL.

    I keep my own ShearSort around for fun because it's my personal favourite, but its sort of tricky too implement. My wish is to have a highly available ShearSort which ANYTONE can benefit from given the header file from ConcrtExtras.

    Also he did a good job, he seems slightly nervous but we're all developers here, more camera time should help him out on the whiteboard since hes quite a good member of the team.

    Thanks Charles for asking and trying to pry open their design decisions for things Tongue Out but honestly... I miss Rick Malloy... he was my Parallel C++ hero on C9.

  • User profile image

    There ARE comments in the code, though most of the useful documentations are between <remarks></remarks> tags, and there are even some TODOs like // TODO: any way to get rid of this lock?  Smiley

    Talking about GPU maybe we can look into the Data Parallel Extensions for C++ next time, something only for native developers.

  • User profile image

    @HeavensRevenge: Rick Molloy is no longer on the PCP team, but he is cranking code. Not sure about his current role, but I do know he's a native dev (SDE). Smiley


  • User profile image

    @Charles: He was the man, I'd buy him a beer, or a cola if he doesnt drink nomatter which team he's supercharging. AKA hes one of my fav guys to get on C9 along with Erik. 

  • User profile image

    [off-topic]Intel (finally) releasing their version of OpenCL for CPU, its alpha yet, but the slides explaining how they translate code to be parallelized (implicit and explicit) is very interesting

  • User profile image

    @HeavensRevenge - I'm still around; as Charles mentioned, I'm working as a dev these days in the Startup Business Group on the team that is responsible for AvatarKinect. 

    I still stay pretty connected to the PCP team, and its great to see more folks from the team here.

    The team has been discussing tasks and continuations for awhile and I'm glad to see them surfaced in the extras, the video and the book at

    And just for the record my drink of choice is a double ristretto.

Add Your 2 Cents