Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > nonfree-updates > by-pkgid > fd8445e7e4d58b8cfe6e0150bd441ee1 > files > 1874

nvidia-cuda-toolkit-devel-6.5.14-6.1.mga5.nonfree.x86_64.rpm

.TH "Occupancy" 3 "7 Aug 2014" "Version 6.0" "Doxygen" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Occupancy \- 
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBCUresult\fP \fBcuOccupancyMaxActiveBlocksPerMultiprocessor\fP (int *numBlocks, \fBCUfunction\fP func, int blockSize, size_t dynamicSMemSize)"
.br
.RI "\fIReturns occupancy of a function. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuOccupancyMaxPotentialBlockSize\fP (int *minGridSize, int *blockSize, \fBCUfunction\fP func, \fBCUoccupancyB2DSize\fP blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit)"
.br
.RI "\fISuggest a launch configuration with reasonable occupancy. \fP"
.in -1c
.SH "Detailed Description"
.PP 
\\brief occupancy calculation functions of the low-level CUDA driver API (\fBcuda.h\fP)
.PP
This section describes the occupancy calculation functions of the low-level CUDA driver application programming interface. 
.SH "Function Documentation"
.PP 
.SS "\fBCUresult\fP cuOccupancyMaxActiveBlocksPerMultiprocessor (int * numBlocks, \fBCUfunction\fP func, int blockSize, size_t dynamicSMemSize)"
.PP
Returns in \fC*numBlocks\fP the number of the maximum active blocks per streaming multiprocessor.
.PP
\fBParameters:\fP
.RS 4
\fInumBlocks\fP - Returned occupancy 
.br
\fIfunc\fP - Kernel for which occupancy is calulated 
.br
\fIblockSize\fP - Block size the kernel is intended to be launched with 
.br
\fIdynamicSMemSize\fP - Per-block dynamic shared memory usage intended, in bytes
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_UNKNOWN\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches. 
.RE
.PP

.SS "\fBCUresult\fP cuOccupancyMaxPotentialBlockSize (int * minGridSize, int * blockSize, \fBCUfunction\fP func, \fBCUoccupancyB2DSize\fP blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit)"
.PP
Returns in \fC*blockSize\fP a reasonable block size that can achieve the maximum occupancy (or, the maximum number of active warps with the fewest blocks per multiprocessor), and in \fC*minGridSize\fP the minimum grid size to achieve the maximum occupancy.
.PP
If \fCblockSizeLimit\fP is 0, the configurator will use the maximum block size permitted by the device / function instead.
.PP
If per-block dynamic shared memory allocation is not needed, the user should leave both \fCblockSizeToDynamicSMemSize\fP and \fCdynamicSMemSize\fP as 0.
.PP
If per-block dynamic shared memory allocation is needed, then if the dynamic shared memory size is constant regardless of block size, the size should be passed through \fCdynamicSMemSize\fP, and \fCblockSizeToDynamicSMemSize\fP should be NULL.
.PP
Otherwise, if the per-block dynamic shared memory size varies with different block sizes, the user needs to provide a unary function through \fCblockSizeToDynamicSMemSize\fP that computes the dynamic shared memory needed by \fCfunc\fP for any given block size. \fCdynamicSMemSize\fP is ignored. An example signature is:
.PP
.PP
.nf
    // Take block size, returns dynamic shared memory needed
    size_t blockToSmem(int blockSize);
.fi
.PP
.PP
\fBParameters:\fP
.RS 4
\fIminGridSize\fP - Returned minimum grid size needed to achieve the maximum occupancy 
.br
\fIblockSize\fP - Returned maximum block size that can achieve the maximum occupancy 
.br
\fIfunc\fP - Kernel for which launch configuration is calulated 
.br
\fIblockSizeToDynamicSMemSize\fP - A function that calculates how much per-block dynamic shared memory \fCfunc\fP uses based on the block size 
.br
\fIdynamicSMemSize\fP - Dynamic shared memory usage intended, in bytes 
.br
\fIblockSizeLimit\fP - The maximum block size \fCfunc\fP is designed to handle
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_UNKNOWN\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches. 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen from the source code.