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

Function testBitwiseAndSinglePrecision

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

Source from the content-addressed store, hash-verified

4describe('feature: bitwise operators');
5
6function testBitwiseAndSinglePrecision(mode) {
7 const gpu = new GPU({ mode });
8 const kernel = gpu.createKernel(function(v1, v2) {
9 return v1 & v2;
10 })
11 .setOutput([1])
12 .setPrecision('single');
13
14 for (let i = 0; i < 10; i++) {
15 for (let j = 0; j < 10; j++) {
16 assert.equal(kernel(i, j)[0], i & j);
17 }
18 }
19
20 gpu.destroy();
21}
22
23(GPU.isSinglePrecisionSupported ? test : skip)('bitwise AND single precision auto', () => {
24 testBitwiseAndSinglePrecision();

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…