locked
C or C++ ? RRS feed

  • Question

  • Hi

    Very general questions, I am aware that MS are modifying their C++ compiler to support parallel_for (amongst other things) and wanted to ask if these parallel oriented extensions are confined to C++ or will C also be modified?

    Also will the device driver writer be able to take advanatge of this as well?

    Finally, other than the language compilers, are we going to see any new operating system functions that specifically make parallel stuff available from the OS itself (I'm thinking of stuff like QueueUserAPC and how variations on this might emerge in the future versions of Windows)

    Many thanks.


    Hugh Moran - http://www.morantex.com
    • Edited by Morantex Wednesday, December 17, 2008 8:06 PM clarify
    Wednesday, December 17, 2008 8:05 PM

Answers

  • Hi Hugh,

    I'm not aware of any plans to add parallel extensions to our C++ compiler.  However, we are adding improvements throughout the native stack (most notably a Concurrency Runtime and a library called the Parallel Patterns Library).  Inside the PPL, you'll find a parallel for loop construct as well as many other APIs that take advantage of our new runtime and it's very efficient task schedulers.  As we are specifically part of the Visual Studio team, we generally do not make changes to the OS so if you have questions about what may be coming in Windows 7, the Windows Forum is probably your best bet for answers.  If you're interested in the Concurrency Runtime and PPL I recommend you scour msdn.com/concurrency for talks like this:  http://channel9.msdn.com/pdc2008/TL22/.

    Hope that helps!

    Josh
    Friday, December 19, 2008 10:19 AM
  • Thanks for responding Josh. I'll add a couple more specific points here. 

    As Josh mentioned the PPL provides a task programming API and parallel algorithms specifically, parallel_for, parallel_for_each and parallel_invoke.  The Agents library provides APIs and classes for progamming concurrent data flow pipelines or networks and encourages an actor based programming model with the agents.

    The Concurrency Runtime itself provides work-stealing schedulers, scheduler management via policies (multiple scheduler instances and control over number of hardware threads used) as well as task creation APIs. While this is not new functionality around QueueUserAPC, you should be able to program many of the scenarios you would use QueueUserAPC in the Concurrency Runtime or with the Agents apis or the PPL.  

    As Josh suggested check the windows forums and documentation for new windows features, but I'd also encourage you to watch Mark Russinovich talk about some of the new work that's coming.

    The majority of the Concurency Runtime itself should be callable from a c - compiler, but the header file is C++ based so wrapper APIs would likely be neeed.  The PPL and Asynchronous Agents Libraries in the Visual Studio are both C++ libraries implemented largely as template header files on top of the runtime so again it would take more work to wrap these, but they could be callable from c code.

    Regarding the language extensions, in the CTP the C++ compiler has been updated to support some of the features being introduced in C++0x , most notably lambdas in C++, the updated 'auto' keyword and R-value references.  These make concurrency APIs more accessible because its now takes less code to construct callable objects, but these aren't Microsoft or concurrency specific features.

    Thanks again and if you try the CTP please be sure to let us know if you have feedback or questions.


    Rick Molloy Parallel Computing Platform : http://blogs.msdn.com/nativeconcurrency
    Friday, December 19, 2008 9:52 PM

All replies

  • Hi Hugh,

    I'm not aware of any plans to add parallel extensions to our C++ compiler.  However, we are adding improvements throughout the native stack (most notably a Concurrency Runtime and a library called the Parallel Patterns Library).  Inside the PPL, you'll find a parallel for loop construct as well as many other APIs that take advantage of our new runtime and it's very efficient task schedulers.  As we are specifically part of the Visual Studio team, we generally do not make changes to the OS so if you have questions about what may be coming in Windows 7, the Windows Forum is probably your best bet for answers.  If you're interested in the Concurrency Runtime and PPL I recommend you scour msdn.com/concurrency for talks like this:  http://channel9.msdn.com/pdc2008/TL22/.

    Hope that helps!

    Josh
    Friday, December 19, 2008 10:19 AM
  • Thanks for responding Josh. I'll add a couple more specific points here. 

    As Josh mentioned the PPL provides a task programming API and parallel algorithms specifically, parallel_for, parallel_for_each and parallel_invoke.  The Agents library provides APIs and classes for progamming concurrent data flow pipelines or networks and encourages an actor based programming model with the agents.

    The Concurrency Runtime itself provides work-stealing schedulers, scheduler management via policies (multiple scheduler instances and control over number of hardware threads used) as well as task creation APIs. While this is not new functionality around QueueUserAPC, you should be able to program many of the scenarios you would use QueueUserAPC in the Concurrency Runtime or with the Agents apis or the PPL.  

    As Josh suggested check the windows forums and documentation for new windows features, but I'd also encourage you to watch Mark Russinovich talk about some of the new work that's coming.

    The majority of the Concurency Runtime itself should be callable from a c - compiler, but the header file is C++ based so wrapper APIs would likely be neeed.  The PPL and Asynchronous Agents Libraries in the Visual Studio are both C++ libraries implemented largely as template header files on top of the runtime so again it would take more work to wrap these, but they could be callable from c code.

    Regarding the language extensions, in the CTP the C++ compiler has been updated to support some of the features being introduced in C++0x , most notably lambdas in C++, the updated 'auto' keyword and R-value references.  These make concurrency APIs more accessible because its now takes less code to construct callable objects, but these aren't Microsoft or concurrency specific features.

    Thanks again and if you try the CTP please be sure to let us know if you have feedback or questions.


    Rick Molloy Parallel Computing Platform : http://blogs.msdn.com/nativeconcurrency
    Friday, December 19, 2008 9:52 PM