function
iota
iota[type: DType, simd_width: Int]() -> SIMD[$0, $1]
Creates a SIMD vector containing an increasing sequence, starting from 0.
Parameters:
- type (
DType
): Thedtype
of the input and output SIMD vector. - simd_width (
Int
): The width of the input and output SIMD vector.
Returns:
An increasing sequence of values, starting from 0.
iota[type: DType, simd_width: Int](offset: SIMD[type, 1]) -> SIMD[$0, $1]
Creates a SIMD vector containing an increasing sequence, starting from offset.
Parameters:
- type (
DType
): Thedtype
of the input and output SIMD vector. - simd_width (
Int
): The width of the input and output SIMD vector.
Args:
- offset (
SIMD[type, 1]
): The value to start the sequence at. Default is zero.
Returns:
An increasing sequence of values, starting from offset.
iota[type: DType](buff: DTypePointer[type, 0], len: Int, offset: Int = 0)
Fill the buffer with numbers ranging from offset to offset + len - 1, spaced by 1.
The function doesn't return anything, the buffer is updated inplace.
Parameters:
- type (
DType
): DType of the underlying data.
Args:
- buff (
DTypePointer[type, 0]
): The buffer to fill. - len (
Int
): The length of the buffer to fill. - offset (
Int
): The value to fill at index 0.
iota[type: DType](v: List[SIMD[type, 1]], offset: Int = 0)
Fill the vector with numbers ranging from offset to offset + len - 1, spaced by 1.
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]]
): The vector to fill. - offset (
Int
): The value to fill at index 0.
iota(v: List[Int], offset: Int = 0)
Fill the vector with numbers ranging from offset to offset + len - 1, spaced by 1.
The function doesn't return anything, the vector is updated inplace.
Args:
- v (
List[Int]
): The vector to fill. - offset (
Int
): The value to fill at index 0.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
If you'd like to share more information, please report an issue on GitHub
😔 What went wrong?