template class cv::cudev::GpuMat_

Overview

#include <gpumat.hpp>

template <typename T>
class GpuMat_: public cv::cuda::GpuMat
{
public:
    // typedefs

    typedef T value_type;

    // construction

    GpuMat_(Allocator* allocator = defaultAllocator());

    GpuMat_(
        int arows,
        int acols,
        Allocator* allocator = defaultAllocator()
        );

    GpuMat_(
        Size asize,
        Allocator* allocator = defaultAllocator()
        );

    GpuMat_(
        int arows,
        int acols,
        Scalar val,
        Allocator* allocator = defaultAllocator()
        );

    GpuMat_(
        Size asize,
        Scalar val,
        Allocator* allocator = defaultAllocator()
        );

    GpuMat_(const GpuMat_& m);

    GpuMat_(
        const GpuMat& m,
        Allocator* allocator = defaultAllocator()
        );

    GpuMat_(
        int arows,
        int acols,
        T* adata,
        size_t astep = Mat::AUTO_STEP
        );

    GpuMat_(
        Size asize,
        T* adata,
        size_t astep = Mat::AUTO_STEP
        );

    GpuMat_(
        const GpuMat_& m,
        Range arowRange,
        Range acolRange
        );

    GpuMat_(
        const GpuMat_& m,
        Rect roi
        );

    GpuMat_(
        InputArray arr,
        Allocator* allocator = defaultAllocator()
        );

    template <class Body>
    GpuMat_(const Expr<Body>& expr);

    // methods

    __host__ GpuMat_&
    adjustROI(
        int dtop,
        int dbottom,
        int dleft,
        int dright
        );

    template <class Body>
    __host__ GpuMat_&
    assign(
        const Expr<Body>& expr,
        Stream& stream
        );

    __host__ int
    channels() const;

    __host__ GpuMat_
    clone() const;

    __host__ GpuMat_
    col(int x) const;

    __host__ GpuMat_
    colRange(
        int startcol,
        int endcol
        ) const;

    __host__ GpuMat_
    colRange(Range r) const;

    __host__ void
    create(
        int arows,
        int acols
        );

    __host__ void
    create(Size asize);

    __host__ int
    depth() const;

    __host__ size_t
    elemSize() const;

    __host__ size_t
    elemSize1() const;

    __host__
    operator GlobPtr< T >() const;

    __host__
    operator GlobPtrSz< T >() const;

    __host__ GpuMat_
    operator()(
        Range rowRange,
        Range colRange
        ) const;

    __host__ GpuMat_
    operator()(Rect roi) const;

    __host__ GpuMat_&
    operator=(const GpuMat_& m);

    template <class Body>
    __host__ GpuMat_&
    operator=(const Expr<Body>& expr);

    __host__ T*
    operator[](int y);

    __host__ const T*
    operator[](int y) const;

    __host__ GpuMat_
    row(int y) const;

    __host__ GpuMat_
    rowRange(
        int startrow,
        int endrow
        ) const;

    __host__ GpuMat_
    rowRange(Range r) const;

    __host__ size_t
    step1() const;

    __host__ size_t
    stepT() const;

    __host__ void
    swap(GpuMat_& mat);

    __host__ int
    type() const;

    __host__ void
    upload(InputArray arr);

    __host__ void
    upload(
        InputArray arr,
        Stream& stream
        );
};

Inherited Members

public:
    // classes

    class Allocator;

    // fields

    Allocator* allocator;
    int cols;
    uchar* data;
    const uchar* dataend;
    uchar* datastart;
    int flags;
    int* refcount;
    int rows;
    size_t step;

    // methods

    static
    Allocator*
    defaultAllocator();

    static
    void
    setDefaultAllocator(Allocator* allocator);

    GpuMat&
    adjustROI(
        int dtop,
        int dbottom,
        int dleft,
        int dright
        );

    void
    assignTo(
        GpuMat& m,
        int type = -1
        ) const;

    int
    channels() const;

    GpuMat
    clone() const;

    GpuMat
    col(int x) const;

    GpuMat
    colRange(
        int startcol,
        int endcol
        ) const;

    GpuMat
    colRange(Range r) const;

    void
    convertTo(
        OutputArray dst,
        int rtype
        ) const;

    void
    convertTo(
        OutputArray dst,
        int rtype,
        Stream& stream
        ) const;

    void
    convertTo(
        OutputArray dst,
        int rtype,
        double alpha,
        double beta = 0.0
        ) const;

    void
    convertTo(
        OutputArray dst,
        int rtype,
        double alpha,
        Stream& stream
        ) const;

    void
    convertTo(
        OutputArray dst,
        int rtype,
        double alpha,
        double beta,
        Stream& stream
        ) const;

    void
    copyTo(OutputArray dst) const;

    void
    copyTo(
        OutputArray dst,
        Stream& stream
        ) const;

    void
    copyTo(
        OutputArray dst,
        InputArray mask
        ) const;

    void
    copyTo(
        OutputArray dst,
        InputArray mask,
        Stream& stream
        ) const;

    void
    create(
        int rows,
        int cols,
        int type
        );

    void
    create(
        Size size,
        int type
        );

    int
    depth() const;

    void
    download(OutputArray dst) const;

    void
    download(
        OutputArray dst,
        Stream& stream
        ) const;

    size_t
    elemSize() const;

    size_t
    elemSize1() const;

    bool
    empty() const;

    bool
    isContinuous() const;

    void
    locateROI(
        Size& wholeSize,
        Point& ofs
        ) const;

    template <typename _Tp>
    operator PtrStep< _Tp >() const;

    template <typename _Tp>
    operator PtrStepSz< _Tp >() const;

    GpuMat
    operator()(
        Range rowRange,
        Range colRange
        ) const;

    GpuMat
    operator()(Rect roi) const;

    GpuMat&
    operator=(const GpuMat& m);

    uchar*
    ptr(int y = 0);

    const uchar*
    ptr(int y = 0) const;

    template <typename _Tp>
    _Tp*
    ptr(int y = 0);

    template <typename _Tp>
    const _Tp*
    ptr(int y = 0) const;

    void
    release();

    GpuMat
    reshape(
        int cn,
        int rows = 0
        ) const;

    GpuMat
    row(int y) const;

    GpuMat
    rowRange(
        int startrow,
        int endrow
        ) const;

    GpuMat
    rowRange(Range r) const;

    GpuMat&
    setTo(Scalar s);

    GpuMat&
    setTo(
        Scalar s,
        Stream& stream
        );

    GpuMat&
    setTo(
        Scalar s,
        InputArray mask
        );

    GpuMat&
    setTo(
        Scalar s,
        InputArray mask,
        Stream& stream
        );

    Size
    size() const;

    size_t
    step1() const;

    void
    swap(GpuMat& mat);

    int
    type() const;

    void
    upload(InputArray arr);

    void
    upload(
        InputArray arr,
        Stream& stream
        );

Detailed Documentation

Construction

GpuMat_(Allocator* allocator = defaultAllocator())

default constructor

GpuMat_(
    int arows,
    int acols,
    Allocator* allocator = defaultAllocator()
    )

constructs GpuMat of the specified size

GpuMat_(
    int arows,
    int acols,
    Scalar val,
    Allocator* allocator = defaultAllocator()
    )

constucts GpuMat and fills it with the specified value

GpuMat_(const GpuMat_& m)

copy constructor

GpuMat_(
    const GpuMat& m,
    Allocator* allocator = defaultAllocator()
    )

copy/conversion contructor. If m is of different type, it’s converted

GpuMat_(
    int arows,
    int acols,
    T* adata,
    size_t astep = Mat::AUTO_STEP
    )

constructs a matrix on top of user-allocated data. step is in bytes(!!!), regardless of the type

GpuMat_(
    const GpuMat_& m,
    Range arowRange,
    Range acolRange
    )

selects a submatrix

GpuMat_(
    InputArray arr,
    Allocator* allocator = defaultAllocator()
    )

builds GpuMat from host memory (Blocking call)

template <class Body>
GpuMat_(const Expr<Body>& expr)

expression templates

Methods

__host__ GpuMat_
clone() const

overridden forms of GpuMat::row() etc.

__host__ void
create(
    int arows,
    int acols
    )

allocates new GpuMat data unless the GpuMat already has specified size and type

__host__ size_t
elemSize() const

overridden forms of GpuMat::elemSize() etc.

__host__
operator GlobPtrSz< T >() const

convert to GlobPtr

__host__ GpuMat_&
operator=(const GpuMat_& m)

assignment operators

__host__ T*
operator[](int y)

more convenient forms of row and element access operators

__host__ size_t
stepT() const

returns step() /sizeof(T)

__host__ void
swap(GpuMat_& mat)

swaps with other smart pointer

__host__ void
upload(InputArray arr)

pefroms upload data to GpuMat (Blocking call)

__host__ void
upload(
    InputArray arr,
    Stream& stream
    )

pefroms upload data to GpuMat (Non-Blocking call)