Home Register Members List Search Today's Posts Mark Forums Read

Go Back   TechFuels Forum > Hardware > CPU & Components

Reply
 
LinkBack Thread Tools
joshin
Senior Member
 

joshin is offline  
Old 01-20-2009, 09:28 AM
  #1 (permalink)
Programming with CUDA

We throw some light on how program¬ming is done for CUDA. It extends C by allowing programmers to_define C functions known as 'kernels'. When these kernels are called, they execute n times (in parallel) in n different threads. Here is the code snippet to define a kernel:

Here kernel is defined using '_global_', and number of threats are define inside a new syntax «< ... »>. Each of the thread that executes a kernel is given a unique thread'ID that is ac¬cessible within kernel through a built in variable' threadIdx' variable. 'threadIdx' is a 3-component vector, therefore it can be identified using one-dimensional, two-dimensional or three-dimensional index formirfg one/two/three dimensional thread blocks.

Name:  Programming with CUDA.jpg
Views: 337
Size:  32.1 KB

While executing, threads can access memory from three different places: private memory of thread, block memory for all threads presert in block and global mernory.A lot of examples are present in 'C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects.' Compile the e examples and run them. One can also' customize these projects. Before writing codes programmers should analyse their code so that they can create small chunks of data that can be distributed intu threads. Also keep in mind that you create sufficient number of threads to optimally utilize GPU power.

NVIDIA is not the only vendor to provide a programming interface to harness the parallel processing power of a GPu. AT! has also joined them with the release of 'AT! Stream Technology' that runs on AT! graphics cards. We shall be providing more information on this in the near future. So, watch out this space in the coming issues
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Install CUDA joshin CPU & Components 0 01-20-2009 09:23 AM
Programming Fundamentals yenkin Programming 0 10-31-2008 07:06 AM
Seagate 32MB CUDA 7200.11 750GB SATA Hard Disk jakarta659 Hard Disk 0 07-16-2008 03:43 PM
PHP programming aiantin465 Programming 0 07-05-2008 09:45 AM
C , C++ programming terank Programming 0 07-04-2008 10:23 AM


All times are GMT +1. The time now is 11:52 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0
Copyright Techfuels -->
SEO by SubmitEdge


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151