11.07.2015 Views

CUPTI User's Guide

CUPTI User's Guide

CUPTI User's Guide

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.

Return values:<strong>CUPTI</strong>_SUCCESS<strong>CUPTI</strong>_ERROR_NOT_INITIALIZED<strong>CUPTI</strong>_ERROR_INVALID_PARAMETER if buffer is NULL, does not havealignment of at least 8 bytes, or is not at least 1024 bytes in sizeCUptiResult cuptiActivityGetNextRecord (uint8_t ∗ buffer, size_tvalidBufferSizeBytes, CUpti_Activity ∗∗ record)This is a helper function to iterate over the activity records in a buffer. A buffer of activityrecords is typically obtained by using the cuptiActivityDequeueBuffer() function.An example of typical usage:CUpti_Activity *record = NULL;CUptiResult status = <strong>CUPTI</strong>_SUCCESS;do {status = cuptiActivityGetNextRecord(buffer, validSize, &record);if(status == <strong>CUPTI</strong>_SUCCESS) {// Use record here...}else if (status == <strong>CUPTI</strong>_ERROR_MAX_LIMIT_REACHED)break;else {goto Error;}} while (1);Parameters:buffer The buffer containing activity recordsrecord Inputs the previous record returned by cuptiActivityGetNextRecord andreturns the next activity record from the buffer. If input value if NULL, returnsthe first activity record in the buffer.validBufferSizeBytes The number of valid bytes in the buffer.Return values:<strong>CUPTI</strong>_SUCCESS<strong>CUPTI</strong>_ERROR_NOT_INITIALIZED<strong>CUPTI</strong>_ERROR_MAX_LIMIT_REACHED if no more records in the buffer<strong>CUPTI</strong>_ERROR_INVALID_PARAMETER if buffer is NULL.CUDA Tools SDK <strong>CUPTI</strong> User’s <strong>Guide</strong> DA-05679-001_v01 | 39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!