ASUS GeForce GTX 980 Strix Review
ASUS GTX 980 Strix
Review
Gainward GeForce GTX 970 Phantom Review
Gainward GTX 970 Phantom
Review
MSI GeForce GTX 970 4GD5T OC Review
MSI GTX 970 4GD5T OC
Review
MSI Radeon R9 290X Gaming 4G Review
MSI R9 290X Gaming 4G
Review
FurMark, GPU stress test
FurMark 1.15.1
 
How to Rotate a Vertex by a Quaternion in GLSL
How to Rotate a Vertex
by a Quaternion in GLSL

Posts Tagged ‘cudaFree’


Programming a Matrix Multiplication for GPUs with CUDA

Be the first to comment - What do you think?  Posted by JeGX - 2008/10/14 at 10:45

Categories: NVIDIA CUDA, Programming   Tags: , , , , , ,

CUDA makes it possible to program the GPU with the language C. This article will show you the steps to code a matrix multiplication routine in CUDA:

  • allocate memory on the GPU with cudaMalloc or cudaMallocPitch (for aligned memory allocation)
  • move data to the GPU with cudaMemcpy2D
  • select the kernel domain, write the kernel and run it
  • move results back from the GPU to the host with cudaMemcpy2D
  • free resources with cudaFree