mlx_as_strided function

  1. @Native<Int Function(Pointer<mlx_array>, mlx_array, Pointer<Int>, Size, Pointer<Int64>, Size, Size, mlx_stream)>(ffi.Pointer<mlx_array>, mlx_array, ffi.Pointer<ffi.Int>, ffi.Size, ffi.Pointer<ffi.Int64>, ffi.Size, ffi.Size, mlx_stream)>()
int mlx_as_strided(
  1. Pointer<mlx_array> res,
  2. mlx_array a,
  3. Pointer<Int> shape,
  4. int shape_num,
  5. Pointer<Int64> strides,
  6. int strides_num,
  7. int offset,
  8. mlx_stream s,
)

Implementation

@ffi.Native<
  ffi.Int Function(
    ffi.Pointer<mlx_array>,
    mlx_array,
    ffi.Pointer<ffi.Int>,
    ffi.Size,
    ffi.Pointer<ffi.Int64>,
    ffi.Size,
    ffi.Size,
    mlx_stream,
  )
>()
external int mlx_as_strided(
  ffi.Pointer<mlx_array> res,
  mlx_array a,
  ffi.Pointer<ffi.Int> shape,
  int shape_num,
  ffi.Pointer<ffi.Int64> strides,
  int strides_num,
  int offset,
  mlx_stream s,
);