|
Generic SIMD Intrinsic Library API
0.6
|
data representation and operations on a vector of 8 double. More...
#include <generic8.h>
Public Member Functions | |
| svec () | |
| Default constructor. More... | |
| svec (double a, double b, double c, double d, double e, double f, double g, double h) | |
| Constructor. More... | |
| svec (double a) | |
| Constructor. More... | |
| double & | operator[] (int index) |
| operator [] to set or get the vector element specified by index. More... | |
| const double | operator[] (int index) const |
| svec< 8,bool > | operator== (svec< 8, double > a) |
| Element-wise compare equal, return a bool vector, e.g., "a == b" *. More... | |
| svec< 8,bool > | operator!= (svec< 8, double > a) |
| Element-wise compare not equal, return a bool vector. E.g. "a != b" *. More... | |
| svec< 8,bool > | operator< (svec< 8, double > a) |
| Element-wise compare less than, return a bool vector. E.g. "a < b" *. More... | |
| svec< 8,bool > | operator<= (svec< 8, double > a) |
| Element-wise compare less equal, return a bool vector. E.g. "a <= b" *. More... | |
| svec< 8,bool > | operator> (svec< 8, double > a) |
| Element-wise compare greater than, return a bool vector. E.g. "a > b" *. More... | |
| svec< 8,bool > | operator>= (svec< 8, double > a) |
| Element-wise compare greater equal, return a bool vector. E.g. "a >= b" *. More... | |
| svec< 8, double > | operator- () |
| get the neg value, return a VTYPE vector. E.g. "-a" More... | |
| double | reduce_add () |
| Get the sum of all the element values in the vector. return a double scalar. More... | |
| double | reduce_max () |
| Get the max value of all the element values in the vector. return a double scalar. More... | |
| double | reduce_min () |
| Get the min value of all the element values in the vector. return a double scalar. More... | |
| svec< 8, double > | operator+ (svec< 8, double > a) |
| Add two vectors. More... | |
| svec< 8, double > | operator+ (double s) |
| Add a vector and a scalar. More... | |
| svec< 8, double > | operator- (svec< 8, double > a) |
| Sub two vectors. More... | |
| svec< 8, double > | operator- (double s) |
| Sub a vector and a scalar. More... | |
| svec< 8, double > | operator* (svec< 8, double > a) |
| Multiply two vectors. More... | |
| svec< 8, double > | operator* (double s) |
| Multiply a vector and a scalar. More... | |
| svec< 8, double > | operator/ (svec< 8, double > a) |
| Divide a vector by a vector. More... | |
| svec< 8, double > | operator/ (double s) |
| Divide a vector by a scalar. More... | |
| void | store (svec< 8, double > *p) |
| Store the vector to address p. More... | |
| void | masked_store (svec< 8, double > *p, svec< 8, bool > mask) |
| Store the vector element's value to pointer p if the mask element is true. More... | |
| void | scatter (svec< 8, void * > ptrs, svec< 8, bool > mask) |
| Scatter the vector's elements to the locations pointed by the vector ptrs if the mask element is true. More... | |
| void | scatter_base_offsets (double *b, uint32_t scale, svec< 8, int32_t > offsets, svec< 8, bool > mask) |
| Scatter the vector's elements to the addresses ((char*)b + scale * offsets) if the mask element is true. More... | |
| void | scatter_base_offsets (double *b, uint32_t scale, svec< 8, int64_t > offsets, svec< 8, bool > mask) |
| Scatter the vector's elements to the addresses ((char*)b + scale * offsets) if the mask element is true. More... | |
| void | scatter_stride (double *b, int32_t off, int32_t stride) |
| Scatter the vector's elements to the addresses (b+off, b++off+stride, b+off+2*stride, b+off+3*step). More... | |
| void | scatter_stride (double *b, int64_t off, int64_t stride) |
| Scatter the vector's elements to the addresses (b+off, b++off+stride, b+off+2*stride, b+off+3*step). More... | |
| svec< 8, double > | broadcast (int32_t index) |
| Return a new vector by setting all the elements of the new vector with this vector's index element. More... | |
| svec< 8, double > | rotate (int32_t index) |
| Return a new vector by rotate this vector's elements. e.g. newVec[i] = thisVec[i+index]. More... | |
| svec< 8, double > | shuffle (svec< 8, int32_t > index) |
| Return a new vector by shuffle this vector's elements with index vector e.g. newVec[i] = thisVec[index[i]]. More... | |
| svec< 8, double > | abs () |
| Return a new vector of the vector's abs value. More... | |
| svec< 8, double > | round () |
| return the round VTYPE vector. More... | |
| svec< 8, double > | floor () |
| return the floor VTYPE vector. More... | |
| svec< 8, double > | ceil () |
| return the ceil VTYPE vector. More... | |
| svec< 8, double > | sqrt () |
| return the sqrt VTYPE vector. More... | |
| svec< 8, double > | rcp () |
| return the reverse VTYPE vector. (1.0/thisVec) More... | |
| svec< 8, double > | rsqrt () |
| return the reverse sqrt VTYPE vector. ( 1.0/sqrt(thisVec) ) More... | |
| svec< 8, double > | exp () |
| return the exp VTYPE vector. More... | |
| svec< 8, double > | log () |
| return the log VTYPE vector. More... | |
| svec< 8, double > | pow (svec< 8, double > a) |
| return the pow VTYPE vector. More... | |
Static Public Member Functions | |
| static svec< 8, double > | load (svec< 8, double > *p) |
| load the vector from the pointer p More... | |
| static svec< 8, double > | masked_load (svec< 8, double > *p, svec< 8, bool > mask) |
| Return a new vector by only loading the value from the pointer p if the mask element is true. More... | |
| static svec< 8, double > | load_const (const double *p) |
| Construct a vector by loading a scalar value from pointer p, and splat it to all the elements in the vector. More... | |
| static svec< 8, double > | load_and_splat (double *p) |
| Construct a vector by loading a scalar value from pointer p, and splat it to all the elements in the vector. More... | |
| static svec< 8, double > | gather (svec< 8, void * > ptrs, svec< 8, bool > mask) |
| Gather the elements pointed by the vector ptrs if the mask element is true, and return a vector. More... | |
| static svec< 8, double > | gather_base_offsets (double *b, uint32_t scale, svec< 8, int32_t > offsets, svec< 8, bool > mask) |
| Gather the elements pointed by calculating the addresses ((char*)b + scale * offsets) if the mask element is true, and return a vector. More... | |
| static svec< 8, double > | gather_base_offsets (double *b, uint32_t scale, svec< 8, int64_t > offsets, svec< 8, bool > mask) |
| Gather the elements pointed by calculating the addresses ((char*)b + scale * offsets) if the mask element is true, and return a vector. More... | |
| static svec< 8, double > | gather_stride (double *b, int32_t off, int32_t stride) |
| Gather the elements pointed by (b+off, b++off+stride, b+off+2*stride, b+off+3*step). More... | |
| static svec< 8, double > | gather_stride (double *b, int64_t off, int64_t stride) |
| Gather the elements pointed by (b+off, b++off+stride, b+off+2*stride, b+off+3*step). More... | |
Public Attributes | |
| double | v [8] |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const svec< 8, double > &v) |
data representation and operations on a vector of 8 double.
| generic::svec< 8, double >::svec | ( | ) |
Default constructor.
| generic::svec< 8, double >::svec | ( | double | a, |
| double | b, | ||
| double | c, | ||
| double | d, | ||
| double | e, | ||
| double | f, | ||
| double | g, | ||
| double | h | ||
| ) |
Constructor.
| generic::svec< 8, double >::svec | ( | double | a | ) |
Constructor.
| a | a double |
| svec< 8, double > generic::svec< 8, double >::abs | ( | ) |
Return a new vector of the vector's abs value.
| svec< 8, double > generic::svec< 8, double >::broadcast | ( | int32_t | index | ) |
Return a new vector by setting all the elements of the new vector with this vector's index element.
| svec< 8, double > generic::svec< 8, double >::ceil | ( | ) |
return the ceil VTYPE vector.
| svec< 8, double > generic::svec< 8, double >::exp | ( | ) |
return the exp VTYPE vector.
| svec< 8, double > generic::svec< 8, double >::floor | ( | ) |
return the floor VTYPE vector.
|
static |
Gather the elements pointed by the vector ptrs if the mask element is true, and return a vector.
|
static |
Gather the elements pointed by calculating the addresses ((char*)b + scale * offsets) if the mask element is true, and return a vector.
|
static |
Gather the elements pointed by calculating the addresses ((char*)b + scale * offsets) if the mask element is true, and return a vector.
|
static |
Gather the elements pointed by (b+off, b++off+stride, b+off+2*stride, b+off+3*step).
|
static |
Gather the elements pointed by (b+off, b++off+stride, b+off+2*stride, b+off+3*step).
|
static |
load the vector from the pointer p
| [in] | p | load address |
|
static |
Construct a vector by loading a scalar value from pointer p, and splat it to all the elements in the vector.
|
static |
Construct a vector by loading a scalar value from pointer p, and splat it to all the elements in the vector.
| svec< 8, double > generic::svec< 8, double >::log | ( | ) |
return the log VTYPE vector.
|
static |
Return a new vector by only loading the value from the pointer p if the mask element is true.
| void generic::svec< 8, double >::masked_store | ( | svec< 8, double > * | p, |
| svec< 8, bool > | mask | ||
| ) |
Store the vector element's value to pointer p if the mask element is true.
| svec< 8,bool > generic::svec< 8, double >::operator!= | ( | svec< 8, double > | a | ) |
Element-wise compare not equal, return a bool vector. E.g. "a != b" *.
| [in] | a | a vector * |
| svec< 8, double > generic::svec< 8, double >::operator* | ( | double | s | ) |
Multiply a vector and a scalar.
| svec< 8, double > generic::svec< 8, double >::operator* | ( | svec< 8, double > | a | ) |
Multiply two vectors.
| svec< 8, double > generic::svec< 8, double >::operator+ | ( | svec< 8, double > | a | ) |
Add two vectors.
| svec< 8, double > generic::svec< 8, double >::operator+ | ( | double | s | ) |
Add a vector and a scalar.
| svec< 8, double > generic::svec< 8, double >::operator- | ( | double | s | ) |
Sub a vector and a scalar.
| svec< 8, double > generic::svec< 8, double >::operator- | ( | ) |
get the neg value, return a VTYPE vector. E.g. "-a"
| svec< 8, double > generic::svec< 8, double >::operator- | ( | svec< 8, double > | a | ) |
Sub two vectors.
| svec< 8, double > generic::svec< 8, double >::operator/ | ( | svec< 8, double > | a | ) |
Divide a vector by a vector.
| svec< 8, double > generic::svec< 8, double >::operator/ | ( | double | s | ) |
Divide a vector by a scalar.
| svec< 8,bool > generic::svec< 8, double >::operator< | ( | svec< 8, double > | a | ) |
Element-wise compare less than, return a bool vector. E.g. "a < b" *.
| [in] | a | a vector * |
| svec< 8,bool > generic::svec< 8, double >::operator<= | ( | svec< 8, double > | a | ) |
Element-wise compare less equal, return a bool vector. E.g. "a <= b" *.
| [in] | a | a vector * |
| svec< 8,bool > generic::svec< 8, double >::operator== | ( | svec< 8, double > | a | ) |
Element-wise compare equal, return a bool vector, e.g., "a == b" *.
| [in] | a | a vector * |
| svec< 8,bool > generic::svec< 8, double >::operator> | ( | svec< 8, double > | a | ) |
Element-wise compare greater than, return a bool vector. E.g. "a > b" *.
| [in] | a | a vector * |
| svec< 8,bool > generic::svec< 8, double >::operator>= | ( | svec< 8, double > | a | ) |
Element-wise compare greater equal, return a bool vector. E.g. "a >= b" *.
| [in] | a | a vector * |
| const double generic::svec< 8, double >::operator[] | ( | int | index | ) | const |
| double & generic::svec< 8, double >::operator[] | ( | int | index | ) |
operator [] to set or get the vector element specified by index.
| index | specifies the index of the element in the vector. |
| svec< 8, double > generic::svec< 8, double >::pow | ( | svec< 8, double > | a | ) |
return the pow VTYPE vector.
| svec< 8, double > generic::svec< 8, double >::rcp | ( | ) |
return the reverse VTYPE vector. (1.0/thisVec)
| double generic::svec< 8, double >::reduce_add | ( | ) |
Get the sum of all the element values in the vector. return a double scalar.
| double generic::svec< 8, double >::reduce_max | ( | ) |
Get the max value of all the element values in the vector. return a double scalar.
| double generic::svec< 8, double >::reduce_min | ( | ) |
Get the min value of all the element values in the vector. return a double scalar.
| svec< 8, double > generic::svec< 8, double >::rotate | ( | int32_t | index | ) |
Return a new vector by rotate this vector's elements. e.g. newVec[i] = thisVec[i+index].
| svec< 8, double > generic::svec< 8, double >::round | ( | ) |
return the round VTYPE vector.
| svec< 8, double > generic::svec< 8, double >::rsqrt | ( | ) |
return the reverse sqrt VTYPE vector. ( 1.0/sqrt(thisVec) )
| void generic::svec< 8, double >::scatter | ( | svec< 8, void * > | ptrs, |
| svec< 8, bool > | mask | ||
| ) |
Scatter the vector's elements to the locations pointed by the vector ptrs if the mask element is true.
| void generic::svec< 8, double >::scatter_base_offsets | ( | double * | b, |
| uint32_t | scale, | ||
| svec< 8, int64_t > | offsets, | ||
| svec< 8, bool > | mask | ||
| ) |
Scatter the vector's elements to the addresses ((char*)b + scale * offsets) if the mask element is true.
| void generic::svec< 8, double >::scatter_base_offsets | ( | double * | b, |
| uint32_t | scale, | ||
| svec< 8, int32_t > | offsets, | ||
| svec< 8, bool > | mask | ||
| ) |
Scatter the vector's elements to the addresses ((char*)b + scale * offsets) if the mask element is true.
| void generic::svec< 8, double >::scatter_stride | ( | double * | b, |
| int64_t | off, | ||
| int64_t | stride | ||
| ) |
Scatter the vector's elements to the addresses (b+off, b++off+stride, b+off+2*stride, b+off+3*step).
| void generic::svec< 8, double >::scatter_stride | ( | double * | b, |
| int32_t | off, | ||
| int32_t | stride | ||
| ) |
Scatter the vector's elements to the addresses (b+off, b++off+stride, b+off+2*stride, b+off+3*step).
| svec< 8, double > generic::svec< 8, double >::shuffle | ( | svec< 8, int32_t > | index | ) |
Return a new vector by shuffle this vector's elements with index vector e.g. newVec[i] = thisVec[index[i]].
| svec< 8, double > generic::svec< 8, double >::sqrt | ( | ) |
return the sqrt VTYPE vector.
| void generic::svec< 8, double >::store | ( | svec< 8, double > * | p | ) |
Store the vector to address p.
| [in] | p | store address |
|
friend |
| double generic::svec< 8, double >::v[8] |
1.8.5