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

Function testBitwiseXORSinglePrecision

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

Source from the content-addressed store, hash-verified

168});
169
170function testBitwiseXORSinglePrecision(mode) {
171 const gpu = new GPU({ mode });
172 const kernel = gpu.createKernel(function(v1, v2) {
173 return v1 ^ v2;
174 })
175 .setOutput([1])
176 .setPrecision('single');
177
178 for (let i = 0; i < 10; i++) {
179 for (let j = 0; j < 10; j++) {
180 assert.equal(kernel(i, j)[0], i ^ j);
181 }
182 }
183
184 gpu.destroy();
185}
186
187(GPU.isSinglePrecisionSupported ? test : skip)('bitwise XOR single precision auto', () => {
188 testBitwiseXORSinglePrecision();

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…