For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/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.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!