A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

slice/slices
ArrayFire Functions | ArrayFire Functions by Category » Functions to create and modify Arrays » Assignment & Indexing operation on arrays

Gets a reference of a matrix in a 3D af::array More...

array::array_proxy | slice (int index)
| Returns a reference to a matrix in a volume.
const array::array_proxy | slice (int index) const
| Returns a reference to a matrix in a volume.
array::array_proxy | slices (int first, int last)
| Returns a reference to a matrix in a volume.
const array::array_proxy | slices (int first, int last) const
| Returns a reference to a matrix in a volume.

## Detailed Description

Gets a reference of a matrix in a 3D af::array

This function returns a slice or a set of slices from a two dimensional af::array. The reference can be used for indexing into and assignment of values to the af::array object.

## Function Documentation

## ◆ slice() [1/2]

array::array_proxy slice | ( | int | index | ) |

Returns a reference to a matrix in a volume.

This function returns a slice or a set of slices from a two dimensional af::array. The reference can be used for indexing into and assignment of values to the af::array object.

Parameters

  [in] | index | is the index of the slice to be returned

Returns
  a reference to a col

## ◆ slice() [2/2]

const array::array_proxy slice | ( | int | index | ) | const

Returns a reference to a matrix in a volume.

This function returns a slice or a set of slices from a two dimensional af::array. The reference can be used for indexing into and assignment of values to the af::array object.

Parameters

  [in] | index | is the index of the slice to be returned

Returns
  a reference to a col

## ◆ slices() [1/2]

array::array_proxy slices | ( | int | first,
|  | int | last )

Returns a reference to a matrix in a volume.

This function returns a slice or a set of slices from a two dimensional af::array. The reference can be used for indexing into and assignment of values to the af::array object.

Parameters

  [in] | first | is the index of the slices to be returned
  [in] | last | is the index of the slices to be returned

Returns
  a reference to a set of slice

## ◆ slices() [2/2]

const array::array_proxy slices | ( | int | first,
|  | int | last ) const

Returns a reference to a matrix in a volume.

This function returns a slice or a set of slices from a two dimensional af::array. The reference can be used for indexing into and assignment of values to the af::array object.

Parameters

  [in] | first | is the index of the slices to be returned
  [in] | last | is the index of the slices to be returned

Returns
  a reference to a set of slice