A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

Functions
getDefaultRandomEngine
ArrayFire Functions | ArrayFire Functions by Category » Functions to create and modify Arrays » Functions to create arrays. » Random Number Generation

Returns the default random engine object. More...

## Functions
AFAPI randomEngine | getDefaultRandomEngine (void)
| C++ Interface to get the default random engine type.
AFAPI af_err | af_get_default_random_engine (af_random_engine *engine)
| C Interface to get the default random engine.

## Detailed Description

Returns the default random engine object.

Returns the af::randomEngine that is currently set as default.

Note that there is no need to call af_release_random_engine on the handle returned by af_get_default_random_engine.

## Function Documentation

## ◆ af_get_default_random_engine()

AFAPI af_err af_get_default_random_engine | ( | af_random_engine * | engine | ) |

C Interface to get the default random engine.

Parameters

  [out] | engine | pointer to the returned default random engine object

Returns
  AF_SUCCESS, if function returns successfully, else an af_err code is given

## ◆ getDefaultRandomEngine()

AFAPI randomEngine getDefaultRandomEngine | ( | void |  | ) |

C++ Interface to get the default random engine type.

Returns
  af::randomEngine object for the default random engine