* @return Length of padded vector
     */
    public static int XC_padded_length(final int length) {
        // Length of padding for FFT.
        // Find the largest power of two that is less than 2*length.
        return (int) Math.pow(
                2.0,
                Math.ceil(Math.log(2.0 * length) / Math.log(2.0)));
    }