11.01.2014 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

SHOW MORE
SHOW LESS

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

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

106 Module Documentation<br />

array - Memory array on device<br />

desc - Channel format<br />

Returns:<br />

Note:<br />

See also:<br />

cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevicePointer, cudaErrorInvalidTexture<br />

Note that this function may also return error codes from previous, asynchronous launches.<br />

cudaCreateChannelDesc (C++ API), cudaGetChannelDesc, cudaGetTextureReference, cudaBindTexture (C++<br />

API), cudaBindTexture (C++ API, inherited channel descriptor), cudaBindTexture2D (C++ API), cudaBind-<br />

TextureToArray (C API), cudaBindTextureToArray (C++ API, inherited channel descriptor), cudaUnbindTexture<br />

(C++ API), cudaGetTextureAlignmentOffset (C++ API)<br />

4.19.2.6 template cudaChannelFormatDesc cudaCreateChannelDesc (void)<br />

Returns a channel descriptor with format f and number of bits of each component x, y, z, and w. The cudaChannelFormatDesc<br />

is defined as:<br />

struct cudaChannelFormatDesc {<br />

int x, y, z, w;<br />

enum cudaChannelFormatKind f;<br />

};<br />

where cudaChannelFormatKind is one of cudaChannelFormatKindSigned, cudaChannelFormatKindUnsigned, or cudaChannelFormatKindFloat.<br />

Returns:<br />

See also:<br />

Channel descriptor with format f<br />

cudaCreateChannelDesc (Low level), cudaGetChannelDesc, cudaGetTextureReference, cudaBindTexture (High<br />

level), cudaBindTexture (High level, inherited channel descriptor), cudaBindTexture2D (High level), cudaBind-<br />

TextureToArray (High level), cudaBindTextureToArray (High level, inherited channel descriptor), cudaUnbind-<br />

Texture (High level), cudaGetTextureAlignmentOffset (High level)<br />

4.19.2.7 template cudaError_t cudaFuncGetAttributes (struct cudaFuncAttributes ∗ attr, T ∗<br />

entry)<br />

This function obtains the attributes of a function specified via entry. The parameter entry can either be a pointer<br />

to a function that executes on the device, or it can be a character string specifying the fully-decorated (C++) name<br />

of a function that executes on the device. The parameter specified by entry must be declared as a __global__<br />

function. The fetched attributes are placed in attr. If the specified function does not exist, then cudaErrorInvalidDeviceFunction<br />

is returned.<br />

Parameters:<br />

attr - Return pointer to function’s attributes<br />

Generated 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!