Fixed a minor bug in PtrElemStep::ptr
This commit is contained in:
parent
074ba3ed93
commit
4ea811c568
@ -105,6 +105,8 @@ namespace cv
|
|||||||
{
|
{
|
||||||
this->step /= PtrStep_<T>::elem_size;
|
this->step /= PtrStep_<T>::elem_size;
|
||||||
}
|
}
|
||||||
|
__CV_GPU_HOST_DEVICE__ T* ptr(int y = 0) { return data + y * step); }
|
||||||
|
__CV_GPU_HOST_DEVICE__ const T* ptr(int y = 0) const { return data + y * step; }
|
||||||
private:
|
private:
|
||||||
StaticCheck<256 % sizeof(T) == 0> ElemStepTypeCheck;
|
StaticCheck<256 % sizeof(T) == 0> ElemStepTypeCheck;
|
||||||
};
|
};
|
||||||
|
@ -79,7 +79,7 @@ namespace cv
|
|||||||
namespace gpu
|
namespace gpu
|
||||||
{
|
{
|
||||||
template <typename T, typename D, typename UnOp>
|
template <typename T, typename D, typename UnOp>
|
||||||
static void transform2(const DevMem2D_<T>& src, const DevMem2D_<D>& dst, UnOp op, cudaStream_t stream)
|
static void transform(const DevMem2D_<T>& src, const DevMem2D_<D>& dst, UnOp op, cudaStream_t stream)
|
||||||
{
|
{
|
||||||
dim3 threads(16, 16, 1);
|
dim3 threads(16, 16, 1);
|
||||||
dim3 grid(1, 1, 1);
|
dim3 grid(1, 1, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user