function testDirectlyOnKernelViaMethod(nativeFunctions, mode) {
  const gpu = new GPU({ mode });
  const kernel = gpu.createKernel(function (v) {
    return native(v[this.thread.x]);
  }, {
    output: [1]
  })
    .setNativeFunctions(nativeFunctions);
  assert.equal(kernel([1])[0], 2);
  gpu.destroy();
}
@param {IGPUNativeFunction[]} nativeFunctions
@param {GPUMode|GPUInternalMode} [mode]