Let's write itemSize = src.elemSize1(); instead of setting itemSize explicitly inside the switch.