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

Going down to the source code

Nav
New Contributor I
270 Views
I've wanted to have a look at how the parallel_reduce was programmed, but had some trouble figuring out where the source code is.

Tried tbb22_20091101oss. It had an 'src' folder, but there was no parallel_for file.

Tried tbb30_20100406oss. It didn't have an 'src' folder.

Could someone help out? Which folders do I search for, to find the source code?
0 Kudos
1 Solution
nagy
New Contributor I
270 Views
Since it's a templated method I think all the code is in the header file, "parallel_reduce.h" in "include\tbb"

View solution in original post

0 Kudos
3 Replies
nagy
New Contributor I
271 Views
Since it's a templated method I think all the code is in the header file, "parallel_reduce.h" in "include\tbb"
0 Kudos
Vladimir_P_1234567890
270 Views
You also can look at examples\parallel_reduce folder to find how it works.
0 Kudos
Nav
New Contributor I
270 Views
Thanks! :) I did have a look at all the folders before posting here, but I didn't expect the code in the header files to actually be the source.
I guess that was a misconception coz long time back when learning C, I looked at the stdio.h file while searching for how printf is implemented, and realised that code isn't supposed to be in header files.

@Vladimir:
Thanks. Have tried those examples :)
0 Kudos
Reply