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

Functions
join
Complete List of ArrayFire Functions ArrayFire Functions by Category » Functions to create and modify Arrays » | Move and Reorder array content

Join up to 4 arrays along specified dimension. More...

## Functions
AFAPI array | join (const int dim, const array &first, const array &second)
| Join 2 arrays along `dim`. More...
AFAPI array | join (const int dim, const array &first, const array &second, const array &third)
| Join 3 arrays along `dim`. More...
AFAPI array | join (const int dim, const array &first, const array &second, const array &third, const array &fourth)
| Join 4 arrays along `dim`. More...
AFAPI af_err | af_join (af_array *out, const int dim, const af_array first, const af_array second)
| Join 2 arrays along `dim`. More...
AFAPI af_err | af_join_many (af_array *out, const int dim, const unsigned n_arrays, const af_array *inputs)
| Join many arrays along `dim`. More...

## Detailed Description

Join up to 4 arrays along specified dimension.

Requires that all dimensions except the join dimension must be the same for all arrays.

## Function Documentation

AFAPI af_err af_join | ( | af_array * | out,
|  | const int | dim,
|  | const af_array | first,
|  | const af_array | second
| ) |  |

Join 2 arrays along `dim`.

Parameters

  [out] | out | is the generated array
  [in] | dim | is the dimension along which join occurs
  [in] | first | is the first input array
  [in] | second | is the second input array

AFAPI af_err af_join_many | ( | af_array * | out,
|  | const int | dim,
|  | const unsigned | n_arrays,
|  | const af_array * | inputs
| ) |  |

Join many arrays along `dim`.

Current limit is set to 10 arrays.

Parameters

  [out] | out | is the generated array
  [in] | dim | is the dimension along which join occurs
  [in] | n_arrays | number of arrays to join
  [in] | inputs | is an array of af_arrays containing handles to the arrays to be joined

AFAPI array af::join | ( | const int | dim,
|  | const array & | first,
|  | const array & | second
| ) |  |

Join 2 arrays along `dim`.

Parameters

  [in] | dim | is the dimension along which join occurs
  [in] | first | is the first input array
  [in] | second | is the second input array

Returns
  the array that joins input arrays along the given dimension

Examples:
  conway_pretty.cpp, deep_belief_net.cpp, logistic_regression.cpp, monte_carlo_options.cpp, neural_network.cpp, perceptron.cpp, and softmax_regression.cpp.

AFAPI array af::join | ( | const int | dim,
|  | const array & | first,
|  | const array & | second,
|  | const array & | third
| ) |  |

Join 3 arrays along `dim`.

Parameters

  [in] | dim | is the dimension along which join occurs
  [in] | first | is the first input array
  [in] | second | is the second input array
  [in] | third | is the third input array

Returns
  the array that joins input arrays along the given dimension

AFAPI array af::join | ( | const int | dim,
|  | const array & | first,
|  | const array & | second,
|  | const array & | third,
|  | const array & | fourth
| ) |  |

Join 4 arrays along `dim`.

Parameters

  [in] | dim | is the dimension along which join occurs
  [in] | first | is the first input array
  [in] | second | is the second input array
  [in] | third | is the third input array
  [in] | fourth | is the fourth input array

Returns
  the array that joins input arrays along the given dimension