XCORE SDK
XCORE Software Development Kit
Functions
XS3 16-Bit Vector Functions

Functions

void xs3_vect_s8_is_negative (int8_t a[], const int8_t b[], const unsigned length)
 Determine whether each element of a signed 8-bit input vector are negative. More...
 

Detailed Description

Function Documentation

◆ xs3_vect_s8_is_negative()

void xs3_vect_s8_is_negative ( int8_t  a[],
const int8_t  b[],
const unsigned  length 
)

Determine whether each element of a signed 8-bit input vector are negative.

Each element \(a_k\) of 8-bit output vector \(\bar a\) is set to 1 if the corresponding element \(b_k\) of 8-bit input vector \(\bar b\) is negative, and is set to 0 otherwise.

a[] represents the 8-bit output vector \(\bar a\), with the element a[k] representing \(a_k\).

b[] represents the 8-bit input vector \(\bar b\), with the element b[k] representing \(b_k\).

length is the number of elements in a[] and b[].

Operation Performed:

\begin{align*} a_k \leftarrow \begin{cases} 1 & b_k \lt 0 \\ 0 & otherwise\end{cases} \\ \qquad\text{ for }k\in 0\ ...\ (length-1) \end{align*}

Parameters
[out]aOutput vector \(\bar a\)
[in]bInput vector \(\bar b\)
[in]lengthNumber of elements in \(\bar a\) and \(\bar b\)
Exceptions
ET_LOAD_STORERaised if a or b is not word-aligned (See Note: Vector Alignment)