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. Create a diagonal matrix from input array when extract is set to false.
 
 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 1354 of file array.h.

1357 {

◆ eval() [2/13]

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

Definition at line 1363 of file array.h.

1367  {
1368 #if AF_API_VERSION >= 34
1369  array *arrays[] = {&a, &b, &c};
1370  return eval(3, arrays);
1371 #else

◆ eval() [3/13]

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

Definition at line 1373 of file array.h.

1377  {
1378 #if AF_API_VERSION >= 34
1379  array *arrays[] = {&a, &b, &c, &d};
1380  return eval(4, arrays);
1381 #else

◆ eval() [4/13]

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

Definition at line 1383 of file array.h.

1388  {
1389 #if AF_API_VERSION >= 34
1390  array *arrays[] = {&a, &b, &c, &d, &e};
1391  return eval(5, arrays);
1392 #else

◆ eval() [5/13]

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

Definition at line 1394 of file array.h.

1398  {
1399 #if AF_API_VERSION >= 34
1400  array *arrays[] = {&a, &b, &c, &d, &e, &f};
1401  return eval(6, arrays);
1402 #else

◆ eval() [6/13]

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

Definition at line 1404 of file array.h.

1410  { a.eval(); return a; }
1411 
1412 #if AF_COMPILER_CXX_VARIADIC_TEMPLATES

◆ eval() [7/13]

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

Evaluate an expression (nonblocking).

Definition at line 1417 of file array.h.

1422 {

◆ eval() [8/13]

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

Definition at line 1428 of file array.h.

1428  {
1429  const array *arrays[] = {&a, &b, &c};
1430  return eval(3, const_cast<array **>(arrays));
1431  }
1432 

◆ eval() [9/13]

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

Definition at line 1434 of file array.h.

1435  {
1436  const array *arrays[] = {&a, &b, &c, &d};
1437  return eval(4, const_cast<array **>(arrays));
1438  }

◆ eval() [10/13]

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

Definition at line 1440 of file array.h.

1442  {
1443  const array *arrays[] = {&a, &b, &c, &d, &e};
1444  return eval(5, const_cast<array **>(arrays));
1445  }

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

1449  {
1450  const array *arrays[] = {&a, &b, &c, &d, &e, &f};
1451  return eval(6, const_cast<array **>(arrays));
1452  }

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

1476  {

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

af::eval
void eval(const array &a, const array &b, const array &c, const array &d, const array &e, const array &f)
Definition: array.h:1454
afcl::array
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