2 Star 14 Fork 16

王布衣/engine

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
optimize.go 420 Bytes
Copy Edit Raw Blame History
王布衣 authored 2024-02-12 22:53 +08:00 . 适配新版本的pandas
package utils
import (
"errors"
"gitee.com/quant1x/gox/logger"
"gitee.com/quant1x/num"
"golang.org/x/sys/cpu"
)
var (
ErrAccelerationNotSupported = errors.New("acceleration not supported on this platform")
)
// Optimize 系统优化系列
func Optimize() {
// 如果支持AVX2就打开
if cpu.X86.HasAVX2 && cpu.X86.HasFMA {
num.SetAvx2Enabled(true)
} else {
logger.Warn(ErrAccelerationNotSupported)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
v1.7.3

Search