def METHOD_NAME( input_array, use_cuda ):
    """
    Return an array containing the cumulative sum of the 1darray `input_array`
    (The returned array has one more element than `input_array`; its first
    element is 0 and its last element is the total sum of `input_array`)
    """
    if use_cuda:
        cumulative_array = cupy.zeros( len(input_array)+1, dtype=cupy.int64 )
        cupy.cumsum( input_array, out=cumulative_array[1:] )
    else:
        cumulative_array = np.zeros( len(input_array)+1, dtype=np.int64 )
        np.cumsum( input_array, out=cumulative_array[1:] )
    return( cumulative_array )