GPULib API

Tech-X Corporation

single page | use frames     summary     class     fields     routine details     file attributes

demos/bench/

gpu_bench_demo.pro


This example demonstrates the basic use of GPULib from within IDL.

The program creates a vector of nx random numbers on the CPU. In the first test, it then computes the LGAMMA function of this vector niter+1 times.

Next it puts the original test vector onto the GPU and computes niter+1 times the LGAMMA function on the GPU and finally gets the result back to the host memory.

In both cases, the elapsed time is recorded and finally reported.

top gpu_bench_demo

gpu_bench_demo

Example for comparing GPULib performance with plain IDL.

File attributes

Modification date: Fri Nov 12 11:07:47 2010
Lines: 65
Docformat: rst rst