assign

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

Copy and write values in the locations specified by the sequences. More...

## Functions
AFAPI af_err | af_assign_seq (af_array *out, const af_array lhs, const unsigned ndims, const af_seq *const indices, const af_array rhs)
| Copy and write values in the locations specified by the sequences. More...
AFAPI af_err | af_assign_gen (af_array *out, const af_array lhs, const dim_t ndims, const af_index_t *indices, const af_array rhs)
| Assignment of an array using af_seq, or af_array. More...

## Detailed Description

Copy and write values in the locations specified by the sequences.

## Function Documentation

## ◆ af_assign_gen()

AFAPI af_err af_assign_gen | ( | af_array * | out,
|  | const af_array | lhs,
|  | const dim_t | ndims,
|  | const af_index_t * | indices,
|  | const af_array | rhs
| ) |  |

Assignment of an array using af_seq, or af_array.

Generalized assignment function that accepts either af_array or af_seq along a dimension to assign elements form an input array to an output array

Parameters

  [out] | out | output array containing values at indexed by the sequences
  [in] | lhs | is the input array
  [in] | ndims | is the number of af_index_t provided
  [in] | indices | is an af_array of af_index_t objects
  [in] | rhs | is the array whose values will be assigned to `lhs`

## ◆ af_assign_seq()

AFAPI af_err af_assign_seq | ( | af_array * | out,
|  | const af_array | lhs,
|  | const unsigned | ndims,
|  | const af_seq *const | indices,
|  | const af_array | rhs
| ) |  |

Copy and write values in the locations specified by the sequences.

Parameters

  [out] | out | output array with values of `rhs` copied to locations specified by `index` and values from `lhs` in all other locations.
  [in] | lhs | is array whose values are used for indices NOT specified by `index`
  [in] | ndims | is the number of sequences provided
  [in] | indices | is an array of sequences
  [in] | rhs | is the array whose values are used for indices specified by `index`