{"name":"simdle-universal","version":"1.0.2","description":"Universal wrapper for libsimdle with a JavaScript fallback","main":"index.js","browser":{"./index.js":"./fallback.js"},"scripts":{"test":"standard && brittle test.mjs","prebuild":"prebuildify --napi --cwd native"},"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","node-gyp-build":"^4.2.3"},"devDependencies":{"brittle":"^3.1.0","napi-macros":"^2.0.0","prebuildify":"^5.0.1","standard":"^17.0.0"},"gitHead":"944df98f9b267ff780d4deaf2bf6d0012640a018","_id":"simdle-universal@1.0.2","_nodeVersion":"18.7.0","_npmVersion":"8.16.0","dist":{"integrity":"sha512-mipOk2yNy7vhw76ahkihBH0ZAORlb673avNl7k+hy/LHtFDXBgp5Rq4JDDEbkoIIPanI4BIplR2y8OQ0fimTzw==","shasum":"caeed40aab4d923c4339cd733c804b3994fd0ece","tarball":"http://registry-npm.ywwl.com/simdle-universal/download/simdle-universal-1.0.2.tgz","fileCount":11,"unpackedSize":374434,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrmzpto307m63BADCZELjyP0JJtwHEN3YqDGQ+nSKsnQIhAO0yyhOEJgibPxfEuDEUBc06PvvDnAcHNVv2K0yYiQWQ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFjsoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpENA//VqvnFHPkxJuztfaaobc/A5CdqPONvGKaPc4WNlYIPpqAFh1m\r\nPvEvwseG9tMprgzrVAqoYhHI9QEckcjJf1ypfLzSU1hqifHuMKQr1MXBmLWc\r\nKI9QO1qC3TOy+BYSqh1q59nyhszHVlBUsccPj6lnd5C6Xi/TlOQfi5cMPd57\r\nm79/LB8wihmNqFQD1TKrRMSxoN92sBiRN8tTiCNrtkZaFOXoQXsyVYyn7W0n\r\nWsRMpJBFxXQoBDamxEI8wXdRbKoVhDsquYhxmvXQfAzd0tfnpGycaozg4rIq\r\nwjxf1kCOdJ9dcdbyqMrOiEPUKZ4fox+R+NE2so1a28TrXU5mffmoOBni3Ddm\r\nyBsEg7WEA8XyUaZz6tSMlgyxD67e3OE/ZSQ5gFRFqEkI/KFwjbIZ5o2Vp75/\r\nOFylcuHlB2UTfnX0/KCxaGgcGQlQMpvPNVDmr9ctghIGuKQT/2tl+Jegtj1A\r\nO3cj/GNWZsvaSj+il0YBxuNxmvkwU6Fbj/cYO1rjMhRcY2kyjgR3lRByYNK4\r\ne0O9NgJ2QHjr4gvvZTY/DHpkI45D7miB5gEMmAo8QCZfgjl7H0gUd+4aZuUN\r\nYQBxUh86HPerXDOxHAGMfua4QzjmX/vE0Sj6s9JIUTsnbPVTO57vABKOFcaV\r\nue+kvGOF8iKUhC0zDx/Ii1pBDfDVLkySvqY=\r\n=i59C\r\n-----END PGP SIGNATURE-----\r\n","size":97072,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.0.2.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"kasperisager","email":"kasperisager@hey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdle-universal_1.0.2_1662401320324_0.34737349982886156"},"_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":1662401320504,"_cnpm_publish_time":1662401320504,"dist-tags":{"latest":"1.1.3"}}