Example Code

LabVIEW Data Parallelism (Matrix Multiply)

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

Coding that exemplifies the efficiency improvement by having parallelism in the data.

 

Description

Since LabVIEW is built to handle multithreaded applications, you can use a technique called data parallelism to split up operations to run on multiple processors at the same time. This example compares the execution time necessary to multiply two 500 by 500 matrices in one single operation versus dividing the matrices into two subsets each, performing the multiplication and combining them to a 500 by 500 result. The speed up time is displayed and the VI stops.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI.
2. The Speedup indicator will show how much faster the two data set management is in compared to one data set.


Additional Information or References

Snippet.png

Todd S.
LabVIEW Community Manager
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.