A high-performance general-purpose compute library

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
 Create an array with [0, n-1] values along the seq_dim dimension and tiled across other dimensions.
 
 upper
 Create a upper triangular matrix from input array.
 
arrayeval (array &a)
 Evaluate an expression (nonblocking).
 
AFAPI void eval (int num, array **arrays)
 Evaluate multiple arrays simultaneously.
 
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).
 
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.
 
AFAPI bool getManualEvalFlag ()
 Get the manual eval flag.
 

Detailed Description

constant, random, range, etc.

Function Documentation

◆ eval() [1/13]

array & eval ( array a)
inline

Evaluate an expression (nonblocking).

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

Definition at line 1459 of file array.h.

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

◆ eval() [2/13]

void eval ( array a,
array b 
)
inline

Definition at line 1468 of file array.h.

1469 {
1470#if AF_API_VERSION >= 34
1471 array *arrays[] = {&a, &b};
1472 return eval(2, arrays);
1473#else
1474 eval(a); b.eval();
1475#endif
1476 }
array & eval(array &a)
Evaluate an expression (nonblocking).
Definition: array.h:1459

◆ eval() [3/13]

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

Definition at line 1478 of file array.h.

1479 {
1480#if AF_API_VERSION >= 34
1481 array *arrays[] = {&a, &b, &c};
1482 return eval(3, arrays);
1483#else
1484 eval(a, b); c.eval();
1485#endif
1486 }

◆ eval() [4/13]

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

Definition at line 1488 of file array.h.

1489 {
1490#if AF_API_VERSION >= 34
1491 array *arrays[] = {&a, &b, &c, &d};
1492 return eval(4, arrays);
1493#else
1494 eval(a, b, c); d.eval();
1495#endif
1496
1497 }

◆ eval() [5/13]

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

Definition at line 1499 of file array.h.

1500 {
1501#if AF_API_VERSION >= 34
1502 array *arrays[] = {&a, &b, &c, &d, &e};
1503 return eval(5, arrays);
1504#else
1505 eval(a, b, c, d); e.eval();
1506#endif
1507 }

◆ eval() [6/13]

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

Definition at line 1509 of file array.h.

1510 {
1511#if AF_API_VERSION >= 34
1512 array *arrays[] = {&a, &b, &c, &d, &e, &f};
1513 return eval(6, arrays);
1514#else
1515 eval(a, b, c, d, e); f.eval();
1516#endif
1517 }

◆ eval() [7/13]

const array & eval ( const array a)
inline

Evaluate an expression (nonblocking).

Definition at line 1522 of file array.h.

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

◆ eval() [8/13]

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

Definition at line 1533 of file array.h.

1534 {
1535 const array *arrays[] = {&a, &b};
1536 return eval(2, const_cast<array **>(arrays));
1537 }

◆ eval() [9/13]

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

Definition at line 1539 of file array.h.

1540 {
1541 const array *arrays[] = {&a, &b, &c};
1542 return eval(3, const_cast<array **>(arrays));
1543 }

◆ eval() [10/13]

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

Definition at line 1545 of file array.h.

1547 {
1548 const array *arrays[] = {&a, &b, &c, &d};
1549 return eval(4, const_cast<array **>(arrays));
1550 }

◆ eval() [11/13]

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

Definition at line 1552 of file array.h.

1554 {
1555 const array *arrays[] = {&a, &b, &c, &d, &e};
1556 return eval(5, const_cast<array **>(arrays));
1557 }

◆ eval() [12/13]

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

Definition at line 1559 of file array.h.

1561 {
1562 const array *arrays[] = {&a, &b, &c, &d, &e, &f};
1563 return eval(6, const_cast<array **>(arrays));
1564 }

◆ eval() [13/13]

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

Evaluate multiple arrays simultaneously.

◆ getManualEvalFlag()

AFAPI bool getManualEvalFlag ( )

Get the manual eval flag.

◆ setManualEvalFlag()

AFAPI void setManualEvalFlag ( bool  flag)

Turn the manual eval flag on or off.