#include <GPUFunctionTable.h>
Public Types | |
| template<class TYPE2 > | |
| using | cloneTo = GPUFunctionTable< TYPE2 > |
| template<class TYPE2 > | |
| using | cloneTo = GPUFunctionTable< TYPE2 > |
| typedef TYPE | value_type |
| 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 | 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 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 bool | equals (size_t N, const TYPE *A, const TYPE *B, TYPE tol) |
| static TYPE | max (size_t N, const TYPE *x) |
| static TYPE | max (size_t N, const TYPE *x) |
| static TYPE | min (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 | 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, const TYPE *x, TYPE *y) |
| static void | mx (size_t N, 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, const TYPE *x, TYPE *y) |
| static void | px (size_t N, TYPE x, TYPE *y) |
| static void | px (size_t N, TYPE x, TYPE *y) |
| static void | rand (size_t N, TYPE *x) |
| 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, const TYPE *B, TYPE initialValue) |
| template<typename LAMBDA > | |
| static TYPE | reduce (LAMBDA &op, size_t N, const TYPE *A, 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 void | scale (size_t N, TYPE x, TYPE *y) |
| static TYPE | sum (size_t N, const TYPE *x) |
| 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, const TYPE *y, TYPE *z) |
| template<typename LAMBDA > | |
| static void | transform (LAMBDA &fun, size_t N, const TYPE *x, TYPE *y) |
| 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 | transformAbs (size_t N, const TYPE *A, TYPE *B) |
| static void | transformHardTanh (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 | transformReLU (size_t N, const TYPE *A, TYPE *B) |
| static void | transformSigmoid (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 | transformSoftPlus (size_t N, const TYPE *A, TYPE *B) |
| static void | transformTanh (size_t N, const TYPE *A, TYPE *B) |
| static void | transformTanh (size_t N, const TYPE *A, TYPE *B) |
Private Member Functions | |
| GPUFunctionTable ()=delete | |
| GPUFunctionTable ()=delete | |
Class GPUFunctionTable is an accelerated function table class that defines a series of operations that can be performed on the Array class. The class implements the same interface as the serial FunctionTable class Meant to be used with a GPU Allocator class.
Definition at line 20 of file GPUFunctionTable.h.
| using AMP::GPUFunctionTable< TYPE >::cloneTo = GPUFunctionTable<TYPE2> |
Definition at line 25 of file GPUFunctionTable.h.
| using AMP::GPUFunctionTable< TYPE >::cloneTo = GPUFunctionTable<TYPE2> |
Definition at line 25 of file GPUFunctionTable.h.
| typedef TYPE AMP::GPUFunctionTable< TYPE >::value_type |
Definition at line 23 of file GPUFunctionTable.h.
| typedef TYPE AMP::GPUFunctionTable< TYPE >::value_type |
Definition at line 23 of file GPUFunctionTable.h.
|
privatedelete |
|
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 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 |
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 |
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 |
Return the maximum value
| [in] | N | The length of the array |
| [in] | x | The first array |
|
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 |
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 |
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] | 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 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 |
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 |
Initialize the array with random values
| [in] | N | The length of the array |
| [in] | x | The array to operate on |
|
inlinestatic |
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) |
Definition at line 61 of file GPUFunctionTable.h.
References AMP_ERROR.
|
inlinestatic |
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) |
Definition at line 61 of file GPUFunctionTable.h.
References AMP_ERROR.
|
inlinestatic |
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) |
Definition at line 45 of file GPUFunctionTable.h.
References AMP_ERROR.
|
inlinestatic |
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) |
Definition at line 45 of file GPUFunctionTable.h.
References AMP_ERROR.
|
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 |
Return the sum
| [in] | N | The length of the array |
| [in] | x | The first array |
|
static |
Return the sum
| [in] | N | The length of the array |
| [in] | x | The first array |
|
inlinestatic |
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 |
Definition at line 90 of file GPUFunctionTable.h.
References AMP_ERROR.
|
inlinestatic |
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 |
Definition at line 90 of file GPUFunctionTable.h.
References AMP_ERROR.
|
inlinestatic |
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 |
Definition at line 75 of file GPUFunctionTable.h.
References AMP_ERROR.
|
inlinestatic |
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 |
Definition at line 75 of file GPUFunctionTable.h.
References AMP_ERROR.
|
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 = |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 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 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 = 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 = 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 |
|
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 |