Use an intrinsic for the next power of two calculation and also return the input as is if it is already a power of two