Sanitizer Memory API


Data Structures

struct   Sanitizer_MemoryData
  Data passed to extended versions of Sanitizer memory APIs. More...

Functions

SanitizerResult SANITIZERAPI  sanitizerAlloc (void **devPtr, size_t size)
  Allocate memory on the device.
SanitizerResult SANITIZERAPI  sanitizerAllocEx (void **devPtr, size_t size, Sanitizer_MemoryData *memoryData)
  Allocate memory on the device.
SanitizerResult SANITIZERAPI  sanitizerFree (void *devPtr)
  Frees memory on the device.
SanitizerResult SANITIZERAPI  sanitizerFreeEx (void *devPtr, Sanitizer_MemoryData *memoryData)
  Frees memory on the device.
SanitizerResult SANITIZERAPI  sanitizerMemcpyDeviceToHost (void *dst, void *src, size_t count, CUstream stream)
  Copies data from device to host.
SanitizerResult SANITIZERAPI  sanitizerMemcpyDeviceToHostEx (void *dst, void *src, size_t count, CUstream stream, Sanitizer_MemoryData *memoryData)
  Copies data from device to host.
SanitizerResult SANITIZERAPI  sanitizerMemcpyHostToDeviceAsync (void *dst, void *src, size_t count, CUstream stream)
  Copies data from host to device.
SanitizerResult SANITIZERAPI  sanitizerMemcpyHostToDeviceAsyncEx (void *dst, void *src, size_t count, CUstream stream, Sanitizer_MemoryData *memoryData)
  Copies data from host to device.
SanitizerResult SANITIZERAPI  sanitizerMemset (void *devPtr, int value, size_t count, CUstream stream)
  Initializes or sets device memory to a value.
SanitizerResult SANITIZERAPI  sanitizerMemsetEx (void *devPtr, int value, size_t count, CUstream stream, Sanitizer_MemoryData *memoryData)
  Initializes or sets device memory to a value.

Variables

uint8_t  Sanitizer_MemoryData::perThreadStream

Detailed Description

Functions, types, and enums that implement the Sanitizer Memory API.

Function Documentation

SanitizerResult SANITIZERAPI sanitizerAlloc ( void **  devPtr,
size_t  size  
)

Equivalent of cudaMalloc that can be called within a callback function.

Note:
Thread-safety: this function is thread safe.
Parameters:
devPtr  Pointer to allocated device memory
size  Allocation size in bytes

SanitizerResult SANITIZERAPI sanitizerAllocEx ( void **  devPtr,
size_t  size,
Sanitizer_MemoryData memoryData  
)

Equivalent of cudaMalloc that can be called within a callback function.

Note:
Thread-safety: this function is thread safe.
Parameters:
devPtr  Pointer to allocated device memory
size  Allocation size in bytes
memoryData  Extra parameters for the memory allocation

SanitizerResult SANITIZERAPI sanitizerFree ( void *  devPtr  ) 

Equivalent of cudaFree that can be called within a callback function.

Note:
Thread-safety: this function is thread safe.
Parameters:
devPtr  Device pointer to memory to free

SanitizerResult SANITIZERAPI sanitizerFreeEx ( void *  devPtr,
Sanitizer_MemoryData memoryData  
)

Equivalent of cudaFree that can be called within a callback function.

Note:
Thread-safety: this function is thread safe.
Parameters:
devPtr  Device pointer to memory to free
memoryData  Extra parameters for the memory free

SanitizerResult SANITIZERAPI sanitizerMemcpyDeviceToHost ( void *  dst,
void *  src,
size_t  count,
CUstream  stream  
)

Equivalent of cudaMemcpy that can be called within a callback function. The function will return once the copy has completed.

Note:
Thread-safety: this function is thread safe.
Parameters:
dst  Destination memory address
src  Source memory address
count  Size in bytes to copy
stream  Stream identifier

SanitizerResult SANITIZERAPI sanitizerMemcpyDeviceToHostEx ( void *  dst,
void *  src,
size_t  count,
CUstream  stream,
Sanitizer_MemoryData memoryData  
)

Equivalent of cudaMemcpy that can be called within a callback function. The function will return once the copy has completed.

Note:
Thread-safety: this function is thread safe.
Parameters:
dst  Destination memory address
src  Source memory address
count  Size in bytes to copy
stream  Stream identifier
memoryData  Extra parameters for the data copy

SanitizerResult SANITIZERAPI sanitizerMemcpyHostToDeviceAsync ( void *  dst,
void *  src,
size_t  count,
CUstream  stream  
)

Equivalent of cudaMemcpyAsync that can be called within a callback function. The function will return once the pageable buffer has been copied to the staging memory for DMA transfer to device memory, but the DMA to final destination may not have completed.

Note:
Thread-safety: this function is thread safe.
Parameters:
dst  Destination memory address
src  Source memory address
count  Size in bytes to copy
stream  Stream identifier

SanitizerResult SANITIZERAPI sanitizerMemcpyHostToDeviceAsyncEx ( void *  dst,
void *  src,
size_t  count,
CUstream  stream,
Sanitizer_MemoryData memoryData  
)

Equivalent of cudaMemcpyAsync that can be called within a callback function. The function will return once the pageable buffer has been copied to the staging memory for DMA transfer to device memory, but the DMA to final destination may not have completed.

Note:
Thread-safety: this function is thread safe.
Parameters:
dst  Destination memory address
src  Source memory address
count  Size in bytes to copy
stream  Stream identifier
memoryData  Extra parameters for the data copy

SanitizerResult SANITIZERAPI sanitizerMemset ( void *  devPtr,
int  value,
size_t  count,
CUstream  stream  
)

Equivalent of cudaMemset that can be called within a callback function.

Note:
Thread-safety: this function is thread safe.
Parameters:
devPtr  Pointer to device memory
value  value to set for each byte of specified memory
count  Size in bytes to set
stream  Stream identifier

SanitizerResult SANITIZERAPI sanitizerMemsetEx ( void *  devPtr,
int  value,
size_t  count,
CUstream  stream,
Sanitizer_MemoryData memoryData  
)

Equivalent of cudaMemset that can be called within a callback function.

Note:
Thread-safety: this function is thread safe.
Parameters:
devPtr  Pointer to device memory
value  value to set for each byte of specified memory
count  Size in bytes to set
stream  Stream identifier
memoryData  Extra parameters for the data memset


Variable Documentation

Set to 1 if the API should use per-thread stream. This field is only used for memcpy/memset APIs.


Generated on Mon May 4 12:51:14 2020 for SanitizerApi by  doxygen 1.5.8