util

- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
util
Complete List of ArrayFire Functions ArrayFire Functions by Category » Functions to create and modify Arrays » | Assignment & Indexing operation on arrays

Utility functions to create objects of type af_index_t. More...

## Functions
AFAPI af_err | af_create_indexers (af_index_t **indexers)
| Create an quadruple of af_index_t array. More...
AFAPI af_err | af_set_array_indexer (af_index_t *indexer, const af_array idx, const dim_t dim)
| set `dim` to given indexer af_array `idx` More...
AFAPI af_err | af_set_seq_indexer (af_index_t *indexer, const af_seq *idx, const dim_t dim, const bool is_batch)
| set `dim` to given indexer af_array `idx` More...
AFAPI af_err | af_set_seq_param_indexer (af_index_t *indexer, const double begin, const double end, const double step, const dim_t dim, const bool is_batch)
| set `dim` to given indexer af_array `idx` More...
AFAPI af_err | af_release_indexers (af_index_t *indexers)
| Release's the memory resource used by the quadruple af_index_t array. More...

## Detailed Description

Utility functions to create objects of type af_index_t.

## Function Documentation

AFAPI af_err af_create_indexers | ( | af_index_t ** | indexers | ) |

Create an quadruple of af_index_t array.

Parameters

  [out] | indexers | pointer to location where quadruple af_index_t array is created

Returns
  af_err error code

AFAPI af_err af_release_indexers | ( | af_index_t * | indexers | ) |

Release's the memory resource used by the quadruple af_index_t array.

Parameters

  [in] | indexers | is pointer to location where quadruple af_index_t array is created

AFAPI af_err af_set_array_indexer | ( | af_index_t * | indexer,
|  | const af_array | idx,
|  | const dim_t | dim
| ) |  |

set `dim` to given indexer af_array `idx`

Parameters

  [in] | indexer | pointer to location where quadruple af_index_t array was created
  [in] | idx | is the af_array indexer for given dimension `dim`
  [in] | dim | is the dimension to be indexed

Returns
  af_err error code

AFAPI af_err af_set_seq_indexer | ( | af_index_t * | indexer,
|  | const af_seq * | idx,
|  | const dim_t | dim,
|  | const bool | is_batch
| ) |  |

set `dim` to given indexer af_array `idx`

Parameters

  [in] | indexer | pointer to location where quadruple af_index_t array was created
  [in] | idx | is the af_seq indexer for given dimension `dim`
  [in] | dim | is the dimension to be indexed
  [in] | is_batch | indicates if the sequence based indexing is inside a batch operation

AFAPI af_err af_set_seq_param_indexer | ( | af_index_t * | indexer,
|  | const double | begin,
|  | const double | end,
|  | const double | step,
|  | const dim_t | dim,
|  | const bool | is_batch
| ) |  |

set `dim` to given indexer af_array `idx`

Parameters

  [in] | indexer | pointer to location where quadruple af_index_t array was created
  [in] | begin | is the beginning index of along dimension `dim`
  [in] | end | is the beginning index of along dimension `dim`
  [in] | step | size along dimension `dim`
  [in] | dim | is the dimension to be indexed
  [in] | is_batch | indicates if the sequence based indexing is inside a batch operation

Returns
  af_err error code