CUDA tutorial: Difference between revisions

no edit summary
(Added "Draft" tag to the article.)
No edit summary
Line 85: Line 85:
cudaFree ( dev_a ); cudaFree ( dev_b ); cudaFree ( dev_c );  
cudaFree ( dev_a ); cudaFree ( dev_b ); cudaFree ( dev_c );  
}
}
</syntaxhighlight>
Are we missing anything ?
That code does not look parallel !
Solution: Lets look at what inside the triple brackets in the Kernel call and make some changes :
<syntaxhighlight lang="cpp" line highlight="1,5">
add <<< N, 1 >>> (dev_a, dev_b, dev_c);
</syntaxhighlight>
</syntaxhighlight>
Bureaucrats, cc_docs_admin, cc_staff
337

edits