SURF GPU with FLANN?

So I convert my img and mask first into GpuMats, then I apply operator like detectAndCompute ?


kp, des = surf.detectAndCompute(frame, mask)
==
gpu_frame = cv.cuda_GpuMat(frame)
gpu_mask = cv.cuda_GpuMat(mask)
kp, des = surf.operator(gpu_frame, gpu_mask)