Quick Start

1 min read

GWebGPU

GWebGPU 版本号

Use CDN

<script src="https://unpkg.com/@antv/g-webgpu"></script>

We expose a global object window.GWebGPU

const world = window.GWebGPU.World.create({
  engineOptions: {
    supportCompute: true,
  },
});
const kernel = world.createKernel(precompiledBundle);

Use @antv/g-webgpu

npm install --save @antv/g-webgpu
import { World } from '@antv/g-webgpu';

const world = World.create({
  engineOptions: {
    supportCompute: true,
  },
});
const kernel = world.createKernel(precompiledBundle);

Install VS Code Extension

Install VS Code Extension

Write your first parallel task

Add 2 vectors