vscode-gwebgpu

0.5.1 • Public • Published

g-for-gwebgpu README

It's hard for frontend engineers to write compute shaders in GPGPU scenarios. So we create a TypeScript-liked language in our GWebGPU project.

For more information, refer to our docs: https://gwebgpu.antv.vision/zh/docs/api/syntax.

It's an example to add 2 vectors writing with our syntax.

@numthreads(8, 1, 1)
class Add2Vectors {
  @in @out
  vectorA: float[];

  @in
  vectorB: float[];

  sum(a: float, b: float): float {
    return a + b;
  }

  @main
  compute() {
    const a = this.vectorA[globalInvocationID.x];
    const b = this.vectorB[globalInvocationID.x];
    this.vectorA[globalInvocationID.x] = this.sum(a, b);
  }
}

Features

  • syntax highlight with TextMate grammars

0.0.1

  • syntax highlight with TextMate grammars

Readme

Keywords

none

Package Sidebar

Install

npm i vscode-gwebgpu

Weekly Downloads

1

Version

0.5.1

License

none

Unpacked Size

126 kB

Total Files

8

Last publish

Collaborators

  • panyuqi