Class CUDAScanCompaction

Class Documentation

class CUDAScanCompaction

Utility for managing storage of scan/compaction buffers shared between all functions of a particular stream

Public Types

enum Type

Different scan reasons have different buffers, as it’s possible an agent function uses all at once

Values:

enumerator MESSAGE_OUTPUT
enumerator AGENT_DEATH
enumerator AGENT_OUTPUT

Public Functions

inline CUDAScanCompaction()

Default constructor

CUDAScanCompaction(CUDAScanCompaction const&) = delete

Copy construction is disabled

void operator=(CUDAScanCompaction const&) = delete

Assignment is disabled

void resize(unsigned int newCount, const Type &type, unsigned int streamId)

Resize the scan flag buffer for the specified stream and type for the provided number of items CUDAScanCompaction methods

Parameters:
  • newCount – The number of scan flags that the resized buffer must be able to hold

  • type – The type of the scan flag buffer to be resized

  • streamId – The stream index of the scan flag buffer to be resized

void zero_async(const Type &type, cudaStream_t stream, unsigned int streamId)

Reset all scan flags in the buffer for the specified stream and type to zero

Note

This method is async, the cuda stream is not synchronised

Parameters:
  • type – The type of the scan flag buffer to be zerod

  • stream – The CUDA stream used to execute the memset

  • streamId – The stream index of the scan flag buffer to be zerod

const CUDAScanCompactionConfig &getConfig(const Type &type, unsigned int streamId)

Returns a const reference to the scan flag config structure for the specified stream and type

See also

Config() for the non-const variant.

Parameters:
  • type – The type of the scan flag buffer to return

  • streamId – The stream index of the scan flag buffer to return

CUDAScanCompactionConfig &Config(const Type &type, unsigned int streamId)

Returns a reference to the scan flag config structure for the specified stream and type

See also

getConfig() for the const variant.

Parameters:
  • type – The type of the scan flag buffer to return

  • streamId – The stream index of the scan flag buffer to return

Public Static Attributes

static const unsigned int MAX_TYPES = 3

Number of valid values in Type

static const unsigned int MAX_STREAMS = 128

As of Compute Capability 7.5; 128 is the max concurrent streams