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

tbb is only for C++

roddur
Beginner
142 Views

in the tutorial, it is said that "You can use it with any compiler supporting ISO C++"...so is there any similar help for fortran as well?

0 Kudos
2 Replies
AJ13
New Contributor I
142 Views

I'm not familiar with Fortran personally. I would assume there are C++ bindings so that you can call a C++ function from Fortran. That's one way to integrate TBB with Fortran. The problem with porting TBB to other languages, is that it relies upon the C++ template system for its flexibility. However you can still write libraries that use TBB, and call those from other languages.

ARCH_R_Intel
Employee
142 Views
TBB is directly usable from only C++ for the reasons AJ cited.
For parallelizing purely Fortran code, I recommend using OpenMP. Most serious Fortran compilers support it. The Web site http://openmp.orghas the specification and a list of compilers that support OpenMP (basically most serious Fortran compilers). There's a pointer to an OpenMP tutorial there too,
Reply