Source file src/simd/internal/bridge/simd_types_emulated.go

     1  // Copyright 2026 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build goexperiment.simd && (amd64 || wasm || arm64)
     6  
     7  package bridge
     8  
     9  type _simd struct {
    10  	_ [0]func(*_simd) *_simd
    11  }
    12  
    13  // Int8s represents a 128-bit vector of 16 int8 elements.
    14  type Int8s struct {
    15  	_    _simd
    16  	a, b uint64
    17  }
    18  
    19  // Int16s represents a 128-bit vector of 8 int16 elements.
    20  type Int16s struct {
    21  	_    _simd
    22  	a, b uint64
    23  }
    24  
    25  // Int32s represents a 128-bit vector of 4 int32 elements.
    26  type Int32s struct {
    27  	_    _simd
    28  	a, b uint64
    29  }
    30  
    31  // Int64s represents a 128-bit vector of 2 int64 elements.
    32  type Int64s struct {
    33  	_    _simd
    34  	a, b uint64
    35  }
    36  
    37  // Uint8s represents a 128-bit vector of 16 uint8 elements.
    38  type Uint8s struct {
    39  	_    _simd
    40  	a, b uint64
    41  }
    42  
    43  // Uint16s represents a 128-bit vector of 8 uint16 elements.
    44  type Uint16s struct {
    45  	_    _simd
    46  	a, b uint64
    47  }
    48  
    49  // Uint32s represents a 128-bit vector of 4 uint32 elements.
    50  type Uint32s struct {
    51  	_    _simd
    52  	a, b uint64
    53  }
    54  
    55  // Uint64s represents a 128-bit vector of 2 uint64 elements.
    56  type Uint64s struct {
    57  	_    _simd
    58  	a, b uint64
    59  }
    60  
    61  // Float32s represents a 128-bit vector of 4 float32 elements.
    62  type Float32s struct {
    63  	_    _simd
    64  	a, b uint64
    65  }
    66  
    67  // Float64s represents a 128-bit vector of 2 float64 elements.
    68  type Float64s struct {
    69  	_    _simd
    70  	a, b uint64
    71  }
    72  
    73  // Mask8s represents a 128-bit mask vector for 16 int8/uint8 elements.
    74  type Mask8s struct {
    75  	_    _simd
    76  	a, b uint64
    77  }
    78  
    79  // Mask16s represents a 128-bit mask vector for 8 int16/uint16 elements.
    80  type Mask16s struct {
    81  	_    _simd
    82  	a, b uint64
    83  }
    84  
    85  // Mask32s represents a 128-bit mask vector for 4 int32/uint32/float32 elements.
    86  type Mask32s struct {
    87  	_    _simd
    88  	a, b uint64
    89  }
    90  
    91  // Mask64s represents a 128-bit mask vector for 2 int64/uint64/float64 elements.
    92  type Mask64s struct {
    93  	_    _simd
    94  	a, b uint64
    95  }
    96  

View as plain text