Graphical Illustration Of _Cmpxx2 Intrinsics; Performing Conditional Operations With Packed Data - Texas Instruments TMS320C6000 Programmer's Manual

Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

Packed-Data Processing on the 'C64x
8.2.9

Performing Conditional Operations with Packed Data

Figure 8–21. Graphical Illustration of _cmpXX2 Intrinsics
a
b
c
0 0 0 0 0 0 0 0 0 0 0
8-40
The 'C64x provides a set of operations that are intended to provide conditional
data flow in code that operates on packed data. These operations make it pos-
sible to avoid breaking the packed data flow with unpacking code and tradition-
al 'if' statements.
Common conditional operations, such as maximum , minimum and absolute
value are addressed directly with their own specialized intrinsics. In addition
to these specific operations, more generalized compare and select operations
can be constructed using the packed compare intrinsics, _cmpXX2 and
_cmpXX4, in conjunction with the expand intrinsics, _xpnd2 and _xpnd4.
The packed compare intrinsics compare packed data elements, producing a
small bitfield which describes the results of the independent comparisons. For
_cmpeq2, _cmpgt2, and _cmplt2, the intrinsic returns a two bit field containing
the results of the two separate comparisons. For _cmpeq4, _cmpgtu4, and
_cmpltu4, the intrinsic returns a four bit field containing the results of the four
separate comparisons. In both sets of intrinsics, a 1 bit signifies that the tested
condition is true, and a 0 signifies that it is false. Figure 8–21 and Figure 8–22
illustrate how these compare intrinsics work.
a_hi
b_hi
cmp
0
0
0
0 0 0 0 0
a_lo
b_lo
cmp
0
0
0
0 0 0 0 0 0
0
0
The _cmpXX2 operation
c = cmpXX2(a, b)

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C6000 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents