12.07.2015 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

48 Module DocumentationSee also:cudaMemcpy, cudaMemcpy2D, cudaMemcpyToArray, cudaMemcpy2DToArray, cudaMemcpyFromArray, cudaMemcpy2DFromArray,cudaMemcpyArrayToArray, cudaMemcpy2DArrayToArray, cudaMemcpyFromSymbol,cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpyToArrayAsync, cudaMemcpy2DToArrayAsync,cudaMemcpyFromArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync3.8.2.33 cudaError_t cudaMemcpyToSymbolAsync (const char ∗ symbol, const void ∗ src, size_t count,size_t offset, enum cudaMemcpyKind kind, cudaStream_t stream)Copies count bytes from the memory area pointed to by src to the memory area pointed to by offset bytes fromthe start of symbol symbol. The memory areas may not overlap. symbol can either be a variable that resides inglobal or constant memory space, or it can be a character string, naming a variable that resides in global or constantmemory space. kind can be either cudaMemcpyHostToDevice or cudaMemcpyDeviceToDevice.cudaMemcpyToSymbolAsync() is asynchronous with respect to the host, so the call may return before the copy iscomplete. It only works on page-locked host memory and returns an error if a pointer to pageable memory is passedas input. The copy can optionally be associated to a stream by passing a non-zero stream argument. If kind iscudaMemcpyHostToDevice and stream is non-zero, the copy may overlap with operations in other streams.IMPORTANT NOTE: Copies with kind == cudaMemcpyDeviceToDevice are asynchronous with respect to thehost, but never overlap with kernel execution.Parameters:symbol - Symbol destination on devicesrc - Source memory addresscount - Size in bytes to copyoffset - Offset from start of symbol in byteskind - Type of transferstream - Stream identifierReturns:Note:cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidSymbol, cudaErrorInvalidDevicePointer, cudaErrorInvalidMemcpyDirectionSee also:Note that this function may also return error codes from previous, asynchronous launches.cudaMemcpy, cudaMemcpy2D, cudaMemcpyToArray, cudaMemcpy2DToArray, cudaMemcpyFromArray, cudaMemcpy2DFromArray,cudaMemcpyArrayToArray, cudaMemcpy2DArrayToArray, cudaMemcpyToSymbol,cudaMemcpyFromSymbol, cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpyToArrayAsync, cudaMemcpy2DToArrayAsync,cudaMemcpyFromArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyFromSymbolAsync3.8.2.34 cudaError_t cudaMemset (void ∗ devPtr, int value, size_t count)Fills the first count bytes of the memory area pointed to by devPtr with the constant byte value value.Generated 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!