Ignore:
Timestamp:
Dec 26, 2008, 11:19:42 AM (11 years ago)
Author:
cameron
Message:

simd<n>::const => constant

File:
1 edited

Legend:

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

    r250 r251  
    368368e.g., \verb#simd<8>::srli<1>(x)# for a right logical
    369369shift of each 8-bit field by 1.  We also assume that
    370 a constant load operation \verb#simd::const<n>(c)#
     370a constant load operation \verb#simd::constant<n>(c)#
    371371loads the constant value $c$ into each $n$ bit field.
    372372
     
    624624% \begin{verbatim}
    625625% s0h = simd<16>::srli<8>(s0);
    626 % s0l = simd_and(s0, simd<16>::const(0x00FF));
     626% s0l = simd_and(s0, simd<16>::constant(0x00FF));
    627627% s1h = simd<16>::srli<8>(s1);
    628 % s1l = simd_and(s1, simd<16>::const(0x00FF));
     628% s1l = simd_and(s1, simd<16>::constant(0x00FF));
    629629% t0 = simd<16>::pack(s0h, s1h);
    630630% t1 = simd<16>::pack(s0l, s1l);
    631631% t0_l1 = simd<16>::slli<1>(t0);
    632632% t0_r1 = simd<16>::srli<1>(t1);
    633 % mask = simd<8>::const(0xAA);
     633% mask = simd<8>::constant(0xAA);
    634634% p0 = simd_or(simd_and(t0, mask), simd_andc(t1_r1, mask));
    635635% p1 = simd_or(simd_and(t0_l1, mask), simd_andc(t1, mask));
     
    646646even = {0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30};
    647647odd = {1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31};
    648 mask = simd<8>::const(0xAA);
     648mask = simd<8>::constant(0xAA);
    649649t0 = simd<8>::permute(s0, s1, even);
    650650t1 = simd<8>::permute(s0, s1, odd);
     
    964964$i$ positions to the right is equivalent to a left rotate of $n-i$
    965965positions.  These rotation amounts are computed by the operation
    966 \verb#rj=simd<8>::sub<x,l>(simd<8>::const(8), cts_4)# as shown in row 5,
     966\verb#rj=simd<8>::sub<x,l>(simd<8>::constant(8), cts_4)# as shown in row 5,
    967967except that don't care fields (which won't be subsequently used)
    968968are marked \verb:XX:. 
     
    970970The left shift amounts are calculated by \verb#lj=simd<8>::srli<4>(cts_4)#
    971971as shown in row 6, and are combined with the right shift amounts
    972 by the selection operation  \verb#rot_8=simd_if(simd<16>::const(0xFF00), rj, lj)#
     972by the selection operation  \verb#rot_8=simd_if(simd<16>::constant(0xFF00), rj, lj)#
    973973as shown in row 7.  Using these computed values, the inductive step
    974974is completed by application of the operation  \verb#rslt_16=simd<8>::rotl(rslt_8, rot_8)#
Note: See TracChangeset for help on using the changeset viewer.