Skip to content
Skillv1.0.0

python

Python 面向的 C API 声明。C++ CUDA 后端与 Python Cython 桥的接口边界。

by ZhangXin8069(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from ZhangXin8069/PyQCU (cpp/cuda/qcu/python/AGENTS.md). Install upstream with npx skills add ZhangXin8069/PyQCU --skill python. Copyright stays with the author.

AGENTS.md — cpp/cuda/qcu/python

Python 面向的 C API 声明。C++ CUDA 后端与 Python Cython 桥的接口边界。

文件

文件 用途
pyqcu.h C API 头 — 22 个 extern "C" 函数,指针以 long long 传递

必须与 pyqcu/cuda/qcu/qcu.pxd 精确同步(Cython 声明文件)。任何不匹配导致静默内存损坏。

所有函数接收三个参数数组:

  • set_ptrs (int64[100]):C++ 运行时管理的 scratch 缓冲指针
  • params (int32[54]):格点维度、网格大小、数据类型、迭代次数、计划选择
  • argv (float64[7]):mass、atol、sigma、MG 容差

C++→Python 数据指针从 tensor.contiguous().data_ptr() 转为 long long

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/zhangxin8069-pyqcu-python/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

zhangxin8069-pyqcu-python.ocm.jsonjson
{
  "ocm": "1",
  "id": "zhangxin8069-pyqcu-python",
  "kind": "skill",
  "name": "python",
  "description": "Python 面向的 C API 声明。C++ CUDA 后端与 Python Cython 桥的接口边界。",
  "publisher": "ZhangXin8069",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "github-agents"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Python 面向的 C API 声明。C++ CUDA 后端与 Python Cython 桥的接口边界。"
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github-agents",
      "repository": "https://github.com/ZhangXin8069/PyQCU",
      "path": "cpp/cuda/qcu/python/AGENTS.md",
      "ref": "62fca0c28b09546d528cd52fef84bed6d0c3f4e1",
      "url": "https://github.com/ZhangXin8069/PyQCU/blob/62fca0c28b09546d528cd52fef84bed6d0c3f4e1/cpp/cuda/qcu/python/AGENTS.md",
      "key": "ZhangXin8069/PyQCU/cpp/cuda/qcu/python/AGENTS.md"
    }
  },
  "instructions": "# AGENTS.md — cpp/cuda/qcu/python\n\nPython 面向的 C API 声明。C++ CUDA 后端与 Python Cython 桥的接口边界。\n\n## 文件\n\n| 文件 | 用途 |\n|---|---|\n| `pyqcu.h` | C API 头 — 22 个 `extern \"C\"` 函数,指针以 `long long` 传递 |\n\n**必须与 `pyqcu/cuda/qcu/qcu.pxd` 精确同步**(Cython 声明文件)。任何不匹配导致静默内存损坏。\n\n所有函数接收三个参数数组:\n- `set_ptrs` (int64[100]):C++ 运行时管理的 scratch 缓冲指针\n- `params` (int32[54]):格点维度、网格大小、数据类型、迭代次数、计划选择\n- `argv` (float64[7]):mass、atol、sigma、MG 容差\n\nC++→Python 数据指针从 `tensor.contiguous().data_ptr()` 转为 `long long`。",
  "cost": {
    "context_tokens": 119
  }
}

Fetch it by URL: GET /api/v1/registry/zhangxin8069-pyqcu-python/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.