A comparative study of the velocity and vorticity structure in pipes and boundary layers at friction Reynolds numbers up to $10^{4}$