The Altera® SDK for OpenCLTM* provides a design environment for you to easily implement Open Computing Language (OpenCL) applications with FPGA-based accelerators. For more information, visit the following web pages:
The following examples demonstrate how to describe various applications in OpenCL along with their respective host applications, which you can compile and execute on a host with an FPGA board that supports the Altera SDK for OpenCL.
|Hello World||Basic||This simple design example demonstrates a basic OpenCL kernel containing a printf call and its corresponding host program.|
|Vector Addition||Basic||This simple design example demonstrates a basic vector addition OpenCL kernel and its corresponding host program.|
|Matrix Multiplication||Single-precision floating-point||This design example demonstrates a high-performance tiled matrix multiplication algorithm. It highlights the performance benefits of using local memory for intermediate buffering.|
|Mandelbrot Fractal Rendering||Double-precision floating-point, visual||This design example includes a kernel that implements the Mandelbrot fractal convergence algorithm and displays the results to the screen.|
|Time-Domain FIR Filter||Finite impulse response (FIR) filter, single work-item kernel, single-precision floating-point||This design implements the time-domain FIR filter benchmark from the HPEC Challenge Benchmark Suite. This example shows how to efficiently describe the sliding window data reuse pattern.|
|Sobel Filter||Image filtering, single work-item kernel, integer, visual||This design example demonstrates a Sobel filter in OpenCL to perform edge detection on an image. The filtered image is displayed on the screen. This example shows how to efficiently describe the sliding window data reuse pattern.|
|FFT (1D)||Single work-item kernel, single-precision floating-point||This design example demonstrates a high-performance 1D radix-4 complex fast Fourier transform (FFT) or inverse fast Fourier transform (IFFT) engine using OpenCL. This example takes advantage of the efficient sliding window data reuse pattern.|
|FFT (2D)||Single work-item kernel, single-precision floating-point, kernel-to-kernel channels||This design example demonstrates a high-performance 2D radix-4 complex FFT/IFFT engine using OpenCL. This engine is targeted at large problem sizes (1024x1024 by default) and uses global memory to store the intermediate transposition. One aspect highlighted by this example is how to efficiently perform matrix transposition in global memory.|
|Finite Difference Computation (3D)||Single work-item kernel, single-precision floating-point||This design example demonstrates a high-performance 3D finite-difference stencil-only computation using OpenCL. It shows how to efficiently describe a sliding window data reuse pattern.|
|Monte Carlo Black-Scholes Asian Options Pricing||Single- and double-precision floating-point, single and multiple work-item kernels, simultaneous kernels, kernel-to-kernel channels||This design example implements the Monte Carlo Black-Scholes options pricing simulation for Asian options. This example shows to run multiple kernels simultaneously, with each performing different parts of the simulation (random number generation, path simulation, and accumulation) and communicating using Altera's channels vendor extension.|
|OPRA FAST Parser||Single work-item kernel, channels, low-latency||This design example demonstrates a streaming parser commonly used in high-frequency trading algorithms. The parser accepts an OPRA FAST data stream and decompresses the fields for use upstream. It illustrates how you can process streaming messages efficiently that has been proven to saturate a 10G Ethernet channel.|
OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.
* Product is based on a published Khronos Specification, and has passed the Khronos Conformance Testing Process. Current conformance status can be found at www.khronos.org/conformance.
Design Examples Disclaimer
These design examples may only be used within Altera devices and remain the property of Altera Corporation. They are being provided on an “as-is” basis and as an accommodation; therefore, all warranties, representations, or guarantees of any kind (whether express, implied, or statutory) including, without limitation, warranties of merchantability, non-infringement, or fitness for a particular purpose, are specifically disclaimed. Altera expressly does not recommend, suggest, or require that these examples be used in combination with any other product not provided by Altera.