Ignore:
Timestamp:
Dec 15, 2008, 11:08:36 AM (11 years ago)
Author:
cameron
Message:

Use <h,l> consistently instead of <l,h>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/ASPLOS09/asplos094-cameron.tex

    r235 r236  
    375375specified as optional template (compile-time) parameters
    376376for each of the binary functions.  Thus,
    377 \verb#simd<4>::add<l,h>(a,b)# is an operation which adds
     377\verb#simd<4>::add<h,l>(a,b)# is an operation which adds
    378378the 2-bit quantity found in the low 2-bits of each 4-bit field
    379379of its first operand (\verb:a:)
     
    460460\begin{center}\small
    461461\begin{verbatim}
    462 c = simd<2>::add<l,h>(x, x);
    463 c = simd<4>::add<l,h>(c, c);
    464 c = simd<8>::add<l,h>(c, c);
    465 c = simd<16>::add<l,h>(c, c);
    466 c = simd<32>::add<l,h>(c, c);
     462c = simd<2>::add<h,l>(x, x);
     463c = simd<4>::add<h,l>(c, c);
     464c = simd<8>::add<h,l>(c, c);
     465c = simd<16>::add<h,l>(c, c);
     466c = simd<32>::add<h,l>(c, c);
    467467\end{verbatim}
    468468\end{center}
     
    10191019\begin{center}\small
    10201020\begin{verbatim}
    1021 y = simd<2>::xor<l,h>(x, x);
    1022 y = simd<4>::xor<l,h>(y, y);
    1023 y = simd<8>::xor<l,h>(y, y);
    1024 y = simd<16>::xor<l,h>(y, y);
    1025 y = simd<32>::xor<l,h>(y, y);
     1021y = simd<2>::xor<h,l>(x, x);
     1022y = simd<4>::xor<h,l>(y, y);
     1023y = simd<8>::xor<h,l>(y, y);
     1024y = simd<16>::xor<h,l>(y, y);
     1025y = simd<32>::xor<h,l>(y, y);
    10261026\end{verbatim}
    10271027\end{center}
     
    12041204\verb#simd<n>::F# on $n$-bit fields gives rise to
    12051205an immediate horizontal operation
    1206 \verb#simd<n>::F<l,h>(r, r)# for combining adjacent
     1206\verb#simd<n>::F<h,l>(r, r)# for combining adjacent
    12071207pairs of $n/2$ bit fields.
    1208 For example, \verb#simd<16>::add<l,h># adds values
     1208For example, \verb#simd<16>::add<h,l># adds values
    12091209in adjacent 8 bit fields to produce 16 bit results,
    1210 while \verb#simd<32>::min<l,h># can produce the
     1210while \verb#simd<32>::min<h,l># can produce the
    12111211minimum value of adjacent 16-bit fields.
    12121212Thus any binary horizontal operation can be implemented
    1213 in a single IDISA instruction making use of the \verb:<h, l>:
     1213in a single IDISA instruction making use of the \verb:<h,l>:
    12141214operand modifier combination.
    12151215
     
    12221222%\begin{singlespace}
    12231223\begin{verbatim}
    1224 t = simd<64>::or<l,h>(x, x)
    1225 t = simd<128>::or<l,h>(t, t)
     1224t = simd<64>::or<h,l>(x, x)
     1225t = simd<128>::or<h,l>(t, t)
    12261226\end{verbatim}
    12271227%\end{singlespace}
Note: See TracChangeset for help on using the changeset viewer.