12.07.2015 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

110 Module DocumentationReturns:Note:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_CONTEXT, <strong>CUDA</strong>_ERROR_INVALID_VALUE, <strong>CUDA</strong>_ERROR_NOT_FOUNDSee also:Note that this function may also return error codes from previous, asynchronous launches.cuModuleGetFunction, cuModuleGetGlobal, cuModuleLoad, cuModuleLoadData, cuModuleLoadDataEx, cu-ModuleLoadFatBinary, cuModuleUnload3.21.2.4 CUresult cuModuleLoad (CUmodule ∗ phMod, const char ∗ fname)Takes a filename fname and loads the corresponding module phMod into the current context. The <strong>CUDA</strong> driver APIdoes not attempt to lazily allocate the resources needed by a module; if the memory for functions and data (constantand global) needed by the module cannot be allocated, cuModuleLoad() fails. The file should be a cubin file as outputby nvcc or a PTX file, either as output by nvcc or handwrtten.Parameters:phMod - Returned modulefname - Filename of module to loadReturns:Note:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_CONTEXT, <strong>CUDA</strong>_ERROR_INVALID_VALUE, <strong>CUDA</strong>_ERROR_NOT_FOUND,<strong>CUDA</strong>_ERROR_OUT_OF_MEMORY, <strong>CUDA</strong>_ERROR_FILE_NOT_FOUNDSee also:Note that this function may also return error codes from previous, asynchronous launches.cuModuleGetFunction, cuModuleGetGlobal, cuModuleGetTexRef, cuModuleLoadData, cuModuleLoadDataEx,cuModuleLoadFatBinary, cuModuleUnload3.21.2.5 CUresult cuModuleLoadData (CUmodule ∗ phMod, const void ∗ p)Takes a pointer p and loads the corresponding module phMod into the current context. The pointer may be obtainedby mapping a cubin or PTX file, passing a cubin or PTX file as a text string, or incorporating a cubin object into theexecutable resources and using operating system calls such as Windows FindResource() to obtain the pointer.Parameters:phMod - Returned modulep - Module data to loadReturns:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_CONTEXT, <strong>CUDA</strong>_ERROR_INVALID_VALUE, <strong>CUDA</strong>_ERROR_OUT_OF_MEMORYGenerated on Wed Apr 1 16:11:42 2009 for <strong>NVIDIA</strong> <strong>CUDA</strong> Library by Doxygen

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

Saved successfully!

Ooh no, something went wrong!