1 | initial version |
GpuMat d_mat(512, 512, CV_32FC2);
float2* data = d_mat.ptr<float>();
size_t step = d_mat.step;
// kernel
__global__ void func(float2* data, size_t step)
{
int x = ...;
int y = ...;
float2* row_y = (float2*)((char*)data + y * step);
float2 val = row_y[x];
}