{"name":"simdle-universal","version":"1.0.0","description":"Universal wrapper for libsimdle with a JavaScript fallback","main":"index.js","browser":{"./index.js":"./browser.js"},"scripts":{"test":"standard && brittle test.mjs"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/simdle-universal.git"},"author":{"name":"Kasper Isager Dalsgarð","email":"kasper@funktionel.co"},"license":"ISC","bugs":{"url":"https://github.com/holepunchto/simdle-universal/issues"},"homepage":"https://github.com/holepunchto/simdle-universal#readme","dependencies":{"b4a":"^1.6.0","simdle-native":"^1.0.0"},"devDependencies":{"brittle":"^3.1.0","standard":"^17.0.0"},"gitHead":"28edb0d3d56f4b9835a94e98a50959c4264a7735","_id":"simdle-universal@1.0.0","_nodeVersion":"18.7.0","_npmVersion":"8.16.0","dist":{"integrity":"sha512-GUJh0hKojRkPGzoMLcN8/aCSRrE8o+J3AcZMi4XFWs26cSDWtB0U+5phUIb2WKJwTnbF6HwAVtdhWNGYIIqOUg==","shasum":"eb427b49f16987ec270cacc6719997259a54facb","tarball":"http://registry-npm.ywwl.com/simdle-universal/download/simdle-universal-1.0.0.tgz","fileCount":6,"unpackedSize":9484,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsgtWUiI78yDrKtY+6CdvHAFN6M2sjHlVfnb6Fcf4QKgIhAMYLn8HHP5lR+wNR4/krAUOlgwZ4JE5VMeSNyQ8XoloI"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFankACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQ0g//VTGmXksSCr9wPZfhdKAHUt2MyJZgUXKr+VSkfVbw4ZH3b2Jj\r\nzqhfQeaLB6nXn7fN09KQiPVq1YaNSWF2wyTVTLBTD6dzku6YZ9fjr2Dp4SrF\r\nuqPwLXMOE3jgXXujlvS0um9PxDQI8lMrmx47VfP7TIAMvMUedgLMQORMpAbd\r\nrIxLxJJwkhPaurErCsxSE5wnsU/LMSpRBx2fbXYW1i6efkiNuXYKQDxb62Pn\r\nC6zjTpjrbMpZyfKyY0XYBuxK/ayU3QLx/I8Kq7WpJzwtqU5nlIiPw2iTJb+u\r\nqbpn6j3OJBrV5EmjKBGFqoyN0z9e70GuLipFfKSf87qpsCsNW/HVSlYZmM1+\r\nignZlGB9Y4qSt5JxAytskIwTF6aUmVNqzFIFc0n0kZwzxtTzsL0lEN43fPao\r\n+pffIeBqZdi1AItWc1wTElQIq0OpJ/DyIOkP3NUGrHB44YdVL+6pRu9gPxNo\r\nFVQKioopT9LUWPwfjYtN8koPfYWOPtEbEM1tzJ0dJoceezRrv+kWEAPR5hM1\r\nYAntVueUnDTs1lkIHZB7pbZJHBmRuBRPersB2CQ3hGbpQvOovj3ATci2BBGO\r\n1MxdtZhl8udIH5QzRSrcWgEP2nVlq/eniYnX5q/0BoGiCIU6emK02KzLFdN/\r\nBn5Dit62Fw6YTOCmazPtpax9HF4PrNtcRBs=\r\n=Obn7\r\n-----END PGP SIGNATURE-----\r\n","size":2461,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.0.0.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"kasperisager","email":"kasperisager@hey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdle-universal_1.0.0_1662364132163_0.5701229537208363"},"_hasShrinkwrap":false,"readme":"# simdle-universal\n\nUniversal wrapper for https://github.com/holepunchto/libsimdle with a JavaScript fallback.\n\n```sh\nnpm install simdle-universal\n```\n\n## Usage\n\n```js\nconst { cnt } = require('simdle-universal')\n\ncnt(Buffer.alloc(16, 0xff))\n// <Buffer 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08 08>\n```\n\n## API\n\nThe lane width of all APIs is determined by the input buffer. That is, if providing a `Uint8Array` the lane width will be 8 bits, if providing a `Uint16Array` the lane width will be 16 bits and so on.\n\n#### `const result = allo(buffer)`\n\nCheck if the buffer contains only ones.\n\n#### `const result = allz(buffer)`\n\nCheck if the buffer contains only zeros.\n\n#### `const result = and(a, b[, result])`\n\nCompute the bitwise AND of `a` and `b`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = clear(a, b[, result])`\n\nClear the bits in `b` from `a`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = clo(buffer[, result])`\n\nCount the number of leading ones in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = clz(buffer[, result])`\n\nCount the number of leading zeroes in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = cnt(buffer[, result])`\n\nCompute the population count in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = cto(buffer[, result])`\n\nCount the number of trailing ones in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = ctz(buffer[, result])`\n\nCount the number of trailing zeroes in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = not(buffer[, result])`\n\nCompute the bitwise NOT in `buffer`, storing the result in `result`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = or(a, b[, result])`\n\nCompute the bitwise OR of `a` and `b`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n#### `const result = sum(buffer)`\n\nCompute the sum of `buffer` as a `bigint`.\n\n#### `const result = xor(a, b[, result])`\n\nCompute the bitwise XOR of `a` and `b`. If `result` is not provided, a fresh buffer is allocated. The `result` buffer is returned to the caller.\n\n## License\n\nISC\n","publish_time":1662364132300,"_cnpm_publish_time":1662364132300,"dist-tags":{"latest":"1.1.3"}}