<div><font class="Apple-style-span" color="#534741" face="Arial, Verdana, sans-serif">I'll try to answer, but feel free to ask for clarification if I don't illuminate the topic.</font></div><div><font class="Apple-style-span" color="#534741" face="Arial, Verdana, sans-serif"><br>
</font></div><div><font class="Apple-style-span" color="#534741" face="Arial, Verdana, sans-serif">nvcc is really just a coordinator for many calls.  nvcc makes a series of calls, producing intermediate code (PTX files), that can then be just-in-time compiled into final (.cubin) architecture specific code by the nvida libraries.  In a sense, yes, it compiles source code, but then breaks out kernel code to be targeted to the GPU device architecture(s).  Later in the compilation sequence they all get merged into one file.</font></div>
<div><font class="Apple-style-span" color="#534741" face="Arial, Verdana, sans-serif"><br></font></div><div><span class="Apple-style-span" style="font-family: Arial, Verdana, sans-serif; font-size: 13px; color: rgb(83, 71, 65); ">I attach an example of a C++ file that includes at the top in the comments the 15 commands issued by the nvcc nVidia compiler coordinator.  The final (15th command) is the link stage, producing a final executable that depends upon several shared libraries.  The matrixMul.cu example from the SDK is consolidated into one file, matrixMul.cu.txt, and the commands used to assemble the final binary broken out at the top of the file.</span></div>
<div><br></div>Thanks again.<div><br></div><div>Best regards,</div><div>Jason<br><br></div><div><br>-- <br>Jason E. Aten, Ph.D.<br></div><div><br></div><div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="h5">
> Perhaps I don't understand how nvcc and CUDA work.  Is it the case that all source code is compiled by nvcc and then linked to create an executable, or is there some other preprocessor/compiler/linker/loader that is involved?<br>

><br>
> Marc<br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br><br>
</div>