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.8 Memory Management 273.8.2.4 cudaError_t cudaGetSymbolAddress (void ∗∗ devPtr, const char ∗ symbol)Returns in ∗devPtr the address of symbol symbol on the device. symbol can either be a variable that residesin global memory space, or it can be a character string, naming a variable that resides in global memory space. Ifsymbol cannot be found, or if symbol is not declared in the global memory space, ∗devPtr is unchanged and theerror cudaErrorInvalidSymbol is returned.Parameters:devPtr - Return device pointer associated with symbolsymbol - Global variable or string symbol to search forReturns:Note:See also:cudaSuccess, cudaErrorInvalidSymbol, cudaErrorAddressOfConstantNote that this function may also return error codes from previous, asynchronous launches.cudaGetSymbolAddress (C++ API) cudaGetSymbolSize (C API)3.8.2.5 cudaError_t cudaGetSymbolSize (size_t ∗ size, const char ∗ symbol)Returns in ∗size the size of symbol symbol. symbol can either be a variable that resides in global or constantmemory space, or it can be a character string, naming a variable that resides in global or constant memory space. Ifsymbol cannot be found, or if symbol is not declared in global or constant memory space, ∗size is unchangedand the error cudaErrorInvalidSymbol is returned.Parameters:size - Size of object associated with symbolsymbol - Global variable or string symbol to find size ofReturns:Note:See also:cudaSuccess, cudaErrorInvalidSymbolNote that this function may also return error codes from previous, asynchronous launches.cudaGetSymbolAddress (C API) cudaGetSymbolSize (C++ API)3.8.2.6 cudaError_t cudaHostAlloc (void ∗∗ ptr, size_t size, unsigned int flags)Allocates count bytes of host memory that is page-locked and accessible to the device. The driver tracks the virtualmemory ranges allocated with this function and automatically accelerates calls to functions such as cudaMemcpy().Since the memory can be accessed directly by the device, it can be read or written with much higher bandwidth thanpageable memory obtained with functions such as malloc(). Allocating excessive amounts of pinned memory mayGenerated 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!