Most Recent Tune Posts RSS

Stop Threads from Clashing Over Variables in OpenMP

OpenMP lets you allocate blocks of code that will be duplicated across threads. These can be in the form of loops or just simple blocks. To help you with your data, variables can be duplicated within each thread. Jeff Cogswell shows you how. Last time we explored a bit of …

Read Full Post Posted in Build | Leave a comment

Taking OpenMP Out for a Spin

OpenMP provides a way to write parallel code using pragmas embedded in your C++ code. Jeff Cogswell tries out a simple pragma that results in spawning multiple, identical parallel threads. In my last blog, I briefly introduced OpenMP, which is a technology whereby you can write parallel code in ways …

Read Full Post Posted in Build | Leave a comment

Determine Processor SIMD Features at Runtime

The Intel compiler can generate code that behaves differently for different processors. Sometimes you might want to manually check the processor features. Or you might just want to know how the generated code does it. In this video, Jeff Cogswell shows you how to use the CPUID assembly instruction to …

Read Full Post Posted in Build | Leave a comment

Timing Matters in Threading Building Blocks

When you want to time how long a set of parallel tasks takes to complete, you want to use the actual time, not the CPU time. And you want the time-measuring mechanism to be thread-safe. Jeff Cogswell shows you how to use the timing classes in Threading Building Blocks to …

Read Full Post Posted in Build | Leave a comment

Configuring Microsoft Visual Studio for OpenMP

  In this video, Jeff Cogswell shows you how to configure a project in Microsoft’s Visual Studio using Parallel Studio and OpenMP. He then takes you through a quick OpenMP program, demonstrating the pragmas  

Read Full Post Posted in Build | Leave a comment

OpenMP: Parallel Programming Alternative

Although we’ve spent a lot of time here at Go Parallel on Cilk Plus, there’s another technology you can use with Parallel Studio called OpenMP. Jeff Cogswell gives you an overview. Here at Go Parallel, we’ve spent a lot of time talking about Cilk Plus, which is a set of …

Read Full Post Posted in Build | Leave a comment

How to Keep Thread-Safe When Queuing Your Data

Queue data structures are common and useful, but not always thread-safe. Jeff Cogswell explains how a queue works and why a typical implementation won’t cut it for multithreaded programming. He then introduces the Threading Building Blocks queue structure, which scales nicely for high-performance, multithreaded programming.  A common and useful data …

Read Full Post Posted in Tune | Leave a comment

Build Android, Windows Apps with Intel’s New Dev Suite

Intel recently announced its Integrated Native Developer Experience, a new development suite for building cross-platform applications for both Android and Windows. This tool includes C++ native code and parallel coding with Threading Building Blocks. Jeff Cogswell shows you where you can download the tool and how to get going with …

Read Full Post Posted in Tune | Leave a comment

Make Sharing Memory a Snap with Xeon Phi

The Xeon Phi Coprocessor can run code that you’ve offloaded from your host computer. However, that introduces the potential problems of data sharing. But using various compiler keywords, you can easily copy data back and forth between the host and the Xeon Phi coprocessor while maintaining the same memory addresses. …

Read Full Post Posted in Tune | Leave a comment

How Hyper-Threading and Threading Work in Processors

Today’s Intel processors have multithreading built right into them through a technology called Hyper-Threading. Jeff Cogswell explains how it fits into parallel programming, and how the Xeon Phi coprocessor takes Hyper-Threading to the next level with four threads per core. Let’s take a look at how threading works inside the …

Read Full Post Posted in Tune | Leave a comment