# SHARED memory between GpuMat and Mat

Hi all: Nice to meet you here.

    I want to use memory between GPU and CPU like:
GpuMat gmat;
Mat cmat;
HostMem hostm = HostMem(640,480,CV_8CU3,SHARED);

But this failed in the later process of the GpuMat.can any one  tell me the reason?

if I use the opencv samples gpumat,it works/
Mat cmat();
GpuMat gmat();