{"name":"simdle-universal","version":"1.0.1","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"},"devDependencies":{"brittle":"^3.1.0","standard":"^17.0.0"},"gitHead":"35dfe7d725b4eff3b9d1b3af6c00e0bd8a5b1af6","_id":"simdle-universal@1.0.1","_nodeVersion":"18.7.0","_npmVersion":"8.16.0","dist":{"integrity":"sha512-s6kC78z5RBAKVQdbQecD7DR3T5WlNZSgbM1+RtY45FVuD0Wr2ZF8ArLybazDqjfTGO85sLj0Jp9XfPOZFKTPWw==","shasum":"bccdc36013f977684ccb9054971afd01d5e0e3d7","tarball":"http://registry-npm.ywwl.com/simdle-universal/download/simdle-universal-1.0.1.tgz","fileCount":6,"unpackedSize":9467,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOtxJ+k8WB7SGdOZ/0uejzIf9V4fKHuFdKDUaH7QftfwIhAPwbtgvIGX94j8zJgtxkLglUDPYW89qJPV9/nZ7Cy3FC"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFbdqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0yA/+NwmOUQaKopaKyDWkiQb3QXixdR/6w7vrOKJixzyii4bC56uw\r\nlYfSLQBpfJAh67iH8HPGZ1+Bo10u/g6RP9V5a2B8uF0fX9Yai/8/NyRPy4rp\r\n2y32dJeLBUm4HMgJCt1+0/VL16nePF/qZtgijk/zt9JdlEVs6V8XVaPQknjM\r\nCy7trMUDN/fTsvA+YI15TgxmFrbRL+cgkIhpwd1vLfWwj5hPuEt8ZhF/AHix\r\nXR4FXyKUXR68+8w0g5VBGZQmG2d8fruoPgfdupPvhiJzVk8Sks1XhhgXe5e+\r\nLTAoZ0MY0l9+KRCiSj+WduEGGm/FwTj/ieUGjs6DjAZz19MwINDhx/VtH5Or\r\nFNZEhHkKa7QRvLFlvQfzhjd+3rkhekRGp2piz4AeW/u449tVrXgKADkEqNOw\r\n7NxbqjIwoI/5KyJpUAJj7r63fTf1bJxHole9RMqY/BN+EyWtstD2iBR0uqSZ\r\n3vkxuAiihlYExf+g89Ff7qHIP8tVIW8+BRiYq96SX5oVqvQdmoY7qtHqlByA\r\nDmYod10ZjHSpqFog3w7LcW/y1x1HQPSq13onTwgza0pKGZQrxBGqlxvbfDEE\r\nJtOuki7qicw7Hfm1HN9OdHEYlT/a3szwUg7AAiyE5znnzP4GHp5Wm350DAYE\r\nDZvJGCAaOMqXZIKBO6I41T3vx41LJg0HXbs=\r\n=1PSl\r\n-----END PGP SIGNATURE-----\r\n","size":2461,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.0.1.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.1_1662367593816_0.12367497056488652"},"_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":1662367593993,"_cnpm_publish_time":1662367593993,"dist-tags":{"latest":"1.1.3"}}