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

Function testBitwiseOrUnsignedPrecision

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

Source from the content-addressed store, hash-verified

127});
128
129function testBitwiseOrUnsignedPrecision(mode) {
130 const gpu = new GPU({ mode });
131 const kernel = gpu.createKernel(function(v1, v2) {
132 return v1 | v2;
133 })
134 .setOutput([1])
135 .setPrecision('unsigned');
136
137 for (let i = 0; i < 10; i++) {
138 for (let j = 0; j < 10; j++) {
139 assert.equal(kernel(i, j)[0], i | j);
140 }
141 }
142
143 gpu.destroy();
144}
145
146test('bitwise OR unsigned precision auto', () => {
147 testBitwiseOrUnsignedPrecision();

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…