Source file src/simd/maskmerge_gen_amd64.go

     1  // Code generated by 'go run genfiles.go'; DO NOT EDIT.
     2  
     3  //go:build goexperiment.simd
     4  
     5  package simd
     6  
     7  // Masked returns x but with elements zeroed where mask is false.
     8  func (x Int8x16) Masked(mask Mask8x16) Int8x16 {
     9  	im := mask.AsInt8x16()
    10  	return im.And(x)
    11  }
    12  
    13  // Merge returns x but with elements set to y where mask is false.
    14  func (x Int8x16) Merge(y Int8x16, mask Mask8x16) Int8x16 {
    15  	im := mask.AsInt8x16()
    16  	return y.blend(x, im)
    17  }
    18  
    19  // Masked returns x but with elements zeroed where mask is false.
    20  func (x Int16x8) Masked(mask Mask16x8) Int16x8 {
    21  	im := mask.AsInt16x8()
    22  	return im.And(x)
    23  }
    24  
    25  // Merge returns x but with elements set to y where mask is false.
    26  func (x Int16x8) Merge(y Int16x8, mask Mask16x8) Int16x8 {
    27  	im := mask.AsInt16x8().AsInt8x16()
    28  	ix := x.AsInt8x16()
    29  	iy := y.AsInt8x16()
    30  	return iy.blend(ix, im).AsInt16x8()
    31  }
    32  
    33  // Masked returns x but with elements zeroed where mask is false.
    34  func (x Int32x4) Masked(mask Mask32x4) Int32x4 {
    35  	im := mask.AsInt32x4()
    36  	return im.And(x)
    37  }
    38  
    39  // Merge returns x but with elements set to y where mask is false.
    40  func (x Int32x4) Merge(y Int32x4, mask Mask32x4) Int32x4 {
    41  	im := mask.AsInt32x4().AsInt8x16()
    42  	ix := x.AsInt8x16()
    43  	iy := y.AsInt8x16()
    44  	return iy.blend(ix, im).AsInt32x4()
    45  }
    46  
    47  // Masked returns x but with elements zeroed where mask is false.
    48  func (x Int64x2) Masked(mask Mask64x2) Int64x2 {
    49  	im := mask.AsInt64x2()
    50  	return im.And(x)
    51  }
    52  
    53  // Merge returns x but with elements set to y where mask is false.
    54  func (x Int64x2) Merge(y Int64x2, mask Mask64x2) Int64x2 {
    55  	im := mask.AsInt64x2().AsInt8x16()
    56  	ix := x.AsInt8x16()
    57  	iy := y.AsInt8x16()
    58  	return iy.blend(ix, im).AsInt64x2()
    59  }
    60  
    61  // Masked returns x but with elements zeroed where mask is false.
    62  func (x Uint8x16) Masked(mask Mask8x16) Uint8x16 {
    63  	im := mask.AsInt8x16()
    64  	return x.AsInt8x16().And(im).AsUint8x16()
    65  }
    66  
    67  // Merge returns x but with elements set to y where mask is false.
    68  func (x Uint8x16) Merge(y Uint8x16, mask Mask8x16) Uint8x16 {
    69  	im := mask.AsInt8x16()
    70  	ix := x.AsInt8x16()
    71  	iy := y.AsInt8x16()
    72  	return iy.blend(ix, im).AsUint8x16()
    73  }
    74  
    75  // Masked returns x but with elements zeroed where mask is false.
    76  func (x Uint16x8) Masked(mask Mask16x8) Uint16x8 {
    77  	im := mask.AsInt16x8()
    78  	return x.AsInt16x8().And(im).AsUint16x8()
    79  }
    80  
    81  // Merge returns x but with elements set to y where mask is false.
    82  func (x Uint16x8) Merge(y Uint16x8, mask Mask16x8) Uint16x8 {
    83  	im := mask.AsInt16x8().AsInt8x16()
    84  	ix := x.AsInt8x16()
    85  	iy := y.AsInt8x16()
    86  	return iy.blend(ix, im).AsUint16x8()
    87  }
    88  
    89  // Masked returns x but with elements zeroed where mask is false.
    90  func (x Uint32x4) Masked(mask Mask32x4) Uint32x4 {
    91  	im := mask.AsInt32x4()
    92  	return x.AsInt32x4().And(im).AsUint32x4()
    93  }
    94  
    95  // Merge returns x but with elements set to y where mask is false.
    96  func (x Uint32x4) Merge(y Uint32x4, mask Mask32x4) Uint32x4 {
    97  	im := mask.AsInt32x4().AsInt8x16()
    98  	ix := x.AsInt8x16()
    99  	iy := y.AsInt8x16()
   100  	return iy.blend(ix, im).AsUint32x4()
   101  }
   102  
   103  // Masked returns x but with elements zeroed where mask is false.
   104  func (x Uint64x2) Masked(mask Mask64x2) Uint64x2 {
   105  	im := mask.AsInt64x2()
   106  	return x.AsInt64x2().And(im).AsUint64x2()
   107  }
   108  
   109  // Merge returns x but with elements set to y where mask is false.
   110  func (x Uint64x2) Merge(y Uint64x2, mask Mask64x2) Uint64x2 {
   111  	im := mask.AsInt64x2().AsInt8x16()
   112  	ix := x.AsInt8x16()
   113  	iy := y.AsInt8x16()
   114  	return iy.blend(ix, im).AsUint64x2()
   115  }
   116  
   117  // Masked returns x but with elements zeroed where mask is false.
   118  func (x Float32x4) Masked(mask Mask32x4) Float32x4 {
   119  	im := mask.AsInt32x4()
   120  	return x.AsInt32x4().And(im).AsFloat32x4()
   121  }
   122  
   123  // Merge returns x but with elements set to y where mask is false.
   124  func (x Float32x4) Merge(y Float32x4, mask Mask32x4) Float32x4 {
   125  	im := mask.AsInt32x4().AsInt8x16()
   126  	ix := x.AsInt8x16()
   127  	iy := y.AsInt8x16()
   128  	return iy.blend(ix, im).AsFloat32x4()
   129  }
   130  
   131  // Masked returns x but with elements zeroed where mask is false.
   132  func (x Float64x2) Masked(mask Mask64x2) Float64x2 {
   133  	im := mask.AsInt64x2()
   134  	return x.AsInt64x2().And(im).AsFloat64x2()
   135  }
   136  
   137  // Merge returns x but with elements set to y where mask is false.
   138  func (x Float64x2) Merge(y Float64x2, mask Mask64x2) Float64x2 {
   139  	im := mask.AsInt64x2().AsInt8x16()
   140  	ix := x.AsInt8x16()
   141  	iy := y.AsInt8x16()
   142  	return iy.blend(ix, im).AsFloat64x2()
   143  }
   144  
   145  // Masked returns x but with elements zeroed where mask is false.
   146  func (x Int8x32) Masked(mask Mask8x32) Int8x32 {
   147  	im := mask.AsInt8x32()
   148  	return im.And(x)
   149  }
   150  
   151  // Merge returns x but with elements set to y where mask is false.
   152  func (x Int8x32) Merge(y Int8x32, mask Mask8x32) Int8x32 {
   153  	im := mask.AsInt8x32()
   154  	return y.blend(x, im)
   155  }
   156  
   157  // Masked returns x but with elements zeroed where mask is false.
   158  func (x Int16x16) Masked(mask Mask16x16) Int16x16 {
   159  	im := mask.AsInt16x16()
   160  	return im.And(x)
   161  }
   162  
   163  // Merge returns x but with elements set to y where mask is false.
   164  func (x Int16x16) Merge(y Int16x16, mask Mask16x16) Int16x16 {
   165  	im := mask.AsInt16x16().AsInt8x32()
   166  	ix := x.AsInt8x32()
   167  	iy := y.AsInt8x32()
   168  	return iy.blend(ix, im).AsInt16x16()
   169  }
   170  
   171  // Masked returns x but with elements zeroed where mask is false.
   172  func (x Int32x8) Masked(mask Mask32x8) Int32x8 {
   173  	im := mask.AsInt32x8()
   174  	return im.And(x)
   175  }
   176  
   177  // Merge returns x but with elements set to y where mask is false.
   178  func (x Int32x8) Merge(y Int32x8, mask Mask32x8) Int32x8 {
   179  	im := mask.AsInt32x8().AsInt8x32()
   180  	ix := x.AsInt8x32()
   181  	iy := y.AsInt8x32()
   182  	return iy.blend(ix, im).AsInt32x8()
   183  }
   184  
   185  // Masked returns x but with elements zeroed where mask is false.
   186  func (x Int64x4) Masked(mask Mask64x4) Int64x4 {
   187  	im := mask.AsInt64x4()
   188  	return im.And(x)
   189  }
   190  
   191  // Merge returns x but with elements set to y where mask is false.
   192  func (x Int64x4) Merge(y Int64x4, mask Mask64x4) Int64x4 {
   193  	im := mask.AsInt64x4().AsInt8x32()
   194  	ix := x.AsInt8x32()
   195  	iy := y.AsInt8x32()
   196  	return iy.blend(ix, im).AsInt64x4()
   197  }
   198  
   199  // Masked returns x but with elements zeroed where mask is false.
   200  func (x Uint8x32) Masked(mask Mask8x32) Uint8x32 {
   201  	im := mask.AsInt8x32()
   202  	return x.AsInt8x32().And(im).AsUint8x32()
   203  }
   204  
   205  // Merge returns x but with elements set to y where mask is false.
   206  func (x Uint8x32) Merge(y Uint8x32, mask Mask8x32) Uint8x32 {
   207  	im := mask.AsInt8x32()
   208  	ix := x.AsInt8x32()
   209  	iy := y.AsInt8x32()
   210  	return iy.blend(ix, im).AsUint8x32()
   211  }
   212  
   213  // Masked returns x but with elements zeroed where mask is false.
   214  func (x Uint16x16) Masked(mask Mask16x16) Uint16x16 {
   215  	im := mask.AsInt16x16()
   216  	return x.AsInt16x16().And(im).AsUint16x16()
   217  }
   218  
   219  // Merge returns x but with elements set to y where mask is false.
   220  func (x Uint16x16) Merge(y Uint16x16, mask Mask16x16) Uint16x16 {
   221  	im := mask.AsInt16x16().AsInt8x32()
   222  	ix := x.AsInt8x32()
   223  	iy := y.AsInt8x32()
   224  	return iy.blend(ix, im).AsUint16x16()
   225  }
   226  
   227  // Masked returns x but with elements zeroed where mask is false.
   228  func (x Uint32x8) Masked(mask Mask32x8) Uint32x8 {
   229  	im := mask.AsInt32x8()
   230  	return x.AsInt32x8().And(im).AsUint32x8()
   231  }
   232  
   233  // Merge returns x but with elements set to y where mask is false.
   234  func (x Uint32x8) Merge(y Uint32x8, mask Mask32x8) Uint32x8 {
   235  	im := mask.AsInt32x8().AsInt8x32()
   236  	ix := x.AsInt8x32()
   237  	iy := y.AsInt8x32()
   238  	return iy.blend(ix, im).AsUint32x8()
   239  }
   240  
   241  // Masked returns x but with elements zeroed where mask is false.
   242  func (x Uint64x4) Masked(mask Mask64x4) Uint64x4 {
   243  	im := mask.AsInt64x4()
   244  	return x.AsInt64x4().And(im).AsUint64x4()
   245  }
   246  
   247  // Merge returns x but with elements set to y where mask is false.
   248  func (x Uint64x4) Merge(y Uint64x4, mask Mask64x4) Uint64x4 {
   249  	im := mask.AsInt64x4().AsInt8x32()
   250  	ix := x.AsInt8x32()
   251  	iy := y.AsInt8x32()
   252  	return iy.blend(ix, im).AsUint64x4()
   253  }
   254  
   255  // Masked returns x but with elements zeroed where mask is false.
   256  func (x Float32x8) Masked(mask Mask32x8) Float32x8 {
   257  	im := mask.AsInt32x8()
   258  	return x.AsInt32x8().And(im).AsFloat32x8()
   259  }
   260  
   261  // Merge returns x but with elements set to y where mask is false.
   262  func (x Float32x8) Merge(y Float32x8, mask Mask32x8) Float32x8 {
   263  	im := mask.AsInt32x8().AsInt8x32()
   264  	ix := x.AsInt8x32()
   265  	iy := y.AsInt8x32()
   266  	return iy.blend(ix, im).AsFloat32x8()
   267  }
   268  
   269  // Masked returns x but with elements zeroed where mask is false.
   270  func (x Float64x4) Masked(mask Mask64x4) Float64x4 {
   271  	im := mask.AsInt64x4()
   272  	return x.AsInt64x4().And(im).AsFloat64x4()
   273  }
   274  
   275  // Merge returns x but with elements set to y where mask is false.
   276  func (x Float64x4) Merge(y Float64x4, mask Mask64x4) Float64x4 {
   277  	im := mask.AsInt64x4().AsInt8x32()
   278  	ix := x.AsInt8x32()
   279  	iy := y.AsInt8x32()
   280  	return iy.blend(ix, im).AsFloat64x4()
   281  }
   282  
   283  // Masked returns x but with elements zeroed where mask is false.
   284  func (x Int8x64) Masked(mask Mask8x64) Int8x64 {
   285  	im := mask.AsInt8x64()
   286  	return im.And(x)
   287  }
   288  
   289  // Merge returns x but with elements set to y where m is false.
   290  func (x Int8x64) Merge(y Int8x64, mask Mask8x64) Int8x64 {
   291  	return y.blendMasked(x, mask)
   292  }
   293  
   294  // Masked returns x but with elements zeroed where mask is false.
   295  func (x Int16x32) Masked(mask Mask16x32) Int16x32 {
   296  	im := mask.AsInt16x32()
   297  	return im.And(x)
   298  }
   299  
   300  // Merge returns x but with elements set to y where m is false.
   301  func (x Int16x32) Merge(y Int16x32, mask Mask16x32) Int16x32 {
   302  	return y.blendMasked(x, mask)
   303  }
   304  
   305  // Masked returns x but with elements zeroed where mask is false.
   306  func (x Int32x16) Masked(mask Mask32x16) Int32x16 {
   307  	im := mask.AsInt32x16()
   308  	return im.And(x)
   309  }
   310  
   311  // Merge returns x but with elements set to y where m is false.
   312  func (x Int32x16) Merge(y Int32x16, mask Mask32x16) Int32x16 {
   313  	return y.blendMasked(x, mask)
   314  }
   315  
   316  // Masked returns x but with elements zeroed where mask is false.
   317  func (x Int64x8) Masked(mask Mask64x8) Int64x8 {
   318  	im := mask.AsInt64x8()
   319  	return im.And(x)
   320  }
   321  
   322  // Merge returns x but with elements set to y where m is false.
   323  func (x Int64x8) Merge(y Int64x8, mask Mask64x8) Int64x8 {
   324  	return y.blendMasked(x, mask)
   325  }
   326  
   327  // Masked returns x but with elements zeroed where mask is false.
   328  func (x Uint8x64) Masked(mask Mask8x64) Uint8x64 {
   329  	im := mask.AsInt8x64()
   330  	return x.AsInt8x64().And(im).AsUint8x64()
   331  }
   332  
   333  // Merge returns x but with elements set to y where m is false.
   334  func (x Uint8x64) Merge(y Uint8x64, mask Mask8x64) Uint8x64 {
   335  	ix := x.AsInt8x64()
   336  	iy := y.AsInt8x64()
   337  	return iy.blendMasked(ix, mask).AsUint8x64()
   338  }
   339  
   340  // Masked returns x but with elements zeroed where mask is false.
   341  func (x Uint16x32) Masked(mask Mask16x32) Uint16x32 {
   342  	im := mask.AsInt16x32()
   343  	return x.AsInt16x32().And(im).AsUint16x32()
   344  }
   345  
   346  // Merge returns x but with elements set to y where m is false.
   347  func (x Uint16x32) Merge(y Uint16x32, mask Mask16x32) Uint16x32 {
   348  	ix := x.AsInt16x32()
   349  	iy := y.AsInt16x32()
   350  	return iy.blendMasked(ix, mask).AsUint16x32()
   351  }
   352  
   353  // Masked returns x but with elements zeroed where mask is false.
   354  func (x Uint32x16) Masked(mask Mask32x16) Uint32x16 {
   355  	im := mask.AsInt32x16()
   356  	return x.AsInt32x16().And(im).AsUint32x16()
   357  }
   358  
   359  // Merge returns x but with elements set to y where m is false.
   360  func (x Uint32x16) Merge(y Uint32x16, mask Mask32x16) Uint32x16 {
   361  	ix := x.AsInt32x16()
   362  	iy := y.AsInt32x16()
   363  	return iy.blendMasked(ix, mask).AsUint32x16()
   364  }
   365  
   366  // Masked returns x but with elements zeroed where mask is false.
   367  func (x Uint64x8) Masked(mask Mask64x8) Uint64x8 {
   368  	im := mask.AsInt64x8()
   369  	return x.AsInt64x8().And(im).AsUint64x8()
   370  }
   371  
   372  // Merge returns x but with elements set to y where m is false.
   373  func (x Uint64x8) Merge(y Uint64x8, mask Mask64x8) Uint64x8 {
   374  	ix := x.AsInt64x8()
   375  	iy := y.AsInt64x8()
   376  	return iy.blendMasked(ix, mask).AsUint64x8()
   377  }
   378  
   379  // Masked returns x but with elements zeroed where mask is false.
   380  func (x Float32x16) Masked(mask Mask32x16) Float32x16 {
   381  	im := mask.AsInt32x16()
   382  	return x.AsInt32x16().And(im).AsFloat32x16()
   383  }
   384  
   385  // Merge returns x but with elements set to y where m is false.
   386  func (x Float32x16) Merge(y Float32x16, mask Mask32x16) Float32x16 {
   387  	ix := x.AsInt32x16()
   388  	iy := y.AsInt32x16()
   389  	return iy.blendMasked(ix, mask).AsFloat32x16()
   390  }
   391  
   392  // Masked returns x but with elements zeroed where mask is false.
   393  func (x Float64x8) Masked(mask Mask64x8) Float64x8 {
   394  	im := mask.AsInt64x8()
   395  	return x.AsInt64x8().And(im).AsFloat64x8()
   396  }
   397  
   398  // Merge returns x but with elements set to y where m is false.
   399  func (x Float64x8) Merge(y Float64x8, mask Mask64x8) Float64x8 {
   400  	ix := x.AsInt64x8()
   401  	iy := y.AsInt64x8()
   402  	return iy.blendMasked(ix, mask).AsFloat64x8()
   403  }
   404  

View as plain text