MCPcopy Index your code
hub / github.com/gpujs/gpu.js / testBitwiseOrSinglePrecision

Function testBitwiseOrSinglePrecision

test/features/bitwise-operators.js:88–103  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

86});
87
88function testBitwiseOrSinglePrecision(mode) {
89 const gpu = new GPU({ mode });
90 const kernel = gpu.createKernel(function(v1, v2) {
91 return v1 | v2;
92 })
93 .setOutput([1])
94 .setPrecision('single');
95
96 for (let i = 0; i < 10; i++) {
97 for (let j = 0; j < 10; j++) {
98 assert.equal(kernel(i, j)[0], i | j);
99 }
100 }
101
102 gpu.destroy();
103}
104
105(GPU.isSinglePrecisionSupported ? test : skip)('bitwise OR single precision auto', () => {
106 testBitwiseOrSinglePrecision();

Callers 1

Calls 5

createKernelMethod · 0.95
destroyMethod · 0.95
kernelFunction · 0.85
setPrecisionMethod · 0.45
setOutputMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…