Changes between Version 10 and Version 11 of IDISA_Horizontal


Ignore:
Timestamp:
May 9, 2011, 9:51:04 AM (8 years ago)
Author:
cameron
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IDISA_Horizontal

    v10 v11  
    77
    88These operations generally have the form `r = hsimd<w>::op(a, b)` for each
    9 operation `op`, where `a` and `b` are operand vectors of ''w''-bit fields and `r` is
    10 the corresponding result vector.   
     9operation `op`, where `a` and `b` considered to be consecutive ''W''-bit operand vectors of
     10''w''-bit fields and `r` is the corresponding result vector of ''w''/2-bit fields.   
     11Let `ab` represent the 2''W''-bit concatenation of `a` and `b`.
     12The the result vector consists of the ''w''/2 bit results of applying ``op`` to
     13each field of `ab`.
    1114
    12 In general, operand fields may be interpreted as either signed or unsigned ''w''-bit
    13 integers, depending on the operation.   When the results depend on
    14 this interpretation, the notation s(a) refers to the interpretation
    15 of field a as a signed integer (2's complement interpretation), while
    16 the notation u(a) refers to the interpretation as an unsigned integer
    17 (natural binary interpretation).
     15In several cases, the operation `op` involves the
     16the functions h and l which extract the high and low ''w''/2 bits each of
     17fields of `ab`.
     18 - h(`ab`,,i,,) = `ab`,,i,, >> ''w''/2
     19 - l(`ab`,,i,,) = `ab`,,i,, & ((1 << ''w''/2) - 1)
    1820
    19 In general, result fields are converted to ''w'' bits by truncation.
    20 
    21 Some of these operations involve operations on the high half of each
    22 field h(a,,i,,) and the the low half of each field l(a,,i,,), where
    23  - h(a,,i,,) = a,,i,, >> ''w''/2
    24  - l(a,,i,,) = a,,i,, & ((1 << ''w''/2) - 1)
    25 
    26 
    27 
    28 || `add` || addition || r,,i,, = c,,2i,, + c,,2i+1,, ||
    29 || `min` || minimum value || r,,i,, = if s(c,,2i,,) < s(c,,2i+1,,) then c,,2i,, else c,,2i+1,, ||
    30 || `umin` || minimum value || r,,i,, = if u(c,,2i,,) < u(c,,2i+1,,) then c,,2i,, else c,,2i+1,, ||
    31 || `packl` || pack low || r,,i,, = c,,2i+1,, ||
    32 || `packh` || pack high || r,,i,, = c,,2i,, ||
    33 || `packus` || pack with unsigned saturation || r,,i,, = us,,N,,(concat(c,,2i,,, c,,2i+1,,))||
    34 || `packss` || pack with signed saturation || r,,i,, = ss,,N,,(concat(c,,2i,,, c,,2i+1,,)) ||
     21|| `add_hl` || horizontal addition || r,,i,, = h(`ab`,,i,,) + l(`ab`,,i,,) ||
     22|| `min_hl` || minimum value || r,,i,, = if s(h(`ab`,,i,,)) < s(l(`ab`,,i,,)) then h(`ab`,,i,,) else l(`ab`,,i,,) ||
     23|| `umin_hl` || minimum value || r,,i,, = if u(h(`ab`,,i,,)) < u(l(`ab`,,i,,)) then h(`ab`,,i,,) else l(`ab`,,i,,) ||
     24|| `packl` || pack low || r,,i,, = l(`ab`,,i,,) ||
     25|| `packh` || pack high || r,,i,, = h(`ab`,,i,,) ||
     26|| `packus` || pack with unsigned saturation || r,,i,, = us(`ab`,,i,,)||
     27|| `packss` || pack with signed saturation || r,,i,, = ss(`ab`,,i,,) ||
    3528
    3629where the ''w''-bit unsigned and signed saturation functions are defined as follows.
     
    4134 - ss,,''w'',,(x) = -2^''w''-1^, if s(x) < 2^''w''-1^
    4235
    43 In these definitions, fields are numbered left-to-right in so-called *big-endian*
    44 style.  Implementations using little-endian processors generally reverse the
    45 arguments c,,2i,, and c,,2i+1,,.
    46 
    4736== Horizontal Bit Packing ==
    4837