43 #ifndef __OPENCV_CORE_DEVPTRS_HPP__
44 #define __OPENCV_CORE_DEVPTRS_HPP__
49 #define __CV_GPU_HOST_DEVICE__ __host__ __device__ __forceinline__
51 #define __CV_GPU_HOST_DEVICE__
73 __CV_GPU_HOST_DEVICE__
DevPtr() : data(0) {}
74 __CV_GPU_HOST_DEVICE__
DevPtr(
T* data_) : data(data_) {}
77 __CV_GPU_HOST_DEVICE__
operator T*() {
return data; }
78 __CV_GPU_HOST_DEVICE__
operator const T*()
const {
return data; }
100 __CV_GPU_HOST_DEVICE__
T& operator ()(
int y,
int x) {
return ptr(y)[
x]; }
101 __CV_GPU_HOST_DEVICE__
const T& operator ()(
int y,
int x)
const {
return ptr(y)[
x]; }
107 __CV_GPU_HOST_DEVICE__
PtrStepSz(
int rows_,
int cols_,
T* data_,
size_t step_)
110 template <
typename U>
127 #define __CV_GPU_DEPR_BEFORE__
128 #define __CV_GPU_DEPR_AFTER__ __attribute__ ((deprecated))
129 #elif defined(__MSVC__) //|| defined(__CUDACC__)
130 #pragma deprecated(DevMem2D_)
131 #define __CV_GPU_DEPR_BEFORE__ __declspec(deprecated)
132 #define __CV_GPU_DEPR_AFTER__
134 #define __CV_GPU_DEPR_BEFORE__
135 #define __CV_GPU_DEPR_AFTER__
143 template <
typename U>
163 __CV_GPU_HOST_DEVICE__
T& operator ()(
int y,
int x) {
return ptr(y)[
x]; }
164 __CV_GPU_HOST_DEVICE__
const T& operator ()(
int y,
int x)
const {
return ptr(y)[
x]; }
197 #endif // __cplusplus
GLenum GLint GLint y
Definition: core_c.h:613
PtrStep< float > PtrStepf
Definition: cuda_devptrs.hpp:122
__CV_GPU_HOST_DEVICE__ const T * ptr(int y=0) const
Definition: cuda_devptrs.hpp:98
PtrElemStep_< int > PtrElemStepi
Definition: cuda_devptrs.hpp:175
__CV_GPU_HOST_DEVICE__ DevPtr(T *data_)
Definition: cuda_devptrs.hpp:74
__CV_GPU_HOST_DEVICE__ PtrStep()
Definition: cuda_devptrs.hpp:91
int cols
Definition: cuda_devptrs.hpp:113
T * data
Definition: cuda_devptrs.hpp:71
__CV_GPU_HOST_DEVICE__ PtrStepSz()
Definition: cuda_devptrs.hpp:106
__CV_GPU_HOST_DEVICE__ DevPtr()
Definition: cuda_devptrs.hpp:73
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: core_c.h:403
int d
Definition: legacy.hpp:3064
const CvMat const CvMat const CvMat CvMat CvMat CvMat CvMat CvSize CvMat CvMat * T
Definition: calib3d.hpp:270
DevMem2Db DevMem2D
Definition: cuda_devptrs.hpp:148
cv::gpu::DevMem2D_ __CV_GPU_DEPR_AFTER__
__CV_GPU_HOST_DEVICE__ size_t elemSize() const
Definition: cuda_devptrs.hpp:76
void int step
Definition: core_c.h:403
PtrStep_()
Definition: cuda_devptrs.hpp:169
Definition: cuda_devptrs.hpp:104
__CV_GPU_HOST_DEVICE__ PtrSz(T *data_, size_t size_)
Definition: cuda_devptrs.hpp:84
__CV_GPU_DEPR_BEFORE__ DevMem2D_(const DevMem2D_< U > &d)
Definition: cuda_devptrs.hpp:144
PtrStep_(const DevMem2D_< T > &mem)
Definition: cuda_devptrs.hpp:170
PtrStepSz< unsigned char > PtrStepSzb
Definition: cuda_devptrs.hpp:117
size_t size
Definition: cuda_devptrs.hpp:86
PtrStep< int > PtrStepi
Definition: cuda_devptrs.hpp:123
DevMem2D_()
Definition: cuda_devptrs.hpp:140
Definition: cuda_devptrs.hpp:138
int index_type
Definition: cuda_devptrs.hpp:67
GLenum GLint x
Definition: core_c.h:632
Definition: cuda_devptrs.hpp:89
__CV_GPU_HOST_DEVICE__ PtrStepSz(int rows_, int cols_, T *data_, size_t step_)
Definition: cuda_devptrs.hpp:107
static __CV_GPU_HOST_DEVICE__ void check()
Definition: cuda_devptrs.hpp:62
size_t step
stride between two consecutive rows in bytes. Step is stored always and everywhere in bytes!!! ...
Definition: cuda_devptrs.hpp:95
DevMem2D_< int > DevMem2Di
Definition: cuda_devptrs.hpp:150
Definition: cuda_devptrs.hpp:81
__CV_GPU_HOST_DEVICE__ const T * ptr(int y=0) const
Definition: cuda_devptrs.hpp:161
__CV_GPU_HOST_DEVICE__ T * ptr(int y=0)
Definition: cuda_devptrs.hpp:160
int rows
Definition: core_c.h:114
DevMem2D_< unsigned char > DevMem2Db
Definition: cuda_devptrs.hpp:147
PtrStepSz< float > PtrStepSzf
Definition: cuda_devptrs.hpp:118
__CV_GPU_HOST_DEVICE__ T * ptr(int y=0)
Definition: cuda_devptrs.hpp:97
int cols
Definition: core_c.h:109
__CV_GPU_HOST_DEVICE__ PtrSz()
Definition: cuda_devptrs.hpp:83
PtrStep< unsigned char > PtrStepb
Definition: cuda_devptrs.hpp:121
__CV_GPU_HOST_DEVICE__ PtrStep(T *data_, size_t step_)
Definition: cuda_devptrs.hpp:92
const char * ptr
Definition: core_c.h:942
int rows
Definition: cuda_devptrs.hpp:114
Definition: cuda_devptrs.hpp:167
Definition: cuda_devptrs.hpp:152
PtrElemStep_< unsigned char > PtrElemStep
Definition: cuda_devptrs.hpp:173
PtrStepSz(const PtrStepSz< U > &d)
Definition: cuda_devptrs.hpp:111
PtrStepSz< int > PtrStepSzi
Definition: cuda_devptrs.hpp:119
PtrElemStep_(const DevMem2D_< T > &mem)
Definition: cuda_devptrs.hpp:154
true
Definition: color.hpp:221
DevMem2D_< float > DevMem2Df
Definition: cuda_devptrs.hpp:149
Definition: cuda_devptrs.hpp:61
int x
Definition: highgui_c.h:186
Definition: cuda_devptrs.hpp:69
T elem_type
Definition: cuda_devptrs.hpp:66
DevMem2D_(int rows_, int cols_, T *data_, size_t step_)
Definition: cuda_devptrs.hpp:141
Definition: cuda_devptrs.hpp:64
PtrElemStep_< float > PtrElemStepf
Definition: cuda_devptrs.hpp:174
GLsizeiptr size
Definition: core_c.h:939