ArrayFire Examples (Part 4 of 8) - Image Processing

ArrayFire ArrayFire, CUDA Leave a Comment

This is the fourth in a series of posts looking at our current ArrayFire examples. The code can be compiled and run from arrayfire/examples/ when you download and install the ArrayFire library. Today we will discuss the examples found in the image_processing/ directory. In these examples, my machine has the following configuration:

Image Demo The purpose of this example is to show how to do some common image manipulations. The method channel_split shows how easily multi-dimensional arrays can be subdivided:

The colorspace function is useful for moving images between representation spaces. Images can easily be loaded as color images, or converted to grayscale images. Note that when loading images, scaler division is performed to normalize the values between 0 and 1:

Other useful functions ...

ArrayFire Examples (Part 3 of 8) - Financial

ArrayFire ArrayFire, CUDA Leave a Comment

This is the third in a series of posts looking at our current ArrayFire examples. The code can be compiled and run from arrayfire/examples/ when you download and install the ArrayFire library. Today we will discuss the examples found in the financial/ directory. In these examples, my machine has the following configuration:

Black-Scholes There are a number of applications of ArrayFire and GPU programming in the world of finance and markets. Here we have an example of Black-Scholes, which is a model for computing options prices in the stock market. Understanding how this model works isn't necessary to understand this example. In fact, ArrayFire improves the relationship between the scientist/mathematician/analyst who needs to use a particular model, and the programmer who has to write it. Rather ...

ArrayFire Examples (Part 2 of 8) - Benchmarks

ArrayFire ArrayFire, Benchmarks, CUDA Leave a Comment

This is the second in a series of posts looking at our current ArrayFire examples. The code can be compiled and run from arrayfire/examples/ when you download and install the ArrayFire library. Today we will discuss the examples found in the benchmarks/ directory. In these examples, my machine has the following configuration:

Blas This example shows a simple bench-marking process using ArrayFire's matrix multiply routine. For more information on Blas, click here. The data measured in this example is the Giga-Flop (GFLOP Floating Point Operations Per Second). I got the following results using the example code on my machine:

Just for fun, I wrote a small program to perform a simple matrix multiply using the CPU in a triple-for loop (a pretty standard, but non-optimized solution). This ...

ArrayFire Examples (Part 1 of 8) - Getting Started

ArrayFire ArrayFire, CUDA Leave a Comment

This is the first in a series of posts looking at our current ArrayFire examples. The code can be compiled and run from arrayfire/examples/ when you download and install the ArrayFire library. Today we will discuss the examples found in the getting_started/ directory. Hello World Of course we start with the classic "Hello World" example, which walks you through the basics of using the ArrayFire library. Running this example will print out system and device information, as well as perform some basic matrix operations. This is a good place to get familiar with the basic data container for ArrayFire - the array.

Convolve In this example we show you how to perform a basic image convolution, as well as how ...