added resize function for device to host vectors and vice verca. Compute median test in single context