Sanitizer Api - v2019.1 (older) - Last updated January 01, 2019 - Send Feedback -

## 2. Data Structures

Here are the data structures with brief descriptions:

Sanitizer_BatchMemopData
  Data passed into a batch memop callback function
Sanitizer_CallbackData
  Data passed into a runtime or driver API callback function
Sanitizer_LaunchData
  Data passed into a launch callback function
Sanitizer_MemcpyData
  Data passed into a memcpy callback function
Sanitizer_MemsetData
  Data passed into a memset callback function
Sanitizer_ResourceContextData
  Data passed into a context resource callback function
Sanitizer_ResourceMemoryData
  Data passed into a memory resource callback function
Sanitizer_ResourceModuleData
  Data passed into a module resource callback function
Sanitizer_ResourceStreamData
  Data passed into a stream resource callback function
Sanitizer_SynchronizeData
  Data passed into a synchronization callback function

### 2.1. Sanitizer_BatchMemopData Struct Reference

### [Sanitizer Callback API]

Data passed into a batch memop callback function as the `cbdata` argument to Sanitizer_CallbackFunc. The `cbdata` will be this type for `domain` equal to SANITIZER_CB_DOMAIN_BATCH_MEMOP. The callback data is only valid 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 it.

#### Public Variables

uint64_t address
CUcontext context
CUstream stream
Sanitizer_BatchMemopType type
uint64_t value

#### Variables

uint64_t Sanitizer_BatchMemopData::address [inherited]

  The address to be written.

CUcontext Sanitizer_BatchMemopData::context [inherited]

  The context where the allocation is located

CUstream Sanitizer_BatchMemopData::stream [inherited]

  The stream where the batch memop is executed.

Sanitizer_BatchMemopType Sanitizer_BatchMemopData::type [inherited]

  Type of batch memory operation.

uint64_t Sanitizer_BatchMemopData::value [inherited]

  The value to be written.

### 2.2. Sanitizer_CallbackData Struct Reference

### [Sanitizer Callback API]

Data passed into a runtime or driver API callback function as the `cbdata` argument to Sanitizer_CallbackFunc. The `cbdata` will be this type for `domain` equal to SANITIZER_CB_DOMAIN_DRIVER_API or SANITIZER_CB_DOMAIN_RUNTIME_API. 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 of a copy of that data. For example, if you make a shallow copy of Sanitizer_CallbackData within a callback, you cannot dereference `functionParams` outside of that callback to access the function parameters. `functionName` is an exception: the string pointed to by `functionName` is a global constant and so may be accessed outside of the callback.

#### Public Variables

Sanitizer_ApiCallbackSite callbackSite
CUcontext context
const char * functionName
const void * functionParams
const void * functionReturnValue
const char * symbolName

#### Variables

Sanitizer_ApiCallbackSite Sanitizer_CallbackData::callbackSite [inherited]

  Point in the runtime or driver function from where the callback was issued.

CUcontext Sanitizer_CallbackData::context [inherited]

  Driver context current to the thread, or null if no context is current. This value can change from the entry to exit callback of a runtime API function if the runtime initialized a context.

const char * Sanitizer_CallbackData::functionName [inherited]

  Name of the runtime or driver API function which issued the callback. This string is a global constant and so may be accessed outside of the callback.

const void * Sanitizer_CallbackData::functionParams [inherited]

  Pointer to the arguments passed to the runtime or driver API call. See generated_cuda_runtime_api_meta.h and generated_cuda_meta.h for structure definitions for the parameters for each runtime and driver API function.

const void * Sanitizer_CallbackData::functionReturnValue [inherited]

  Pointer to the return value of the runtime or driver API call. This field is only valid within the SANITIZER_API_EXIT callback. For a runtime API `functionReturnValue` points to a `cudaError_t`. For a driver API `functionReturnValue` points to a `CUresult`.

const char * Sanitizer_CallbackData::symbolName [inherited]

  Name of the symbol operated on by the runtime or driver API function which issued the callback. This entry is valid only for driver and runtime launch callbacks, where it returns the name of the kernel.

### 2.3. Sanitizer_LaunchData Struct Reference

### [Sanitizer Callback API]

Data passed into a launch callback function as the `cbdata` argument to Sanitizer_CallbackFunc. The `cbdata` will be this type for `domain` equal to SANITIZER_CB_DOMAIN_LAUNCH. The callback data is only valid 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 it.

#### Public Variables

CUcontext context
CUfunction function
const char * functionName
uint32_t gridDim_x
uint64_t gridId
CUmodule module
CUstream stream

#### Variables

CUcontext Sanitizer_LaunchData::context [inherited]

  The context where the grid is launched.

CUfunction Sanitizer_LaunchData::function [inherited]

  The function of the grid launch.

const char * Sanitizer_LaunchData::functionName [inherited]

  The name of the launched function.

uint32_t Sanitizer_LaunchData::gridDim_x [inherited]

  Launch properties of the grid. These values are only valid for SANITIZER_CBID_LAUNCH_BEGIN callback

uint64_t Sanitizer_LaunchData::gridId [inherited]

  Unique identifier of the grid launch.

CUmodule Sanitizer_LaunchData::module [inherited]

  The module containing the grid code.

CUstream Sanitizer_LaunchData::stream [inherited]

  The stream where the grid is launched.

### 2.4. Sanitizer_MemcpyData Struct Reference

### [Sanitizer Callback API]

Data passed into a launch callback function as the `cbdata` argument to Sanitizer_CallbackFunc. The `cbdata` will be this type for `domain` equal to SANITIZER_CB_DOMAIN_MEMCPY. The callback data is only valid 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 it.

#### Public Variables

uint64_t dstAddress
CUcontext dstContext
uint32_t isAsync
uint64_t size
uint64_t srcAddress
CUcontext srcContext

#### Variables

uint64_t Sanitizer_MemcpyData::dstAddress [inherited]

  The destination allocation address.

CUcontext Sanitizer_MemcpyData::dstContext [inherited]

  The context where the destination allocation is located

uint32_t Sanitizer_MemcpyData::isAsync [inherited]

  Boolean value indicating if the transfer is asynchronous.

uint64_t Sanitizer_MemcpyData::size [inherited]

  Size of the transfer in bytes.

uint64_t Sanitizer_MemcpyData::srcAddress [inherited]

  The source allocation address.

CUcontext Sanitizer_MemcpyData::srcContext [inherited]

  The context where the source allocation is located

### 2.5. Sanitizer_MemsetData Struct Reference

### [Sanitizer Callback API]

Data passed into a launch callback function as the `cbdata` argument to Sanitizer_CallbackFunc. The `cbdata` will be this type for `domain` equal to SANITIZER_CB_DOMAIN_MEMSET. The callback data is only valid 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 it.

#### Public Variables

uint64_t address
CUcontext context
uint32_t isAsync
uint32_t value
uint64_t width

#### Variables

uint64_t Sanitizer_MemsetData::address [inherited]

  The address of the memset start.

CUcontext Sanitizer_MemsetData::context [inherited]

  The context where the allocation is located.

uint32_t Sanitizer_MemsetData::isAsync [inherited]

  Boolean value indicating if the transfer is asynchronous.

uint32_t Sanitizer_MemsetData::value [inherited]

  Value to be written.

uint64_t Sanitizer_MemsetData::width [inherited]

  Memset size configuration.

### 2.6. Sanitizer_ResourceContextData Struct Reference

### [Sanitizer Callback API]

Data passed into a context resource callback function as the `cbdata` argument to Sanitizer_CallbackFunc. The `cbdata` will be this type for `domain` equal to SANITIZER_CB_DOMAIN_RESOURCE and `cbid` equal to SANITIZER_CBID_RESOURCE_CONTEXT_CREATION_STARTING, SANITIZER_CBID_RESOURCE_CONTEXT_CREATION_FINISHED, SANITIZER_CBID_RESOURCE_CONTEXT_DESTROY_STARTING or SANITIZER_CBID_RESOURCE_CONTEXT_DESTROY_FINISHED. The callback data is only valid 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 it.

#### Public Variables

CUcontext context
CUdevice device

#### Variables

CUcontext Sanitizer_ResourceContextData::context [inherited]

  The context being created or destroyed.

CUdevice Sanitizer_ResourceContextData::device [inherited]

  The device on which the context is being created or destroyed. This field is only valid for SANITIZER_CBID_RESOURCE_CONTEXT_CREATION_* callbacks

### 2.7. Sanitizer_ResourceMemoryData Struct Reference

### [Sanitizer Callback API]

Data passed into a memory resource callback function as the `cbdata` argument to Sanitizer_CallbackFunc. The `cbdata` will be this type for `domain` equal to SANITIZER_CB_DOMAIN_RESOURCE and `cbid` equal to SANITIZER_CBID_RESOURCE_DEVICE_MEMORY_ALLOC, SANITIZER_CBID_RESOURCE_DEVICE_MEMORY_FREE, SANITIZER_CBID_RESOURCE_HOST_MEMORY_ALLOC, SANITIZER_CBID_RESOURCE_HOST_MEMORY_FREE, SANITIZER_CBID_RESOURCE_SURFACE_OBJECT_CREATED or SANITIZER_CBID_RESOURCE_SURFACE_OBJECT_DESTROY. The callback data is only valid 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 it.

#### Public Variables

uint64_t address
CUcontext context
uint64_t flags
uint64_t size

#### Variables

uint64_t Sanitizer_ResourceMemoryData::address [inherited]

  Address of the allocation being created or destroyed.

CUcontext Sanitizer_ResourceMemoryData::context [inherited]

  Context containing the allocation being created or destroyed.

uint64_t Sanitizer_ResourceMemoryData::flags [inherited]

  Allocation details: use Sanitizer_ResourceMemoryFlags to interpret this field.

uint64_t Sanitizer_ResourceMemoryData::size [inherited]

  Size of the allocation being created or destroyed.

### 2.8. Sanitizer_ResourceModuleData Struct Reference

### [Sanitizer Callback API]

Data passed into a module resource callback function as the `cbdata` argument to Sanitizer_CallbackFunc. The `cbdata` will be this type for `domain` equal to SANITIZER_CB_DOMAIN_RESOURCE and `cbid` equal to SANITIZER_CBID_RESOURCE_MODULE_LOADED or SANITIZER_CBID_RESOURCE_MODULE_UNLOAD_STARTING. The callback data is only valid 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 it.

#### Public Variables

CUcontext context
size_t cubinSize
CUmodule module
const char * pCubin

#### Variables

CUcontext Sanitizer_ResourceModuleData::context [inherited]

  The context containing the module being loaded or unloaded.

size_t Sanitizer_ResourceModuleData::cubinSize [inherited]

  The size of the cubin.

CUmodule Sanitizer_ResourceModuleData::module [inherited]

  The module being loaded or unloaded.

const char * Sanitizer_ResourceModuleData::pCubin [inherited]

  Pointer to the associated cubin.

### 2.9. Sanitizer_ResourceStreamData Struct Reference

### [Sanitizer Callback API]

Data passed into a stream resource callback function as the `cbdata` argument to Sanitizer_CallbackFunc. The `cbdata` will be this type for `domain` equal to SANITIZER_CB_DOMAIN_RESOURCE and `cbid` equal to SANITIZER_CBID_RESOURCE_STREAM_CREATED or SANITIZER_CBID_RESOURCE_STREAM_DESTROY_STARTING. The callback data is only valid 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 it.

#### Public Variables

CUcontext context
CUstream stream

#### Variables

CUcontext Sanitizer_ResourceStreamData::context [inherited]

  The context containing the stream being created or destroyed.

CUstream Sanitizer_ResourceStreamData::stream [inherited]

  The stream being created or destroyed.

### 2.10. Sanitizer_SynchronizeData Struct Reference

### [Sanitizer Callback API]

Data passed into a synchronization callback function as the `cbdata` argument to Sanitizer_CallbackFunc. The `cbdata` will be this type for `domain` equal to SANITIZER_CB_DOMAIN_SYNCHRONIZE. The callback data is only valid 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 it.

#### Public Variables

CUcontext context
CUstream stream

#### Variables

CUcontext Sanitizer_SynchronizeData::context [inherited]

  For SANITIZER_CBID_SYNCHRONIZE_CONTEXT_SYNCHRONIZED, this is the context being synchronized. For SANITIZER_CBID_SYNCHRONIZE_STREAM_SYNCHRONIZED, this is the context of the stream being synchronized.

CUstream Sanitizer_SynchronizeData::stream [inherited]

  This field is only valid for SANITIZER_CBID_SYNCHRONIZE_STREAM_SYNCHRONIZED. This is the stream being synchronized.