Check that pointers are different before copying in caffe_copy and caffe_gpu_copy