A high-performance general-purpose compute library

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

Modules

 Random Number Generation
 Random Number Generation Functions.
 
 constant
 Create an array from a scalar input value.
 
 diag
 Extract the diagonal from an array.
 
 identity
 Generate an identity matrix.
 
 iota
 Generate an array with [0, n-1] values modified to specified dimensions and tiling.
 
 lower
 Return the lower triangular matrix from an input array.
 
 pad
 Pad an array.
 
 range
 Generate an array with [0, n-1] values along the a specified dimension and tiled across other dimensions.
 
 upper
 Return the upper triangular matrix from an 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 & eval ( array a)
inline

Evaluate an expression (nonblocking).

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

Definition at line 1467 of file array.h.

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

◆ eval() [2/13]

void eval ( array a,
array b 
)
inline

Definition at line 1476 of file array.h.

1477 {
1478#if AF_API_VERSION >= 34
1479 array *arrays[] = {&a, &b};
1480 return eval(2, arrays);
1481#else
1482 eval(a); b.eval();
1483#endif
1484 }
array & eval(array &a)
Evaluate an expression (nonblocking).
Definition: array.h:1467

◆ eval() [3/13]

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

Definition at line 1486 of file array.h.

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

◆ eval() [4/13]

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

Definition at line 1496 of file array.h.

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

◆ eval() [5/13]

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

Definition at line 1507 of file array.h.

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

◆ eval() [6/13]

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

Definition at line 1517 of file array.h.

1518 {
1519#if AF_API_VERSION >= 34
1520 array *arrays[] = {&a, &b, &c, &d, &e, &f};
1521 return eval(6, arrays);
1522#else
1523 eval(a, b, c, d, e); f.eval();
1524#endif
1525 }

◆ eval() [7/13]

const array & eval ( const array a)
inline

Evaluate an expression (nonblocking).

Definition at line 1530 of file array.h.

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

◆ eval() [8/13]

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

Definition at line 1541 of file array.h.

1542 {
1543 const array *arrays[] = {&a, &b};
1544 return eval(2, const_cast<array **>(arrays));
1545 }

◆ eval() [9/13]

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

Definition at line 1547 of file array.h.

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

◆ eval() [10/13]

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

Definition at line 1553 of file array.h.

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

◆ eval() [11/13]

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

Definition at line 1560 of file array.h.

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

◆ 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 1567 of file array.h.

1569 {
1570 const array *arrays[] = {&a, &b, &c, &d, &e, &f};
1571 return eval(6, const_cast<array **>(arrays));
1572 }

◆ 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.