MCPcopy Create free account
hub / github.com/gpujs/gpu.js / createTextureOf

Function createTextureOf

test/internal/different-texture-cloning.js:8–16  ·  view source on GitHub ↗
(value, type)

Source from the content-addressed store, hash-verified

6function testArrayThenArray1D4(mode) {
7 const gpu = new GPU({ mode });
8 function createTextureOf(value, type) {
9 return (gpu.createKernel(function(value) {
10 return value[this.thread.x];
11 }, {
12 output: [1],
13 pipeline: true,
14 argumentTypes: { value: type }
15 }))(value);
16 }
17 const arrayTexture = createTextureOf([1], 'Array');
18 const arrayTextureClone = arrayTexture.clone();
19 const array4Texture = createTextureOf([[1,2,3,4]], 'Array1D(4)');

Callers 2

testArrayThenArray1D4Function · 0.85
testArray1D4ThenArrayFunction · 0.85

Calls 1

createKernelMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…