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

1355 {

◆ eval() [2/13]

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

Definition at line 1361 of file array.h.

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

◆ eval() [3/13]

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

Definition at line 1371 of file array.h.

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

◆ eval() [4/13]

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

Definition at line 1381 of file array.h.

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

◆ eval() [5/13]

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

Definition at line 1392 of file array.h.

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

◆ eval() [6/13]

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

Definition at line 1402 of file array.h.

1408  { a.eval(); return a; }
1409 
1410 #if AF_COMPILER_CXX_VARIADIC_TEMPLATES

◆ eval() [7/13]

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

Evaluate an expression (nonblocking).

Definition at line 1415 of file array.h.

1420 {

◆ eval() [8/13]

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

Definition at line 1426 of file array.h.

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

◆ eval() [9/13]

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

Definition at line 1432 of file array.h.

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

◆ eval() [10/13]

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

Definition at line 1438 of file array.h.

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

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

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

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

1474  {

◆ 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:1452
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