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

Function testBitwiseAndUnsignedPrecision

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

Source from the content-addressed store, hash-verified

45});
46
47function testBitwiseAndUnsignedPrecision(mode) {
48 const gpu = new GPU({ mode });
49 const kernel = gpu.createKernel(function(v1, v2) {
50 return v1 & v2;
51 })
52 .setOutput([1])
53 .setPrecision('unsigned');
54
55 for (let i = 0; i < 10; i++) {
56 for (let j = 0; j < 10; j++) {
57 assert.equal(kernel(i, j)[0], i & j);
58 }
59 }
60
61 gpu.destroy();
62}
63
64test('bitwise AND unsigned precision auto', () => {
65 testBitwiseAndUnsignedPrecision();

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…