Source file src/simd/deprecated.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
     6  
     7  package simd
     8  
     9  // Deprecated APIs that are wrappers around their replacements.
    10  
    11  // VectorBitSize returns the bit length of the vectors used by this package.
    12  //
    13  // Deprecated: use [VectorBits] instead.
    14  //
    15  //go:fix inline
    16  func VectorBitSize() int {
    17  	return VectorBits()
    18  }
    19  
    20  // HasHardwareCarrylessMultiply reports whether the CarrylessMul methods
    21  // of [Uint64s] are a single hardware instruction at the vector size this
    22  // package uses.
    23  //
    24  // Deprecated: The CarrylessMul methods are safe to call on every CPU, so
    25  // there is no need to check this before calling them. If the CPU lacks a
    26  // carryless multiply instruction at the vector size in use, they are
    27  // implemented with narrower instructions or software. Code that selects an
    28  // algorithm based on whether carryless multiply is fast should instead check
    29  // the CPU features in [simd/archsimd] that the CarrylessMul methods
    30  // there document.
    31  func HasHardwareCarrylessMultiply() bool {
    32  	return hwClmul
    33  }
    34  

View as plain text