Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

C++ AMP

vrennert
Beginner
796 Views
Hello,

in the last couple of days i was following Microsofts announcement about C++ AMP and how it will work in theory.
Microsoft is releasing C++ AMP as an open specification.
Now i am wondering if there are any plans in extending TBB to work with the new types an keywords.

If i have the choice i would rather stay with TBB then switch over to PPL if even possible because PPL will probably stay Windows only.

Regards
Viktor
0 Kudos
7 Replies
Tux__the_Linux_Pengu
796 Views

Hmmm... C++ AMP does look cool...

Even if Intel doesn't extend TBB, others could submit code changes into the TBB site to support it, if there was popular demand or just some guy out there with too much time on his hands. BTW, PPL isn't that hard to learn. I know a bit of PPL parallel_for. It's basically the TBB lambda parallel_for with a bit of other stuff:

[cpp]#include 
#include 
using namespace std;
using namespace Concurrency;

int main()
{
   parallel_for(1, 11, 1, [&](int i) { cout << "Hi user, I'm " << i << "!n"; });
   return 0;
}[/cpp]

Here's a good site about PPL parallel_for and other functions.

0 Kudos
mwhenson
Beginner
796 Views
Intel has been developing Ct for a while now, which has similar use cases and reportedly uses TBB underneath.

ie:
http://software.intel.com/en-us/articles/performance-and-portability-benefits-of-ct/

Mike
0 Kudos
vrennert
Beginner
796 Views
Hello Mike,

I've read the article you've posted. But i see a huge diffrence between those two.
Ct seems so be all about CPU. AMP is about heterogeneous computation.

And the next problem will be the choice between one of them.

@Tux: I was trying to say that I am already using TBB and would like to stick with it and still benefit from AMP.

Regards
Viktor
0 Kudos
mwhenson
Beginner
796 Views
Oops I forgot they renamed it Array Building Blocks, after acquiring Rapidmind.
Mike
0 Kudos
JamesR
New Contributor II
796 Views
Extending TBB looks like an interesting topic to consider. When Microsoft C++ AMP is out, we'd welcome ideas on what to do, and hopefully help implementing TBB support (contribute your patches!)

Regarding ArBB and C++ AMP... hopefully, Intel Array Building Blocks *and* Microsoft C++ AMP both end up being about heterogeneous... that is the intent of both.

The first version of Intel Array Building Blocks (in beta now, and freely available) supports only Intel multicore processors and Intel MIC co-processor (Knights Ferry which is a prototype system in limited distribution for now).
We intend to deliver support for GPUs through OpenCL in the future, and be open and portable.
The goals of this project are very mathematically oriented, including support for sparse and irregular matrices.

Microsoft's first version (available later in Visual Studio next) supports Direct X 11, hence only GPUs. But Microsoft has said they intend to expand to more in the future and become heterogeneous, and have an open specification.

So we both get marks for starting somewhere... that's the way it has to be!

There are interesting differences between them, and I expect you'll be able to use both at the same time and tell us what you like about each. That's generally the goal of tool makers these days: to allow mix and match. Both Microsoft and Intel have been able to maintain choice for mixing and matching of parallel programming models including those offered by other companies. Microsoft helped a great deal by providing the Concurrency Runtime in Visual Studio 2010. I think both companies deserve considerable praise making interoperability a priority in these programming models... it is NOT easy, but it is important for developers.

Choice is good.




0 Kudos
Tux__the_Linux_Pengu
795 Views
Quoting vrennert
@Tux: I was trying to say that I am already using TBB and would like to stick with it and still benefit from AMP.

Oh, oops. I get what you're asking now.
0 Kudos
ronag89
Beginner
796 Views
"Microsoft's first version (available later in Visual Studionext) supports Direct X 11, hence only GPUs. But Microsoft has said they intend to expand to more in the future and become heterogeneous, and have an open specification."
This is incorrect, there is a DirectX 11 CPU fallback called WARP which C++ AMP uses if there is no supported gpu available.
0 Kudos
Reply