function
sort
sort(inout buff: LegacyPointer[Int, 0], len: Int)
Sort the vector inplace. The function doesn't return anything, the vector is updated inplace.
Args:
- buff (
LegacyPointer[Int, 0]
): Input buffer. - len (
Int
): The length of the buffer.
sort[type: DType](inout buff: LegacyPointer[SIMD[type, 1], 0], len: Int)
Sort the vector inplace. The function doesn't return anything, the vector is updated inplace.
Parameters:
- type (
DType
): DType of the underlying data.
Args:
- buff (
LegacyPointer[SIMD[type, 1], 0]
): Input buffer. - len (
Int
): The length of the buffer.
sort(inout v: List[Int])
Sort the vector inplace. The function doesn't return anything, the vector is updated inplace.
Args:
- v (
List[Int]
): Input integer vector to sort.
sort[type: DType](inout v: List[SIMD[type, 1]])
Sort the vector inplace. The function doesn't return anything, the vector is updated inplace.
Parameters:
- type (
DType
): DType of the underlying data.
Args:
- v (
List[SIMD[type, 1]]
): Input vector to sort.
sort[type: CollectionElement, cmp_fn: fn($0, $0) capturing -> Bool](inout v: List[type])
Sort the vector inplace. The function doesn't return anything, the vector is updated inplace.
Parameters:
- type (
CollectionElement
): DType of the underlying data. - cmp_fn (
fn($0, $0) capturing -> Bool
): The comparison function.
Args:
- v (
List[type]
): Input vector to sort.
sort[type: ComparableCollectionElement, slist_ub: Int = 64](inout list: List[type])
Sort list of the order comparable elements in-place. This function picks the best algorithm based on the list length.
Parameters:
- type (
ComparableCollectionElement
): The order comparable collection element type. - slist_ub (
Int
): The upper bound for a list size which is considered small.
Args:
- list (
List[type]
): The list of the scalars which will be sorted in-place.