Firstly to get CUDA working you will need to download the correct drivers from NVIDIA for your graphics card.
You will also need to download the CUDA SDK and link against it and #include it in your program.
you can send data to the GPU by allocating a buffer and copying it to the GPU as so:
char *buffer;
cudaMalloc( (void**)&buffer, yourBufferSize );
cudaMemcpy( buffer, yourDepthBuffer, csize, cudaMemcpyHostToDevice );
To execute a kernel on this data
dim3 dimBlock( 1, 1 );
dim3 dimGrid( 1, 1 );
testKernel<<<dimGrid, dimBlock>>>(buffer);
//You'll probably want to decide on your own block size etc ...
Where the test Kernel is
__global__
void testKernel(char *a)
{
a[threadIdx.x] = .....; //whatever you want to do
}
To get the result back you use
cudaMemcpy( yourResult, buffer, yourBufferSize, cudaMemcpyDeviceToHost );
And of course clean up after yourself
cudaFree( buffer);
That's the overall gist of it anyway. You'll probably need to fill is some gaps like error handling and so forth, but I figured it best to keep it simple.
See here for a walkthrough of the basics.