06.08.2012 Views

Getting Started with CUDA

Getting Started with CUDA

Getting Started with CUDA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Minimal Kernels<br />

__global__ void minimal( int* a_d, int value)<br />

{<br />

*a_d = value;<br />

}<br />

__global__ void assign( int* a_d, int value)<br />

{<br />

int idx = blockDim.x * blockIdx.x + threadIdx.x;<br />

}<br />

a_d[idx] = value;<br />

© 2008 NVIDIA Corporation.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!