constant, random, range, etc. More...

Modules

 Random Number Generation
 Random Number Generation Functions.
 
 constant
 Create a array from a scalar input value.
 
 diag
 Extract diagonal from a matrix when extract is set to true.
 
 identity
 Create an identity array with diagonal values 1.
 
 iota
 Create an sequence [0, dims.elements() - 1] and modify to specified dimensions dims and then tile it according to tile_dims.
 
 lower
 Create a lower triangular matrix from input array.
 
 pad
 Pad an array.
 
 range
 Creates an array with [0, n] values along the seq_dim which is tiled across other dimensions.
 
 upper
 Create a upper triangular matrix from input array.
 
arrayeval (array &a)
 Evaluate an expression (nonblocking). More...
 
AFAPI void eval (int num, array **arrays)
 Evaluate multiple arrays simultaneously. More...
 
void eval (array &a, array &b)
 
void eval (array &a, array &b, array &c)
 
void eval (array &a, array &b, array &c, array &d)
 
void eval (array &a, array &b, array &c, array &d, array &e)
 
void eval (array &a, array &b, array &c, array &d, array &e, array &f)
 
const arrayeval (const array &a)
 Evaluate an expression (nonblocking). More...
 
void eval (const array &a, const array &b)
 
void eval (const array &a, const array &b, const array &c)
 
void eval (const array &a, const array &b, const array &c, const array &d)
 
void eval (const array &a, const array &b, const array &c, const array &d, const array &e)
 
void eval (const array &a, const array &b, const array &c, const array &d, const array &e, const array &f)
 
AFAPI void setManualEvalFlag (bool flag)
 Turn the manual eval flag on or off. More...
 
AFAPI bool getManualEvalFlag ()
 Get the manual eval flag. More...
 

Detailed Description

constant, random, range, etc.

Function Documentation

◆ eval() [1/13]

array & af::eval ( array a)
inline

Evaluate an expression (nonblocking).

Examples
financial/black_scholes_options.cpp, graphics/fractal.cpp, and pde/swe.cpp.

Definition at line 1431 of file array.h.

1431{ a.eval(); return a; }

◆ eval() [2/13]

void af::eval ( array a,
array b 
)
inline

Definition at line 1440 of file array.h.

1441 {
1442#if AF_API_VERSION >= 34
1443 array *arrays[] = {&a, &b};
1444 return eval(2, arrays);
1445#else
1446 eval(a); b.eval();
1447#endif
1448 }
void eval(const array &a, const array &b, const array &c, const array &d, const array &e, const array &f)
Definition: array.h:1531
static af::array array(af::dim4 idims, cl_mem buf, af::dtype type, bool retain=false)
Create an af::array object from an OpenCL cl_mem buffer.
Definition: opencl.h:327

◆ eval() [3/13]

void af::eval ( array a,
array b,
array c 
)
inline

Definition at line 1450 of file array.h.

1451 {
1452#if AF_API_VERSION >= 34
1453 array *arrays[] = {&a, &b, &c};
1454 return eval(3, arrays);
1455#else
1456 eval(a, b); c.eval();
1457#endif
1458 }

◆ eval() [4/13]

void af::eval ( array a,
array b,
array c,
array d 
)
inline

Definition at line 1460 of file array.h.

1461 {
1462#if AF_API_VERSION >= 34
1463 array *arrays[] = {&a, &b, &c, &d};
1464 return eval(4, arrays);
1465#else
1466 eval(a, b, c); d.eval();
1467#endif
1468
1469 }

◆ eval() [5/13]

void af::eval ( array a,
array b,
array c,
array d,
array e 
)
inline

Definition at line 1471 of file array.h.

1472 {
1473#if AF_API_VERSION >= 34
1474 array *arrays[] = {&a, &b, &c, &d, &e};
1475 return eval(5, arrays);
1476#else
1477 eval(a, b, c, d); e.eval();
1478#endif
1479 }

◆ eval() [6/13]

void af::eval ( array a,
array b,
array c,
array d,
array e,
array f 
)
inline

Definition at line 1481 of file array.h.

1482 {
1483#if AF_API_VERSION >= 34
1484 array *arrays[] = {&a, &b, &c, &d, &e, &f};
1485 return eval(6, arrays);
1486#else
1487 eval(a, b, c, d, e); f.eval();
1488#endif
1489 }

◆ eval() [7/13]

const array & af::eval ( const array a)
inline

Evaluate an expression (nonblocking).

Definition at line 1494 of file array.h.

1494{ a.eval(); return a; }

◆ eval() [8/13]

void af::eval ( const array a,
const array b 
)
inline

Definition at line 1505 of file array.h.

1506 {
1507 const array *arrays[] = {&a, &b};
1508 return eval(2, const_cast<array **>(arrays));
1509 }

◆ eval() [9/13]

void af::eval ( const array a,
const array b,
const array c 
)
inline

Definition at line 1511 of file array.h.

1512 {
1513 const array *arrays[] = {&a, &b, &c};
1514 return eval(3, const_cast<array **>(arrays));
1515 }

◆ eval() [10/13]

void af::eval ( const array a,
const array b,
const array c,
const array d 
)
inline

Definition at line 1517 of file array.h.

1519 {
1520 const array *arrays[] = {&a, &b, &c, &d};
1521 return eval(4, const_cast<array **>(arrays));
1522 }

◆ eval() [11/13]

void af::eval ( const array a,
const array b,
const array c,
const array d,
const array e 
)
inline

Definition at line 1524 of file array.h.

1526 {
1527 const array *arrays[] = {&a, &b, &c, &d, &e};
1528 return eval(5, const_cast<array **>(arrays));
1529 }

◆ eval() [12/13]

void af::eval ( const array a,
const array b,
const array c,
const array d,
const array e,
const array f 
)
inline

Definition at line 1531 of file array.h.

1533 {
1534 const array *arrays[] = {&a, &b, &c, &d, &e, &f};
1535 return eval(6, const_cast<array **>(arrays));
1536 }

◆ eval() [13/13]

AFAPI void af::eval ( int  num,
array **  arrays 
)

Evaluate multiple arrays simultaneously.

◆ getManualEvalFlag()

AFAPI bool af::getManualEvalFlag ( )

Get the manual eval flag.

◆ setManualEvalFlag()

AFAPI void af::setManualEvalFlag ( bool  flag)

Turn the manual eval flag on or off.