def roundup(num, to_nearest):
    """
    Rounds up the 'num' to the nearest multiple of 'to_nearest', all int

    Args:
        num: to be rounded up
        to_nearest: value to be rounded to int multiple of
    return:
        rounded up value

    """
    remainder = num % to_nearest
    divisor = num // to_nearest
    return int(num if remainder == 0 else (divisor + 1)*to_nearest)
    # there seems to be alignment related issues with non power of two
    # buffers so restrict to power of two for now
    # smallest_power = 2 ** math.ceil(math.log2(num))
    # return max(smallest_power, 256)