using <bits/byteswap.h> instead of <byteswap.h> gives bad karma
fix bug with diffusion vector of length=0
check for byteswap.h before using it