github.com/vc42/parquet-go@v0.0.0-20240320194221-1a9adb5f23f5/value_amd64.go (about)

     1  //go:build !purego
     2  
     3  package parquet
     4  
     5  import "golang.org/x/sys/cpu"
     6  
     7  //go:noescape
     8  func memsetValuesAVX2(values []Value, model Value, _ uint64)
     9  
    10  func memsetValues(values []Value, model Value) {
    11  	if cpu.X86.HasAVX2 {
    12  		memsetValuesAVX2(values, model, 0)
    13  	} else {
    14  		for i := range values {
    15  			values[i] = model
    16  		}
    17  	}
    18  }