11.07.2015 Views

CUPTI User's Guide

CUPTI User's Guide

CUPTI User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>CUPTI</strong>_ERROR_INVALID_PARAMETER if metricIdArray oreventGroupPasses is NULLCUptiResult cuptiMetricEnumEvents (CUpti_MetricID metric,size_t ∗ eventIdArraySizeBytes, CUpti_EventID ∗ eventIdArray)Gets the event IDs in eventIdArray required to calculate a metric. The size of theeventIdArray buffer is given by ∗eventIdArraySizeBytes and must be at leastnumEvents ∗ sizeof(CUpti_EventID) or all events will not be returned. The value returnedin ∗eventIdArraySizeBytes contains the number of bytes returned in eventIdArray.Parameters:metric ID of the metriceventIdArraySizeBytes The size of eventIdArray in bytes, and returns the number ofbytes written to eventIdArrayeventIdArray Returns the IDs of the events required to calculate metricReturn values:<strong>CUPTI</strong>_SUCCESS<strong>CUPTI</strong>_ERROR_NOT_INITIALIZED<strong>CUPTI</strong>_ERROR_INVALID_METRIC_ID<strong>CUPTI</strong>_ERROR_INVALID_PARAMETER if eventIdArraySizeBytes oreventIdArray are NULL.CUptiResult cuptiMetricGetAttribute (CUpti_MetricID metric,CUpti_MetricAttribute attrib, size_t ∗ valueSize, void ∗ value)Returns a metric 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:metric ID of the metricattrib The metric 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>_SUCCESSCUDA Tools SDK <strong>CUPTI</strong> User’s <strong>Guide</strong> DA-05679-001_v01 | 105

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

Saved successfully!

Ooh no, something went wrong!