Download the authoritative guide: Cloud Computing 2018: Using the Cloud to Transform Your Business
Multiple cores are the norm now for chip-makers, though application developers don't always develop in ways that take advantage of more than one processor core. How do you bridge the divide?
Intel thinks the key is by making a cornerstone development tool for parallelism open source. To that end Intel is open sourcing Intel Threading Building Blocks (TBB) under the GPL version 2 (define).
TBB is a method of programming for C++ for parallelism that Intel has offered for over a year. With version 2.0 they're open sourcing it and making it available on more operating systems and processors.
"Customers were concerned that Intel might decide to quit selling it [TBB] one day," Reinders said. "Open sourcing addresses the issue and paves the way for TBB to be accessible for every C++ user to use on every platform that they care about."
Reinders explained that TBB works with nearly all C++ compilers and enables developers to take advantage of parallelism without the need to move from a familiar environment. TBB 2 also attempts to simplify programming for multiple processors by abstraction. Rather than trying to write threads that execute on a particular processor core, TBB handles parallelism based on task.
Taking advantage of TBB is relatively straightforward, too. Reinders noted that TBB is a template library. In the part of the program where you want some parallelism you use a template.
A template looks like a function call, but in C++ a template is expanded and compiled particular to the types that you are giving it. TBB also helps with multi-core memory allocation, as well as task allocation with the inclusion of a scalable memory allocator.
There is no hard limit now for how many cores TBB can scale to with Intel seeing good results on both 8 and 16 cores. That said, Reinders speculated that TBB was not ready for 100 cores.
"Once you start getting into a really large machine, you need to pay more attention to how the data is distributed, because if the data is shuffled back and forth across processors, the costs go up," Reinders said. "TBB doesn't try to address data partitioning directly."
Though Intel is open sourcing TBB, it is not open sourcing all of its multi-core programming tools. In particular Thread Profiler 3.0 and Thread Checker 3.0, which were introduced last August, will stay as proprietary products. Reinders explained that Intel has invested its time and energy into open sourcing TBB first and first want to build a community around it.
In addition to open sourcing the TBB tools, Intel is launching a site called Threading Building Blocks, which is intended to be a community-oriented site surrounding TBB usage and development. Reinders noted that Intel will be accepting contributions to the project, though at launch the site will not have a full versioning control system in place.
Intel considered going with either Apache or Eclipse instead of trying to run the TBB project itself but ultimately decided to go it on their own.
"We wanted a place where parallelism is a passion," Reinders said. "Ultimately we decided it would work best if we took that role and ran as our own project. Eclipse or Apache was decided to be not the best route to take though we're not closed to thinking about it. But right now we're committed to running it ourselves and making sure it has a passionate parallelism."