Source file src/cmd/cgo/internal/testplugin/testdata/simd/plugin.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 package main 6 7 import "simd" 8 9 // Lanes uses package simd, but has no SIMD types in its signature. 10 func Lanes() int { 11 return simd.Int32s{}.Len() 12 } 13 14 // F and V have SIMD types, so the compiler only generates versions of them 15 // that are specialized to each vector size. They must not keep the plugin 16 // from building or loading. 17 func F(x simd.Int32s) int { 18 return x.Len() 19 } 20 21 var V simd.Int32s 22 23 func main() {} 24