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

Function testBitwiseNotUnsignedPrecision

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

Source from the content-addressed store, hash-verified

289});
290
291function testBitwiseNotUnsignedPrecision(mode) {
292 const gpu = new GPU({ mode });
293 const kernel = gpu.createKernel(function(v1) {
294 return ~v1;
295 })
296 .setOutput([1])
297 .setPrecision('unsigned');
298
299 for (let i = 0; i < 10; i++) {
300 assert.equal(kernel(i)[0], ~i);
301 }
302
303 gpu.destroy();
304}
305
306test('bitwise NOT unsigned precision auto', () => {
307 testBitwiseNotUnsignedPrecision();

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…