Skip to content

Class Spinnaker::SpinnakerGPU

ClassList > Spinnaker > SpinnakerGPU

Provides the functionality for the user to post process images on an NVIDIA GPU device.

  • #include <SpinnakerGPU.h>

Inherits the following classes: Spinnaker::ISpinnakerGPU

Public Types

Type Name
typedef Spinnaker::StreamPriority StreamPriority

Public Functions

Type Name
virtual ImagePtr Decompress (const ImagePtr & srcImage) const
virtual void Decompress (const ImagePtr & srcImage, ImagePtr & destImage) const
virtual StreamPriority GetDecompressStreamPriority () const
virtual unsigned int GetDecompressThreadsPerBlock () const
virtual void SetDecompressStreamPriority (StreamPriority priority)
virtual void SetDecompressThreadsPerBlock (unsigned int threadsPerBlock)
SpinnakerGPU ()
~SpinnakerGPU ()

Public Functions inherited from Spinnaker::ISpinnakerGPU

See Spinnaker::ISpinnakerGPU

Type Name
virtual ImagePtr Decompress (const ImagePtr & srcImage) const = 0
virtual void Decompress (const ImagePtr & srcImage, ImagePtr & destImage) const = 0
virtual StreamPriority GetDecompressStreamPriority () const = 0
virtual unsigned int GetDecompressThreadsPerBlock () const = 0
virtual void SetDecompressStreamPriority (StreamPriority priority) = 0
virtual void SetDecompressThreadsPerBlock (unsigned int threadsPerBlock) = 0
virtual ~ISpinnakerGPU (void)

Protected Attributes inherited from Spinnaker::ISpinnakerGPU

See Spinnaker::ISpinnakerGPU

Type Name
SpinnakerGPUData * m_pSpinnakerGPUData

Protected Functions inherited from Spinnaker::ISpinnakerGPU

See Spinnaker::ISpinnakerGPU

Type Name
ISpinnakerGPU ()
ISpinnakerGPU (const ISpinnakerGPU &)
ISpinnakerGPU & operator= (const ISpinnakerGPU &)

Public Types Documentation

typedef StreamPriority

typedef Spinnaker::StreamPriority Spinnaker::SpinnakerGPU::StreamPriority;

Public Functions Documentation

function Decompress [1/2]

virtual ImagePtr Spinnaker::SpinnakerGPU::Decompress (
    const ImagePtr & srcImage
) const

Decompresses the source image buffer and returns the result in a new image. The destination image does not need to be configured in any way before the call is made.

Parameters:

  • srcImage The source image from which to convert the image from.

Returns:

The decompressed image.

Implements Spinnaker::ISpinnakerGPU::Decompress


function Decompress [2/2]

virtual void Spinnaker::SpinnakerGPU::Decompress (
    const ImagePtr & srcImage,
    ImagePtr & destImage
) const

Decompresses the source image buffer and stores the result in the destination image. The destination image needs to be configured to have the correct buffer size before calling this function. See ResetImage() to setup the correct buffer size according to the decompressed pixel format.

See also: ResetImage

Parameters:

  • srcImage The source image from which to decompress the image from.
  • destImage The destination image in which the decompressed image data will be stored.

Implements Spinnaker::ISpinnakerGPU::Decompress


function GetDecompressStreamPriority

virtual StreamPriority Spinnaker::SpinnakerGPU::GetDecompressStreamPriority () const

Returns stream priority used by internal GPU decompression work.

Returns:

Current stream priority setting.

Implements Spinnaker::ISpinnakerGPU::GetDecompressStreamPriority


function GetDecompressThreadsPerBlock

virtual unsigned int Spinnaker::SpinnakerGPU::GetDecompressThreadsPerBlock () const

Returns CUDA kernel thread block size used by the GPU decompressor.

Returns:

CUDA threads per block.

Implements Spinnaker::ISpinnakerGPU::GetDecompressThreadsPerBlock


function SetDecompressStreamPriority

virtual void Spinnaker::SpinnakerGPU::SetDecompressStreamPriority (
    StreamPriority priority
) 

Controls stream priority used by internal GPU decompression work.

Lower-priority streams allow customer GPU pipelines to preempt decompression work more easily when they run in higher-priority streams.

Parameters:

  • priority Desired stream priority for decompression work.

Implements Spinnaker::ISpinnakerGPU::SetDecompressStreamPriority


function SetDecompressThreadsPerBlock

virtual void Spinnaker::SpinnakerGPU::SetDecompressThreadsPerBlock (
    unsigned int threadsPerBlock
) 

Controls CUDA kernel thread block size used by the GPU decompressor.

Valid range is 32 to 1024 and must be a multiple of 32.

Parameters:

  • threadsPerBlock CUDA threads per block.

Implements Spinnaker::ISpinnakerGPU::SetDecompressThreadsPerBlock


function SpinnakerGPU [1/2]

Spinnaker::SpinnakerGPU::SpinnakerGPU () 

Creates SpinnakerGPU context for managing cuda memory allocation and deallocation provided the host image dimensions.

NOTE: The library supports NVIDIA CUDA device with compute capability >= 3.5

Returns:

SpinnakerGPU object


function ~SpinnakerGPU

Spinnaker::SpinnakerGPU::~SpinnakerGPU () 

Default destructor.



The documentation for this class was generated from the following file C:/workspace/include/SpinnakerGPU.h