Threading Building Blocks is a C++ library, and relies on many features of the language for its implementation. You'll need a C++ program to take advantage of the features of TBB. You might be able to embed chunks of C code into a C++ program using TBB just as you can otherwise, but TBB organization relies on the class and template parameterization features of C++ among many other features and needs a C++ compiler to interpret the TBB header files.
so the result is that TBB can be only use with C++-Code and not with C-Code. right?`
hmmmm, i use TBB and OpenMP. I just want to know some sure information for my thesis. Intel writes that TBB works with C++. They dont write C/C++. So i think that it can have some problem with the paralleization with C++-Code.
If TBB is implemented in C++ and uses C++ stuff than it cant work with C.
Thereofore i want to ask here in the forum if i am right.
"If TBB is implemented in C++ and uses C++ stuff than it cant work with C." It will work with your C program. It won't work with your C compiler.
It is a toolkit (or framework?), and it will require some work from you to apply it, but C++ is a better C, and TBB is a better OpenMP (or so I hear). If you're happy with OpenMP and it easily gives your program close to 100% efficiency, don't change; otherwise, try TBB.
Is using a C++ compiler a bigger obstacle for you than using a C compiler with OpenMP support (for me it would be the other way around)?
i am computer since student and now i write my thesis. i have to create a migration concept for a software. the migration is from 32-bit singlecore to 64-bit and multicore architectures. i think that openmp and tbb are great tools for the parallelization of C/C++ (TBB only for C++ ;-) ) . so i can use TBB to parallelize C-Code but i have to use a C++-compiler. i have some requirements that in some cases is real ansi c-code required and so i cant use the tbb in this case. anyway, its possible to use tbb and openmp together for C++-Code.
i use the VS 2005 and VS 2008 compiler. as OS i use Windows XP and Vista in the 32-Bit and 64-Bit versions.
its some requirements for the software. like data parallelism, portability, scalability,...
both are very good. and fullfill the requirements. only TBB hast the negative point, that its cant be used with ansi c and a c compiler
openmp can be also used only for c-code because it uses compielr directives.
If were splitting hairs, OpenMP is not really ANSI C either. Its an orthogonal extension graphed into the syntax, hidden in comment statements for those C compilers that cant interpret it. But Peter, if youre using VS 2005 and VS 2008 compilers, its really hard to get C without also getting C++. < Is this restriction to ANSI C a thesis requirement? It seems very limiting, given the scope of the thesis.
You suggest some requirements that is some cases you must use ANSI C. If those requirements are to interface to low level C functions, like an instrument driver or some provided C library, you can still use C++ and just restrict the code at the point of the interface to be pure C. If thats the nature of your requirements, you still may be able to use C++ and TBB.