class cv::cuda::BufferPool

Overview

BufferPool for use with CUDA streams. More…

#include <cuda.hpp>

class BufferPool
{
public:
    // construction

    BufferPool(Stream& stream);

    // methods

    Ptr<GpuMat::Allocator>
    getAllocator() const;

    GpuMat
    getBuffer(
        int rows,
        int cols,
        int type
        );

    GpuMat
    getBuffer(
        Size size,
        int type
        );
};

Detailed Documentation

BufferPool for use with CUDA streams.

BufferPool utilizes cuda::Stream ‘s allocator to create new buffers. It is particularly useful when BufferPoolUsage is set to true, or a custom allocator is specified for the cuda::Stream, and you want to implement your own stream based functions utilizing the same underlying GPU memory management.

Construction

BufferPool(Stream& stream)

Gets the BufferPool for the given stream.

Methods

Ptr<GpuMat::Allocator>
getAllocator() const

Returns the allocator associated with the stream.

GpuMat
getBuffer(
    int rows,
    int cols,
    int type
    )

Allocates a new GpuMat of given size and type.

GpuMat
getBuffer(
    Size size,
    int type
    )

Allocates a new GpuMat of given size and type.