General Matrix Multiply Sample

Download for Windows* Download for Linux* Download Documentation


General Matrix Multiply (GEMM) sample demonstrates how to efficiently utilize an OpenCL™ device to perform general matrix multiply operation on two dense square matrices. The primary target devices that are suitable for this sample are the devices with cache memory: Intel® Xeon Phi™ and Intel® Architecture CPU devices.

The sample:

  • Optimizes trivial matrix multiplication nested loop to utilize the memory cache more efficiently
  • Supports single-precision and double-precision data types
  • Demonstrates how to use different storage methods for matrices
  • Demonstrates how to utilize the automatic vectorizer efficiently and avoid gathers

Supported Devices: CPU, Intel® Xeon Phi™ coprocessor
Supported OS: Windows* and Linux* OS
Complexity Level: Intermediate

For more information about the sample refer to the sample documentation inside the package.

ZIP sample package contains sample files for Windows* OS
TAR.GZ sample package contains sample files for Linux* OS.

* OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.

Einzelheiten zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.