Text file src/simd/archsimd/_gen/simdgen/ops/Moves/categories.yaml

     1  !sum
     2  - go: SetElem
     3    commutative: false
     4    documentation: !string |-
     5      // NAME returns x with the index'th element set to y.
     6  - go: GetElem
     7    commutative: false
     8    documentation: !string |-
     9      // NAME returns the index'th element of x.
    10  - go: SetLo
    11    commutative: false
    12    constImm: 0
    13    documentation: !string |-
    14      // NAME returns x with its lower half set to y.
    15  - go: GetLo
    16    commutative: false
    17    constImm: 0
    18    documentation: !string |-
    19      // NAME returns the lower half of x.
    20  - go: SetHi
    21    commutative: false
    22    constImm: 1
    23    documentation: !string |-
    24      // NAME returns x with its upper half set to y.
    25  - go: GetHi
    26    commutative: false
    27    constImm: 1
    28    documentation: !string |-
    29      // NAME returns the upper half of x.
    30  - go: lookupOrKeep
    31    commutative: false
    32    documentation: !string |-
    33      // NAME looks up table. If an index is out of range, the result is the corresponding element of keep.
    34      //
    35      //   if 0 <= indices[i] && indices[i] < len(table) {
    36      //       result[i] = table[indices[i]]
    37      //   } else {
    38      //       result[i] = keep[i]
    39      //   }
    40  - go: LookupOrZero
    41    commutative: false
    42    documentation: !string |-
    43      // NAME looks up table. If an index is out of range, the result is 0.
    44      //
    45      //   if 0 <= indices[i] && indices[i] < len(table) {
    46      //       result[i] = table[indices[i]]
    47      //   } else {
    48      //       result[i] = 0
    49      //   }
    50  - go: PermuteOrZero
    51    commutative: false
    52    documentation: !string |-
    53      // NAME permutes x. If an index is negative, the result is 0.
    54      //
    55      //   if indices[i] >= 0 {
    56      //       z[i] = x[indices[i] % len(x)]
    57      //   } else {
    58      //       z[i] = 0
    59      //   }
    60  - go: Permute
    61    commutative: false
    62    documentation: !string |-
    63      // NAME permutes x.
    64      //
    65      //   z[i] = x[indices[i] % len(x)]
    66  - go: ConcatPermute # ConcatPermute is only available on or after AVX512
    67    commutative: false
    68    documentation: !string |-
    69      // NAME performs a full permutation of vector x, y using indices:
    70      //
    71      //   result = {xy[indices[0]], xy[indices[1]], ..., xy[indices[n]]}
    72      //
    73      // where xy is the concatenation of x (lower half) and y (upper half).
    74      // Only the needed bits to represent xy's index are used in indices' elements.
    75  - go: Compress
    76    commutative: false
    77    documentation: !string |-
    78      // NAME packs the masked elements of x into the lower indexed elements of z,
    79      // zeroing any remaining elements.
    80  - go: blend
    81    commutative: false
    82    documentation: !string |-
    83      // NAME blends two vectors based on mask values, choosing either
    84      // the first or the second based on whether the third is false or true
    85  - go: bitSelect
    86    commutative: false
    87    documentation: !string |-
    88      // NAME returns the bitwise selection if mask[i] then x[i] else y[i].
    89  - go: bitSelectNot
    90    commutative: false
    91    documentation: !string |-
    92      // NAME returns the bitwise selection if mask[i] then y[i] else x[i].
    93  - go: move
    94    commutative: false
    95    noTypes: "true"
    96    noGenericOps: "true"
    97  - go: Expand
    98    commutative: false
    99    documentation: !string |-
   100      // NAME expands the lower elements of x into the masked elements of z.
   101  - go: broadcast1To2
   102    commutative: false
   103    documentation: !string |-
   104      // NAME copies the lowest element of its input to all 2 elements of
   105      // the output vector.
   106  - go: broadcast1To4
   107    commutative: false
   108    documentation: !string |-
   109      // NAME copies the lowest element of its input to all 4 elements of
   110      // the output vector.
   111  - go: broadcast1To8
   112    commutative: false
   113    documentation: !string |-
   114      // NAME copies the lowest element of its input to all 8 elements of
   115      // the output vector.
   116  - go: broadcast1To16
   117    commutative: false
   118    documentation: !string |-
   119      // NAME copies the lowest element of its input to all 16 elements of
   120      // the output vector.
   121  - go: broadcast1To32
   122    commutative: false
   123    documentation: !string |-
   124      // NAME copies the lowest element of its input to all 32 elements of
   125      // the output vector.
   126  - go: broadcast1To64
   127    commutative: false
   128    documentation: !string |-
   129      // NAME copies the lowest element of its input to all 64 elements of
   130      // the output vector.
   131  - go: PermuteOrZeroGrouped
   132    commutative: false
   133    documentation: !string |-
   134      // NAME permutes x within each 128-bit group. If an index is negative, the result is 0.
   135      //
   136      //   let vₙ be the n'th 128-bit group of vector v
   137      //   if indicesₙ[i] >= 0 {
   138      //       zₙ[i] = xₙ[indicesₙ[i] % len(xₙ)]
   139      //   } else {
   140      //       zₙ[i] = 0
   141      //   }
   142  - go: PermuteGrouped
   143    commutative: false
   144    documentation: !string |- # Detailed documentation will rely on the specific ops.
   145      // NAME performs a grouped permutation of vector x using indices:
   146  - go: permuteScalars
   147    commutative: false
   148    documentation: !string |- # Detailed documentation will rely on the specific ops.
   149      // NAME performs a permutation of vector x using constant indices:
   150  - go: permuteScalarsGrouped
   151    commutative: false
   152    documentation: !string |- # Detailed documentation will rely on the specific ops.
   153      // NAME performs a grouped permutation of vector x using constant indices:
   154  - go: permuteScalarsLo
   155    commutative: false
   156    documentation: !string |- # Detailed documentation will rely on the specific ops.
   157      // NAME performs a permutation of vector x using constant indices:
   158  - go: permuteScalarsLoGrouped
   159    commutative: false
   160    documentation: !string |- # Detailed documentation will rely on the specific ops.
   161      // NAME performs a grouped permutation of vector x using constant indices:
   162  - go: permuteScalarsHi
   163    commutative: false
   164    documentation: !string |- # Detailed documentation will rely on the specific ops.
   165      // NAME performs a permutation of vector x using constant indices:
   166  - go: permuteScalarsHiGrouped
   167    commutative: false
   168    documentation: !string |- # Detailed documentation will rely on the specific ops.
   169      // NAME performs a grouped permutation of vector x using constant indices:
   170  - go: InterleaveHi
   171    commutative: false
   172    documentation: !string |-
   173      // NAME interleaves the elements of the high halves of x and y.
   174  - go: InterleaveLo
   175    commutative: false
   176    documentation: !string |-
   177      // NAME interleaves the elements of the low halves of x and y.
   178  - go: InterleaveHiGrouped
   179    commutative: false
   180    documentation: !string |-
   181      // NAME interleaves the elements of the high half of each 128-bit subvector of x and y.
   182  - go: InterleaveLoGrouped
   183    commutative: false
   184    documentation: !string |-
   185      // NAME interleaves the elements of the low half of each 128-bit subvector of x and y.
   186  
   187  - go: concatSelectedConstant
   188    commutative: false
   189    out:
   190      - elemBits: 32
   191    documentation: !string |-
   192      // NAME concatenates selected elements from x and y into the lower and upper
   193      // halves of the output.  The selection is chosen by the constant parameter h1h0l1l0
   194      // where each {h,l}{1,0} is two bits specify which element from y or x to select.
   195      // For example, {0,1,2,3}.NAME(0b_11_01_00_10, {4,5,6,7}) returns
   196      // {2, 0, 5, 7} (don't forget that the binary constant is written big-endian).
   197  
   198  - go: concatSelectedConstant
   199    commutative: false
   200    out:
   201      - elemBits: 64
   202    documentation: !string |-
   203      // NAME concatenates selected elements from x and y into the lower and upper
   204      // halves of the output.  The selection is chosen by the constant parameter hilo
   205      // where hi and lo are each one bit specifying which 64-bit element to select
   206      // from y and x.  For example {4,5}.NAME(0b10, {6,7})
   207      // returns {4,7}; bit 0, selecting from x, is zero, and selects 4, and bit 1,
   208      // selecting from y, is 1, and selects 7.
   209  
   210  - go: concatSelectedConstantGrouped
   211    commutative: false
   212    out:
   213      - elemBits: 32
   214        bits: 256
   215    documentation: !string |-
   216      // NAME concatenates selected elements from 128-bit subvectors of x and y
   217      // into the lower and upper halves of corresponding subvectors of the output.
   218      // The selection is chosen by the constant parameter h1h0l1l0
   219      // where each {h,l}{1,0} is two bits specifying which element from y or x to select.
   220      // For example,
   221      // {0,1,2,3,8,9,10,11}.NAME(0b_11_01_00_10, {4,5,6,7,12,13,14,15})
   222      // returns {2,0,5,7,10,8,13,15}
   223      // (don't forget that the binary constant is written big-endian).
   224  
   225  - go: concatSelectedConstantGrouped
   226    commutative: false
   227    out:
   228      - elemBits: 64
   229        bits: 256
   230    documentation: !string |-
   231      // NAME concatenates selected elements from 128-bit subvectors of x and y
   232      // into the lower and upper halves of corresponding subvectors of the output.
   233      // The selections are specified by the constant parameter hilos where each
   234      // hi and lo pair select 64-bit elements from the corresponding 128-bit
   235      // subvectors of x and y.
   236      //
   237      // For example {4,5,8,9}.NAME(0b_11_10, {6,7,10,11})
   238      // returns {4,7,9,11}; bit 0 is zero, selecting element 0 from x's least
   239      // 128-bits (4), then 1, selects the element 1 from y's least 128-bits (7),
   240      // then 1, selecting element 1 from x's upper 128 bits (9), then 1,
   241      // selecting element 1 from y's upper 128 bits (11).
   242      // This differs from the same method applied to a 32x8 vector, where
   243      // the 8-bit constant performs the same selection on both subvectors.
   244  
   245  - go: concatSelectedConstantGrouped
   246    commutative: false
   247    out:
   248      - elemBits: 32
   249        bits: 512
   250    documentation: !string |-
   251      // NAME concatenates selected elements from 128-bit subvectors of x and y
   252      // into the lower and upper halves of corresponding subvectors of the output.
   253      // The selection is chosen by the constant parameter h1h0l1l0
   254      // where each {h,l}{1,0} is two bits specifying which element from y or x to select.
   255      // For example,
   256      //
   257      //   {0,1,2,3,8,9,10,11, 20,21,22,23,28,29,210,211}.NAME(
   258      //    0b_11_01_00_10, {4,5,6,7,12,13,14,15, 24,25,26,27,212,213,214,215})
   259      //
   260      // returns {2,0,5,7,10,8,13,15, 22,20,25,27,210,28,213,215}
   261      //
   262      // (don't forget that the binary constant is written big-endian).
   263  
   264  - go: concatSelectedConstantGrouped
   265    commutative: false
   266    out:
   267      - elemBits: 64
   268        bits: 512
   269    documentation: !string |-
   270      // NAME concatenates selected elements from 128-bit subvectors of x and y
   271      // into the lower and upper halves of corresponding subvectors of the output.
   272      // The selections are specified by the constant parameter hilos where each
   273      // hi and lo pair select 64-bit elements from the corresponding 128-bit
   274      // subvectors of x and y.
   275      //
   276      // For example {4,5,8,9,12,13,16,17}.NAME(0b11_00_11_10, {6,7,10,11,14,15,18,19})
   277      // returns {4,7,9,11,12,14,17,19}; bit 0 is zero, selecting element 0 from x's
   278      // least 128-bits (4), then 1, selects the element 1 from y's least 128-bits (7),
   279      // then 1, selecting element 1 from x's next 128 bits (9), then 1,
   280      // selecting element 1 from y's upper 128 bits (11).  The next two 0 bits select
   281      // the lower elements from x and y's 3rd 128 bit groups (12, 14), the last two
   282      // 1 bits select the upper elements from x and y's last 128 bits (17, 19).
   283      // This differs from the same method applied to a 32x8 or 32x16 vector, where
   284      // the 8-bit constant performs the same selection on all the subvectors.
   285  
   286  - go: ConcatPermute128Scalars
   287    commutative: false
   288    documentation: !string |-
   289      // NAME treats the 256-bit vectors x and y as a single vector of four
   290      // 128-bit elements, and returns a 256-bit result formed by
   291      // concatenating the two elements specified by lo and hi.
   292  
   293  - go: ConcatShiftBytesRight
   294    commutative: false
   295    documentation: !string |-
   296      // NAME concatenates x and y and shifts it right by shift bytes.
   297      // The result vector will be the lower half of the concatenated vector.
   298  
   299  - go: ConcatShiftBytesRightGrouped
   300    commutative: false
   301    documentation: !string |-
   302      // NAME concatenates x and y and shifts it right by shift bytes.
   303      // The result vector will be the lower half of the concatenated vector.
   304      // This operation is performed grouped by each 16 byte.
   305  - go: ConcatEven
   306    commutative: false
   307    documentation: !string |-
   308      // NAME concatenates even-indexed elements from the concatenation of x and y.
   309      // For x = [x0,x1,x2,x3] and y = [y0,y1,y2,y3], result = [x0,x2,y0,y2].
   310  - go: ConcatOdd
   311    commutative: false
   312    documentation: !string |-
   313      // NAME concatenates odd-indexed elements from the concatenation of x and y.
   314      // For x = [x0,x1,x2,x3] and y = [y0,y1,y2,y3], result = [x1,x3,y1,y3].
   315  - go: InterleaveEven
   316    commutative: false
   317    documentation: !string |-
   318      // NAME interleaves even elements from x and y.
   319      // For x = [a0,a1,a2,a3] and y = [b0,b1,b2,b3], result = [a0,b0,a2,b2].
   320  - go: InterleaveOdd
   321    commutative: false
   322    documentation: !string |-
   323      // NAME interleaves odd elements from x and y.
   324      // For x = [a0,a1,a2,a3] and y = [b0,b1,b2,b3], result = [a1,b1,a3,b3].
   325  

View as plain text