# CUpti_ResourceData Struct Reference
[CUPTI Callback API]

Data passed into a resource callback function. More...

## Data Fields

CUcontext | context
void * | resourceDescriptor
CUstream | stream

## Detailed Description

Data passed into a resource callback function as the `cbdata` argument to CUpti_CallbackFunc. The `cbdata` will be this type for `domain` equal to CUPTI_CB_DOMAIN_RESOURCE. The callback data is valid only within the invocation of the callback function that is passed the data. If you need to retain some data for use outside of the callback, you must make a copy of that data.

## Field Documentation

CUcontext CUpti_ResourceData::context

For CUPTI_CBID_RESOURCE_CONTEXT_CREATED and CUPTI_CBID_RESOURCE_CONTEXT_DESTROY_STARTING, the context being created or destroyed. For CUPTI_CBID_RESOURCE_STREAM_CREATED and CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING, the context containing the stream being created or destroyed.

void* CUpti_ResourceData::resourceDescriptor

Reserved for future use.

CUstream CUpti_ResourceData::stream

For CUPTI_CBID_RESOURCE_STREAM_CREATED and CUPTI_CBID_RESOURCE_STREAM_DESTROY_STARTING, the stream being created or destroyed.