Source file src/simd/archsimd/other_gen_sve.go

     1  // Code generated by 'tmplgen'; DO NOT EDIT.
     2  
     3  //go:build goexperiment.simd && arm64
     4  
     5  package archsimd
     6  
     7  // HiToLo returns a vector whose low half is the high half of x and whose high
     8  // half is zero.
     9  //
    10  //	z = {x[n/2], x[n/2+1], ..., x[n-1], 0, ..., 0}, where n = x.Len()
    11  //
    12  // Emulated, CPU Feature: SVE
    13  func (x Int8s) HiToLo() (z Int8s) {
    14  	var zero Uint64s
    15  	return x.ToBits().ReshapeToUint64s().InterleaveHi(zero).ConcatEven(zero).ReshapeToUint8s().BitsToInt8()
    16  }
    17  
    18  // HiToLo returns a vector whose low half is the high half of x and whose high
    19  // half is zero.
    20  //
    21  //	z = {x[n/2], x[n/2+1], ..., x[n-1], 0, ..., 0}, where n = x.Len()
    22  //
    23  // Emulated, CPU Feature: SVE
    24  func (x Int16s) HiToLo() (z Int16s) {
    25  	var zero Uint64s
    26  	return x.ToBits().ReshapeToUint64s().InterleaveHi(zero).ConcatEven(zero).ReshapeToUint16s().BitsToInt16()
    27  }
    28  
    29  // HiToLo returns a vector whose low half is the high half of x and whose high
    30  // half is zero.
    31  //
    32  //	z = {x[n/2], x[n/2+1], ..., x[n-1], 0, ..., 0}, where n = x.Len()
    33  //
    34  // Emulated, CPU Feature: SVE
    35  func (x Int32s) HiToLo() (z Int32s) {
    36  	var zero Uint64s
    37  	return x.ToBits().ReshapeToUint64s().InterleaveHi(zero).ConcatEven(zero).ReshapeToUint32s().BitsToInt32()
    38  }
    39  
    40  // HiToLo returns a vector whose low half is the high half of x and whose high
    41  // half is zero.
    42  //
    43  //	z = {x[n/2], x[n/2+1], ..., x[n-1], 0, ..., 0}, where n = x.Len()
    44  //
    45  // Emulated, CPU Feature: SVE
    46  func (x Int64s) HiToLo() (z Int64s) {
    47  	var zero Uint64s
    48  	return x.ToBits().InterleaveHi(zero).ConcatEven(zero).BitsToInt64()
    49  }
    50  
    51  // HiToLo returns a vector whose low half is the high half of x and whose high
    52  // half is zero.
    53  //
    54  //	z = {x[n/2], x[n/2+1], ..., x[n-1], 0, ..., 0}, where n = x.Len()
    55  //
    56  // Emulated, CPU Feature: SVE
    57  func (x Uint8s) HiToLo() (z Uint8s) {
    58  	var zero Uint64s
    59  	return x.ReshapeToUint64s().InterleaveHi(zero).ConcatEven(zero).ReshapeToUint8s()
    60  }
    61  
    62  // HiToLo returns a vector whose low half is the high half of x and whose high
    63  // half is zero.
    64  //
    65  //	z = {x[n/2], x[n/2+1], ..., x[n-1], 0, ..., 0}, where n = x.Len()
    66  //
    67  // Emulated, CPU Feature: SVE
    68  func (x Uint16s) HiToLo() (z Uint16s) {
    69  	var zero Uint64s
    70  	return x.ReshapeToUint64s().InterleaveHi(zero).ConcatEven(zero).ReshapeToUint16s()
    71  }
    72  
    73  // HiToLo returns a vector whose low half is the high half of x and whose high
    74  // half is zero.
    75  //
    76  //	z = {x[n/2], x[n/2+1], ..., x[n-1], 0, ..., 0}, where n = x.Len()
    77  //
    78  // Emulated, CPU Feature: SVE
    79  func (x Uint32s) HiToLo() (z Uint32s) {
    80  	var zero Uint64s
    81  	return x.ReshapeToUint64s().InterleaveHi(zero).ConcatEven(zero).ReshapeToUint32s()
    82  }
    83  
    84  // HiToLo returns a vector whose low half is the high half of x and whose high
    85  // half is zero.
    86  //
    87  //	z = {x[n/2], x[n/2+1], ..., x[n-1], 0, ..., 0}, where n = x.Len()
    88  //
    89  // Emulated, CPU Feature: SVE
    90  func (x Uint64s) HiToLo() (z Uint64s) {
    91  	var zero Uint64s
    92  	return x.InterleaveHi(zero).ConcatEven(zero)
    93  }
    94  
    95  // HiToLo returns a vector whose low half is the high half of x and whose high
    96  // half is zero.
    97  //
    98  //	z = {x[n/2], x[n/2+1], ..., x[n-1], 0, ..., 0}, where n = x.Len()
    99  //
   100  // Emulated, CPU Feature: SVE
   101  func (x Float32s) HiToLo() (z Float32s) {
   102  	var zero Uint64s
   103  	return x.ToBits().ReshapeToUint64s().InterleaveHi(zero).ConcatEven(zero).ReshapeToUint32s().BitsToFloat32()
   104  }
   105  
   106  // HiToLo returns a vector whose low half is the high half of x and whose high
   107  // half is zero.
   108  //
   109  //	z = {x[n/2], x[n/2+1], ..., x[n-1], 0, ..., 0}, where n = x.Len()
   110  //
   111  // Emulated, CPU Feature: SVE
   112  func (x Float64s) HiToLo() (z Float64s) {
   113  	var zero Uint64s
   114  	return x.ToBits().InterleaveHi(zero).ConcatEven(zero).BitsToFloat64()
   115  }
   116  

View as plain text