"Parallel Computing-cuda development" GPU parallel programming method

Source: Internet
Author: User
Tags lapack

Reprinted from: http://blog.sina.com.cn/s/blog_a43b3cf2010157ph.html

There are several ways to write parallel programs that utilize GPU acceleration, which are summed up in three ways:

1. Take advantage of the existing GPU function library.

Nvidia's Cuda Toolbox improves free GPU-accelerated fast Fourier transform (FFT), Basic linear algebra subroutines (BLAST), image and video processing library (NPP). The user can get performance acceleration by replacing the fast Fourier transform, fast Fourier transform and image and video processing library of the CPU version in the source code with the corresponding GPU version. In addition to the function libraries provided by NVIDIA, the third-party GPU libraries are: CUDA data parallel Primitives (CUDPP) Cula tool: Launched by EM Photonics, lapack MAGMA in Cuda GPU: Launched by Dongarra's group , lapack Jacobian preprocessing conjugate gradient (JCG) gpulib in CUDA GPU and multicore CPUs: GPU VSIPL Signal Processing Library Computer Vision (CV) and Imaging library for Interface Description Language (IDL) and Matrix Lab (MATLAB) Opencurrent: Cuda Accelerated PDE (partial differential equation, partial differential equations) in the regular grid system LIBSVM MULTISVM in Open source database solution Cuda/gpu: Multi-level SVM with Cuda CUSVM: Cuda usage support for vector classification and attenuation

2. CUDA programming.

This is the most common and appropriate approach, and Cuda maximizes the GPU's acceleration performance.

3. Instruction (Directive) programming.

Based on the OPENACC standard, GPU directive programming is an easy and effective way to speed up scientific or industrial code. By using GPU instructions, simply inserting the compilation instructions into your source code, the compiler will automatically map the compute-intensive portions of the code to the GPU, speeding up your coding. Here is a simple example of how to speed up the calculation of pi with an instruction. Using GPU instructions, you can quickly get started and see the results on the day.



Advantages of OPENACC Programming:

L Simple: Just insert the build hint in your code

L Open: A single codebase can be run on both the CPU and the GPU

Powerful: It takes only a few hours to play the GPU's power

The leader of the parallel computing tool, PGI, caps and Cray, will be the first to support OPENACC.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.