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.

Parameters:eventDomain ID of the event domainnumEvents Returns the number of events in the domainReturn values:<strong>CUPTI</strong>_SUCCESS<strong>CUPTI</strong>_ERROR_NOT_INITIALIZED<strong>CUPTI</strong>_ERROR_INVALID_EVENT_DOMAIN_ID<strong>CUPTI</strong>_ERROR_INVALID_PARAMETER if numEvents is NULLCUptiResult cuptiEventGetAttribute (CUpti_EventID event,CUpti_EventAttribute attrib, size_t ∗ valueSize, void ∗ value)Returns an event attribute in ∗value. The size of the value buffer is given by ∗valueSize.The value returned in ∗valueSize contains the number of bytes returned in value.If the attribute value is a c-string that is longer than ∗valueSize, then only the first∗valueSize characters will be returned and there will be no terminating null byte.Parameters:event ID of the eventattrib The event attribute to readvalueSize The size of the value buffer in bytes, and returns the number of byteswritten to valuevalue Returns the attribute’s valueReturn values:<strong>CUPTI</strong>_SUCCESS<strong>CUPTI</strong>_ERROR_NOT_INITIALIZED<strong>CUPTI</strong>_ERROR_INVALID_EVENT_ID<strong>CUPTI</strong>_ERROR_INVALID_PARAMETER if valueSize or value is NULL, or ifattrib is not an event attribute<strong>CUPTI</strong>_ERROR_PARAMETER_SIZE_NOT_SUFFICIENT For non-c-stringattribute values, indicates that the value buffer is too small to hold the attributevalue.CUptiResult cuptiEventGetIdFromName (CUdevice device, constchar ∗ eventName, CUpti_EventID ∗ event)Find an event by name and return the event ID in ∗event.CUDA Tools SDK <strong>CUPTI</strong> User’s <strong>Guide</strong> DA-05679-001_v01 | 89

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

Saved successfully!

Ooh no, something went wrong!