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

Function testBitwiseXORUnsignedPrecision

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

Source from the content-addressed store, hash-verified

209});
210
211function testBitwiseXORUnsignedPrecision(mode) {
212 const gpu = new GPU({ mode });
213 const kernel = gpu.createKernel(function(v1, v2) {
214 return v1 ^ v2;
215 })
216 .setOutput([1])
217 .setPrecision('unsigned');
218
219 for (let i = 0; i < 10; i++) {
220 for (let j = 0; j < 10; j++) {
221 assert.equal(kernel(i, j)[0], i ^ j);
222 }
223 }
224
225 gpu.destroy();
226}
227
228test('bitwise XOR unsigned precision auto', () => {
229 testBitwiseXORUnsignedPrecision();

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…