RAPP Vector Abstraction Layer API. More...
Go to the source code of this file.
Defines | |
Performance Hints | |
#define | RC_VEC_HINT_CMPGT |
Hint to use CMPGT instead of CMPGE when possible. | |
#define | RC_VEC_HINT_CMPGE |
Hint to use CMPGE instead of CMPGT when possible. | |
#define | RC_VEC_HINT_AVGT |
Hint to use AVGT/SUBHT instead of AVGR/SUBHR when possible. | |
#define | RC_VEC_HINT_AVGR |
Hint to use AVGR/SUBHR instead of AVGT/SUBHT when possible. | |
#define | RC_VEC_HINT_GETMASKW |
Hint to use GETMASKW instead of GETMASKV when possible. | |
#define | RC_VEC_HINT_GETMASKV |
Hint to use GETMASKV instead of GETMASKW when possible. | |
Vector State | |
#define | RC_VEC_DECLARE() |
Global declarations needed for the vector operations. | |
#define | RC_VEC_CLEANUP() |
Global clean up after we are done with the vector computations. | |
Memory Access | |
#define | RC_VEC_LOAD(vec, ptr) |
Aligned vector load from memory. | |
#define | RC_VEC_STORE(ptr, vec) |
Aligned vector store to memory. | |
Misaligned Memory Access | |
#define | RC_VEC_LDINIT(vec1, vec2, vec3, uptr, ptr) |
Initialize a sequence of misaligned loads. | |
#define | RC_VEC_LOADU(dstv, vec1, vec2, vec3, uptr) |
Misaligned vector load from memory. | |
Field Relocation | |
#define | RC_VEC_SHINIT(shv, bytes) |
Initialize a field shift. | |
#define | RC_VEC_SHL(dstv, srcv, shv) |
Shift all fields to the logical left. | |
#define | RC_VEC_SHR(dstv, srcv, shv) |
Shift fields to the logical right. | |
#define | RC_VEC_SHLC(dstv, srcv, bytes) |
Shift all fields to the logical left by a constant value. | |
#define | RC_VEC_SHRC(dstv, srcv, bytes) |
Shift fields to the logical right by a constant value. | |
#define | RC_VEC_ALIGNC(dstv, srcv1, srcv2, bytes) |
Align srcv1 and srcv2 to dstv, starting at field bytes into concatenation of srcv1 and srcv2. | |
#define | RC_VEC_PACK(dstv, srcv1, srcv2) |
Pack the even fields of srcv1 and srcv2 into one vector, with fields 0, . | |
Bitwise Logical Operations | |
#define | RC_VEC_ZERO(vec) |
Set all bits to zero. | |
#define | RC_VEC_NOT(dstv, srcv) |
Bitwise NOT. | |
#define | RC_VEC_AND(dstv, srcv1, srcv2) |
Bitwise AND. | |
#define | RC_VEC_OR(dstv, srcv1, srcv2) |
Bitwise OR. | |
#define | RC_VEC_XOR(dstv, srcv1, srcv2) |
Bitwise XOR. | |
#define | RC_VEC_ANDNOT(dstv, srcv1, srcv2) |
Bitwise AND NOT. | |
#define | RC_VEC_ORNOT(dstv, srcv1, srcv2) |
Bitwise OR NOT. | |
#define | RC_VEC_XORNOT(dstv, srcv1, srcv2) |
Bitwise XOR NOT. | |
Arithmetic Operations | |
#define | RC_VEC_SPLAT(vec, scal) |
Splat a scalar variable. | |
#define | RC_VEC_ADDS(dstv, srcv1, srcv2) |
Saturating addition. | |
#define | RC_VEC_AVGT(dstv, srcv1, srcv2) |
Average value, truncated. | |
#define | RC_VEC_AVGR(dstv, srcv1, srcv2) |
Average value, rounded. | |
#define | RC_VEC_AVGZ(dstv, srcv1, srcv2) |
Average value, rounded towards srcv1. | |
#define | RC_VEC_SUBS(dstv, srcv1, srcv2) |
Saturating subtraction. | |
#define | RC_VEC_SUBA(dstv, srcv1, srcv2) |
Absolute-value subtraction. | |
#define | RC_VEC_SUBHT(dstv, srcv1, srcv2) |
Half subtraction with bias, truncated. | |
#define | RC_VEC_SUBHR(dstv, srcv1, srcv2) |
Half subtraction with bias, rounded. | |
#define | RC_VEC_ABS(dstv, srcv) |
Absolute value. | |
#define | RC_VEC_CMPGT(dstv, srcv1, srcv2) |
Comparison greater-than. | |
#define | RC_VEC_CMPGE(dstv, srcv1, srcv2) |
Comparison greater-than-or-equal-to. | |
#define | RC_VEC_MIN(dstv, srcv1, srcv2) |
Minimum value. | |
#define | RC_VEC_MAX(dstv, srcv1, srcv2) |
Maximum value. | |
#define | RC_VEC_BLEND(blendv, blend8) |
Generate the blend vector needed by RC_VEC_LERP(). | |
#define | RC_VEC_LERP(dstv, srcv1, srcv2, blend8, blendv) |
Linear interpolation. | |
#define | RC_VEC_BLENDZ(blendv, blend8) |
Generate the blend vector needed by RC_VEC_LERPZ(). | |
#define | RC_VEC_LERPZ(dstv, srcv1, srcv2, blend8, blendv) |
Linear interpolation rounded towards srcv1. | |
#define | RC_VEC_BLENDN(blendv, blend8) |
Generate the blend vector needed by RC_VEC_LERPN(). | |
#define | RC_VEC_LERPN(dstv, srcv1, srcv2, blend8, blendv) |
Linear interpolation rounded towards srcv2. | |
Binary Mask Operations | |
#define | RC_VEC_GETMASKW(maskw, vec) |
Get a binary mask word of the most significant bits. | |
#define | RC_VEC_GETMASKV(maskv, vec) |
Get a binary mask vector of the most significant bits. | |
#define | RC_VEC_SETMASKV(vec, maskv) |
Set 8-bit vector fields from a binary mask vector. | |
Reductions | |
#define | RC_VEC_CNTN |
Count bits in all vector fields, iteration count. | |
#define | RC_VEC_CNTV(accv, srcv) |
Count bits in all vector fields, accumulation step. | |
#define | RC_VEC_CNTR(cnt, accv) |
Count bits in all vector fields, reduction step. | |
#define | RC_VEC_SUMN |
Sum all 8-bit vector fields, iteration count. | |
#define | RC_VEC_SUMV(accv, srcv) |
Sum all 8-bit vector fields, accumulation step. | |
#define | RC_VEC_SUMR(sum, accv) |
Sum all 8-bit vector fields, reduction step. | |
#define | RC_VEC_MACN |
Multiply and accumulate all 8-bit fields, iteration count. | |
#define | RC_VEC_MACV(accv, srcv1, srcv2) |
Multiply and accumulate all 8-bit fields, accumulation step. | |
#define | RC_VEC_MACR(mac, accv) |
Multiply and accumulate all 8-bit fields, reduction step. | |
Vector Data Type | |
| |
#define | RC_VEC_SIZE |
The number of bytes in a vector. | |
typedef arch_vector_t | rc_vec_t |
The vector type definition. |
RAPP Vector Abstraction Layer API.