#include <FunctionTable.h>
Public Types | |
| template<class TYPE2 > | |
| using | cloneTo = FunctionTable< TYPE2 > |
| typedef TYPE | value_type |
Static Public Member Functions | |
| static void | axpby (TYPE alpha, size_t N, const TYPE *x, TYPE beta, TYPE *y) |
| static void | axpy (TYPE alpha, size_t N, const TYPE *x, TYPE *y) |
| static bool | equals (size_t N, const TYPE *A, const TYPE *B, TYPE tol) |
| static void | gemm (TYPE alpha, const ArraySize &sa, const TYPE *A, const ArraySize &sb, const TYPE *B, TYPE beta, const ArraySize &sc, TYPE *C) |
| static TYPE | max (size_t N, const TYPE *x) |
| static TYPE | min (size_t N, const TYPE *x) |
| static void | multiply (const ArraySize &sa, const TYPE *a, const ArraySize &sb, const TYPE *b, const ArraySize &sc, TYPE *c) |
| static void | mx (size_t N, const TYPE *x, TYPE *y) |
| static void | mx (size_t N, TYPE x, TYPE *y) |
| static void | px (size_t N, const TYPE *x, TYPE *y) |
| static void | px (size_t N, TYPE x, TYPE *y) |
| static void | rand (size_t N, TYPE *x) |
| template<typename LAMBDA > | |
| static TYPE | reduce (LAMBDA op, size_t N, const TYPE *A, const TYPE *B, TYPE initialValue) |
| template<typename LAMBDA > | |
| static TYPE | reduce (LAMBDA op, size_t N, const TYPE *A, TYPE initialValue) |
| static void | scale (size_t N, TYPE x, TYPE *y) |
| static TYPE | sum (size_t N, const TYPE *x) |
| template<typename LAMBDA > | |
| static void | transform (LAMBDA fun, size_t N, const TYPE *x, const TYPE *y, TYPE *z) |
| template<typename LAMBDA > | |
| static void | transform (LAMBDA fun, size_t N, const TYPE *x, TYPE *y) |
| static void | transformAbs (size_t N, const TYPE *A, TYPE *B) |
| static void | transformHardTanh (size_t N, const TYPE *A, TYPE *B) |
| static void | transformReLU (size_t N, const TYPE *A, TYPE *B) |
| static void | transformSigmoid (size_t N, const TYPE *A, TYPE *B) |
| static void | transformSoftPlus (size_t N, const TYPE *A, TYPE *B) |
| static void | transformTanh (size_t N, const TYPE *A, TYPE *B) |
Private Member Functions | |
| FunctionTable ()=delete | |
Class FunctionTable is a serial function table class that defines a series of operations that can be performed on the Array class. Users can implement additional versions of the function table that match the interface to change the behavior of the array class.
Definition at line 20 of file FunctionTable.h.
| using AMP::FunctionTable< TYPE >::cloneTo = FunctionTable<TYPE2> |
Definition at line 25 of file FunctionTable.h.
| typedef TYPE AMP::FunctionTable< TYPE >::value_type |
Definition at line 23 of file FunctionTable.h.
|
privatedelete |
|
static |
Perform axpby equavalent operation ( y = alpha*x + beta*y )
| [in] | alpha | The scalar value alpha |
| [in] | N | The length of the array |
| [in] | x | The input array x |
| [in] | beta | The scalar value alpha |
| [in,out] | y | The output array y |
|
static |
Perform axpy equavalent operation ( y = alpha*x + y )
| [in] | alpha | The scalar value alpha |
| [in] | N | The length of the array |
| [in] | x | The input array x |
| [in,out] | y | The output array y |
|
static |
Check if two arrays are approximately equal
| [in] | N | The length of the array |
| [in] | A | The first array |
| [in] | B | The second array |
| [in] | tol | The tolerance |
|
static |
Perform dgemv/dgemm equavalent operation ( C = alpha*A*B + beta*C )
| [in] | alpha | The scalar value alpha |
| [in] | sa | The size of the A array |
| [in] | A | The first array |
| [in] | sb | The size of the B array |
| [in] | B | The second array |
| [in] | beta | The scalar value alpha |
| [in] | sc | The size of the C array |
| [in,out] | C | The output array C |
|
static |
Return the maximum value
| [in] | N | The length of the array |
| [in] | x | The first array |
|
static |
Return the minimum value
| [in] | N | The length of the array |
| [in] | x | The first array |
|
static |
Multiply two arrays
| [in] | sa | The size of the a array |
| [in] | a | The first array |
| [in] | sb | The size of the b array |
| [in] | b | The second array |
| [in] | sc | The size of the c array |
| [out] | c | The output array |
|
static |
Perform subtraction operation ( y -= x )
| [in] | x | The scalar value alpha |
| [in] | N | The length of the array |
| [in,out] | y | The output array y |
|
static |
Perform subtraction operation ( y -= x )
| [in] | N | The length of the array |
| [in] | x | The scalar value alpha |
| [in,out] | y | The output array y |
|
static |
Perform addition operation ( y += x )
| [in] | N | The length of the array |
| [in] | x | The scalar value alpha |
| [in,out] | y | The output array y |
|
static |
Perform addition operation ( y += x )
| [in] | N | The length of the array |
| [in] | x | The scalar value alpha |
| [in,out] | y | The output array y |
|
static |
Initialize the array with random values
| [in] | N | The length of the array |
| [in] | x | The array to operate on |
|
static |
Perform a reduce operator z = f(x,y)
| [in] | op | The function operation Note: the operator is a template parameter to improve performance |
| [in] | N | The length of the array |
| [in] | A | The first array to operate on |
| [in] | B | The second array to operate on |
| [in] | initialValue | The initial value for the reduction (0 for sum, +/- inf for min/max) |
|
static |
Perform a reduce operator y = f(x)
| [in] | op | The function operation Note: the operator is a template parameter to improve performance |
| [in] | N | The length of the array |
| [in] | A | The array to operate on |
| [in] | initialValue | The initial value for the reduction (0 for sum, +/- inf for min/max) |
|
static |
Perform addition operation ( y *= x )
| [in] | N | The length of the array |
| [in] | x | The scalar value alpha |
| [in,out] | y | The output array y |
|
static |
Return the sum
| [in] | N | The length of the array |
| [in] | x | The first array |
|
static |
Perform a element-wise operation z = f(x,y)
| [in] | fun | The function operation Note: the function is a template parameter to improve performance |
| [in] | N | The length of the array |
| [in] | x | The first array |
| [in] | y | The second array |
| [out] | z | The output array |
|
static |
Perform a element-wise operation y = f(x)
| [in] | fun | The function operation Note: the function is a template parameter to improve performance |
| [in] | N | The length of the array |
| [in,out] | x | The array to operate on |
| [out] | y | The output array |
|
static |
Perform a element-wise operation B = |A|
| [in] | N | The length of the array |
| [in] | A | The array to operate on |
| [out] | B | The output array |
|
static |
Perform a element-wise operation B = max(-1 , min(1 , A) )
| [in] | N | The length of the array |
| [in] | A | The array to operate on |
| [out] | B | The output array |
|
static |
Perform a element-wise operation y = max(x , 0)
| [in] | N | The length of the array |
| [in] | A | The input array |
| [out] | B | The output array |
|
static |
Perform a element-wise operation B = 1 / (1 + exp(-A))
| [in] | N | The length of the array |
| [in] | A | The array to operate on |
| [out] | B | The output array |
|
static |
Perform a element-wise operation B = log(exp(A) + 1)
| [in] | N | The length of the array |
| [in] | A | The array to operate on |
| [out] | B | The output array |
|
static |
Perform a element-wise operation B = tanh(A)
| [in] | N | The length of the array |
| [in] | A | The array to operate on |
| [out] | B | The output array |
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:42. Comments on this page |