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.

3.21 Module Management 111Note:See also:Note that this function may also return error codes from previous, asynchronous launches.cuModuleGetFunction, cuModuleGetGlobal, cuModuleGetTexRef, cuModuleLoad, cuModuleLoadDataEx, cu-ModuleLoadFatBinary, cuModuleUnload3.21.2.6 CUresult cuModuleLoadDataEx (CUmodule ∗ phMod, const void ∗ p, unsigned int numOptions,CUjit_option ∗ options, void ∗∗ optionValues)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.Options are passed as an array via options and any corresponding parameters are passed in optionValues. Thenumber of total options is supplied via numOptions. Any outputs will be returned via optionValues. Supportedoptions are:• CU_JIT_MAX_REGISTERS: input specifies the maximum number of registers per thread;• CU_JIT_THREADS_PER_BLOCK: input specifies number of threads per block to target compilation for; outputreturns the number of threads the compiler actually targeted;• CU_JIT_WALL_TIME: output returns the float value of wall clock time, in milliseconds, spent compiling thePTX code;• CU_JIT_INFO_LOG_BUFFER: input is a pointer to a buffer in which to print any informational log messagesfrom PTX assembly;• CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES: input is the size in bytes of the buffer; output is the number ofbytes filled with messages;• CU_JIT_ERROR_LOG_BUFFER: input is a pointer to a buffer in which to print any error log messages fromPTX assembly;• CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES: input is the size in bytes of the buffer; output is the numberof bytes filled with messages;• CU_JIT_OPTIMIZATION_LEVEL: input is the level of optimization to apply to generated code (0 - 4), with 4being the default and highest level;• CU_JIT_TARGET_FROM_CUCONTEXT: causes compilation target to be determined based on current attachedcontext (default);• CU_JIT_TARGET: input is the compilation target based on supplied CUjit_target_enum; possible values are:Parameters:– CU_TARGET_COMPUTE_10– CU_TARGET_COMPUTE_11– CU_TARGET_COMPUTE_12– CU_TARGET_COMPUTE_13phMod - Returned modulep - Module data to loadGenerated 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!