Previous | Next --- Slide 19 of 79
Back to Lecture Thumbnails

Just curious: why is it called 'data-parallel' expression?


@PandaX Data-parallel is a type of parallel programming model in which the same operation is applied to each element of a large set of data, roughly speaking. I believe this will be covered in the next lecture. In the case, we have the same operation being perfomed (sin) over each element of the array x so this a "data-parallel" expression.


Theoretically, you can achieve equal (if not better) performance by manually using SIMD intrinsics than using data-parallel expressions. However, a key benefit of these expressions is that the same code can be compiled on different architectures to generate instructions that will take advantage of the hardware (#ALU's, #cores, etc...). Furthermore, by letting the compiler turn the normal code into vectorized code, data-parallel expressions spare the programmer from dealing with SIMD intrinsics, which are semantically different and [subjectively] harder to deal with.

As a result, it seems to me that such data-parallel expressions were created primarily with programmer convenience in mind. For truly performance sensitive operations, it may be wiser to manually use SIMD intrinsics.