This section describes the CRC computation functions of the cuPHY application programming interface.
More...
|
cuphyStatus_t | cuphyCRCDecode (uint32_t *d_outputCBCRCs, uint32_t *d_outputTBCRCs, uint8_t *d_outputTransportBlocks, const uint32_t *d_inputCodeBlocks, const PerTbParams *d_tbPrmsArray, uint32_t nTBs, uint32_t maxNCBsPerTB, uint32_t maxTBByteSize, int reverseBytes, int timeIt, uint32_t NRUNS, uint32_t codeBlocksOnly, cudaStream_t strm) |
| Perform CRC decode. More...
|
|
cuphyStatus_t | cuphyCRCDecodeLaunchSetup (uint32_t nTBs, uint32_t maxNCBsPerTB, uint32_t maxTBByteSize, crcLaunchDescriptor *crcDecodeDesc) |
| populates crcLaunchDescriptor More...
|
|
cuphyStatus_t | cuphyCrcEncodeGetDescrInfo (size_t *pDescrSizeBytes, size_t *pDescrAlignBytes) |
| : Compute descriptor size and alignment for CRC Encoder. More...
|
|
cuphyStatus_t | cuphySetupCrcEncode (cuphyCrcEncodeLaunchConfig_t crcEncodeLaunchConfig, uint32_t *d_cbCRCs, uint32_t *d_tbCRCs, const uint32_t *d_inputTransportBlocks, uint8_t *d_codeBlocks, const PdschPerTbParams *d_tbPrmsArray, uint32_t nTBs, uint32_t maxNCBsPerTB, uint32_t maxTBByteSize, uint8_t reverseBytes, uint8_t codeBlocksOnly, void *cpu_desc, void *gpu_desc, uint8_t enable_desc_async_copy, cudaStream_t strm) |
| : Setup CRC encoder component. More...
|
|
◆ cuphyCRCDecode()
cuphyStatus_t cuphyCRCDecode |
( |
uint32_t * |
d_outputCBCRCs, |
|
|
uint32_t * |
d_outputTBCRCs, |
|
|
uint8_t * |
d_outputTransportBlocks, |
|
|
const uint32_t * |
d_inputCodeBlocks, |
|
|
const PerTbParams * |
d_tbPrmsArray, |
|
|
uint32_t |
nTBs, |
|
|
uint32_t |
maxNCBsPerTB, |
|
|
uint32_t |
maxTBByteSize, |
|
|
int |
reverseBytes, |
|
|
int |
timeIt, |
|
|
uint32_t |
NRUNS, |
|
|
uint32_t |
codeBlocksOnly, |
|
|
cudaStream_t |
strm |
|
) |
| |
Perform CRC Decode
Returns CUPHY_STATUS_SUCCESS if execution is successful
- Parameters
-
d_outputCBCRCs | - output buffer containing result of CRC check for each input code block (one uint32_t value per code block): 0 if the CRC check passed, a value different than zero otherwise |
d_outputTBCRCs | - output buffer containing result of CRC check for each input transport block (one uint32_t value per transport block): 0 if the CRC check passed, a value different than zero otherwise |
d_outputTransportBlocks | - output buffer containing the information bytes of each input transport block |
d_inputCodeBlocks | - input buffer containing the input code blocks |
d_tbPrmsArray | - array of PerTbParams structs describing each input transport block |
nTBs | - total number of input transport blocks |
maxNCBsPerTB | - Maximum number of code blocks per transport block for current launch |
maxTBByteSize | - Maximum size in bytes of transport block for current launch |
reverseBytes | - reverse order of bytes in each word before computing the CRC |
timeIt | - run NRUNS times and report average running time |
NRUNS | - number of iterations used to compute average running time |
codeBlocksOnly | - Only compute CRC of code blocks. Skip transport block CRC computation |
strm | - CUDA stream for execution |
- Returns
- CUPHY_STATUS_SUCCESS, CUPHY_STATUS_INVALID_ARGUMENT
- See also
- cuphyStatus_t,cuphyCRCDecodeLaunchSetup
◆ cuphyCRCDecodeLaunchSetup()
◆ cuphyCrcEncodeGetDescrInfo()
cuphyStatus_t cuphyCrcEncodeGetDescrInfo |
( |
size_t * |
pDescrSizeBytes, |
|
|
size_t * |
pDescrAlignBytes |
|
) |
| |
- Parameters
-
[in,out] | pDescrSizeBytes | Size in bytes of descriptor |
[in,out] | pDescrAlignBytes | Alignment in bytes of descriptor |
- Returns
- CUPHY_STATUS_SUCCESS or CUPHY_STATUS_INVALID_ARGUMENT
◆ cuphySetupCrcEncode()
cuphyStatus_t cuphySetupCrcEncode |
( |
cuphyCrcEncodeLaunchConfig_t |
crcEncodeLaunchConfig, |
|
|
uint32_t * |
d_cbCRCs, |
|
|
uint32_t * |
d_tbCRCs, |
|
|
const uint32_t * |
d_inputTransportBlocks, |
|
|
uint8_t * |
d_codeBlocks, |
|
|
const PdschPerTbParams * |
d_tbPrmsArray, |
|
|
uint32_t |
nTBs, |
|
|
uint32_t |
maxNCBsPerTB, |
|
|
uint32_t |
maxTBByteSize, |
|
|
uint8_t |
reverseBytes, |
|
|
uint8_t |
codeBlocksOnly, |
|
|
void * |
cpu_desc, |
|
|
void * |
gpu_desc, |
|
|
uint8_t |
enable_desc_async_copy, |
|
|
cudaStream_t |
strm |
|
) |
| |
- Parameters
-
[in] | crcEncodeLaunchConfig | Pointer to cuphyCrcEncodeLaunchConfig. |
[in,out] | d_cbCRCs | if not nullptr, output buffer with per-CB CRCs across all TBs for debugging |
[in,out] | d_tbCRCs | output buffer containing per-TB CRCs across all TBS (needed by CB kernel) |
[in] | d_inputTransportBlocks | input buffer; currently prepared via cuphyPrepareCRCEncode |
[out] | d_codeBlocks | CRC output |
[in,out] | d_tbPrmsArray | array of PdschPerTbParams structs describing each input transport block. |
[in] | nTBs | number of TBs handled in a kernel launch |
[in] | maxNCBsPerTB | maximum number of code blocks per transport block for current launch |
[in] | maxTBByteSize | maximum size in bytes of transport block for current launch |
[in] | reverseBytes | reverse order of bytes in each word before computing CRC |
[in] | codeBlocksOnly | only compute CRC of code blocks (CBs); skip transport block CRC computation. |
[in] | cpu_desc | Pointer to descriptor in CPU memory |
[in] | gpu_desc | Pointer to descriptor in GPU memory |
[in] | enable_desc_async_copy | async copy CPU descriptor into GPU if set. |
[in] | strm | CUDA stream for async copy |
- Returns
- CUPHY_STATUS_SUCCESS or CUPHY_STATUS_INVALID_ARGUMENT