For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
interpolate_point_1d
def interpolate_point_1d[InputLayoutType: TensorLayout, //, coordinate_transformation_mode: CoordinateTransformationMode, antialias: Bool, dtype: DType, interpolation_mode: InterpolationMode](interpolator: Interpolator[interpolation_mode], dim: Int, out_coords: IndexList[InputLayoutType.rank], scale: Float32, input: TileTensor[dtype, InputLayoutType, Storage=input.Storage, linear_idx_type=input.linear_idx_type], output: TileTensor[dtype, Storage=output.Storage, linear_idx_type=output.linear_idx_type])
Computes one-dimensional interpolation for a single output point along a given dimension.
Parameters:
- InputLayoutType (
TensorLayout): The layout type of the input tensor. - coordinate_transformation_mode (
CoordinateTransformationMode): The coordinate transformation mode to apply. - antialias (
Bool): Whether to stretch the filter to antialias when downsampling. - dtype (
DType): The element type of the input and output tensors. - interpolation_mode (
InterpolationMode): The interpolation mode to use.
Args:
- interpolator (
Interpolator[interpolation_mode]): The interpolator providing the filter function. - dim (
Int): The dimension along which to interpolate. - out_coords (
IndexList[InputLayoutType.rank]): The multi-dimensional coordinates of the output point. - scale (
Float32): The ratio of output dimension size to input dimension size. - input (
TileTensor[dtype, InputLayoutType, Storage=input.Storage, linear_idx_type=input.linear_idx_type]): The input tensor to read from. - output (
TileTensor[dtype, Storage=output.Storage, linear_idx_type=output.linear_idx_type]): The output tensor to write the interpolated value to.