...

Source file src/pkg/internal/bytealg/bytealg.go

     1	// Copyright 2018 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	package bytealg
     6	
     7	import (
     8		"internal/cpu"
     9		"unsafe"
    10	)
    11	
    12	// Offsets into internal/cpu records for use in assembly.
    13	const (
    14		offsetX86HasSSE2   = unsafe.Offsetof(cpu.X86.HasSSE2)
    15		offsetX86HasSSE42  = unsafe.Offsetof(cpu.X86.HasSSE42)
    16		offsetX86HasAVX2   = unsafe.Offsetof(cpu.X86.HasAVX2)
    17		offsetX86HasPOPCNT = unsafe.Offsetof(cpu.X86.HasPOPCNT)
    18	
    19		offsetS390xHasVX = unsafe.Offsetof(cpu.S390X.HasVX)
    20	)
    21	
    22	// MaxLen is the maximum length of the string to be searched for (argument b) in Index.
    23	var MaxLen int
    24	

View as plain text