Go SIMD指令映射工具

提供Go汇编SIMD指令到`archsimd` Go API调用的映射工具,可作为CLI工具或MCP服务器使用。

  • by JunyangShao
  • Go
  • 本地部署
  • 3 星标
  • 更新于
在 GitHub 查看 JunyangShao/simdmapper-mcp

使用说明

Go SimdMapper MCP服务器

此工具提供从Go程序集SIMD指令到 archsimd Go API调用。它可以直接用作CLI工具或模型上下文协议(MCP)服务器。

安装

来源

go build -o simdmcp main.go

用法

命令行接口命令模式

通过提供汇编指令作为参数,可以直接从命令行运行该工具。

例子:

./simdmcp "VPSUBD X2, X9, X2"

输出:

if archsimd.X86.AVX() {
        X2 = X9.Sub(X2) \\ X9 is of type Int32x4, X2 is of type Int32x4, X2 is of type Int32x4
}
// Or
if archsimd.X86.AVX() {
        X2 = X9.Sub(X2) \\ X9 is of type Uint32x4, X2 is of type Uint32x4, X2 is of type Uint32x4
}

使用CLI输入时,不要忘记转义特殊字符。

MCP服务器模式(gemini cli)

使用此工具 gemini-cli (或其他MCP客户端),配置客户端以运行此二进制文件。服务器通过标准输入/输出(stdio)进行通信。

配置:

如果你的 gemini-cli 使用配置文件(通常 ~/.gemini/settings.json 或类似),将此服务器添加到 mcpServers 章节:

  "mcpServers": {
    "simd_mapper": {
        "command": "/absolute/path/to/simdmcp-bin"
    }
  }

配置后,代理将可以访问 go_simdmapper 该工具可用于验证SIMD映射。

考虑使用 gopls MCP 协同增效!