{"name":"simdle-universal","version":"1.1.2","description":"Universal wrapper for libsimdle with a JavaScript fallback","main":"index.js","browser":{"./index.js":"./fallback.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.1.1"},"optionalDependencies":{"simdle-native":"^1.1.1"},"devDependencies":{"brittle":"^3.1.0","standard":"^17.0.0"},"gitHead":"a78ac1302007c44fe70000c537e3be7885697278","_id":"simdle-universal@1.1.2","_nodeVersion":"19.7.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-3n3w1bs+uwgHKQjt6arez83EywNlhZzYvNOhvAASTl/8KqNIcqr6aHyGt3JRlfuUC7iB0tomJRPlJ2cRGIpBzA==","shasum":"ecc84434d0c5cd4e6a2557763cddc46ad557a301","tarball":"http://registry-npm.ywwl.com/simdle-universal/download/simdle-universal-1.1.2.tgz","fileCount":6,"unpackedSize":10212,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhCAweN3wBrrwjiD48gybWnDLzG1uj1q5d+S50eZ9WaQIhAMPPdxe75aH7HIFt0pqNfDR8nWjzd39xCz95ALU3TTuZ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkHbr+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqgwQ/+Liwv3PuMDo0fPsJKI3Q58nfVeX2mWWAWe6BfE04sqK3pgX1K\r\nCfHrGlXBvAKv0yBr37qYR7WCl2RPgPxRdSMkWw5sK2p08EAwzoIHgXEUN4PX\r\noIiCxogPsn8DpZ/yN1Z8YNbtluuEWCmXWeDsaPYphCKDrIo0Jt2javWau/6i\r\n45D+D1u2y72wGk00LXIoorLDA/N2UjHNhiWiSAwx9W+P/j80cJXuDMcrrnJf\r\ngY9Kr5p9RUa5vTMdlzW3N8aGEoJ4dwzbtVHEZSMbbd5LwX2MkLXfyKO3rHXk\r\nohPp75NkitoxvS9vqbM5ABDVmzs1Ff/F3gYH7aTUIUZL51VN41lzONm0Pq2b\r\nGnKZo+/jT5U6v0mIYUTQMUV2FhNghBD6PgaKiz6shX+IYoW8Y3eb0rqTY0T/\r\nTe3XpW9Egxxvwv9i1wqFbPHI2qX0xHmtX1K3Qwkb0ZJoQtb5e2aBb0kDTo9/\r\n8O2uDShsDq/gNTFQ7t8q+ko3BnBHJIBD4aJSpnl8ztK1i1yPktuy2umURk4r\r\nCb3mSdeyY0Waq+p+AFMle39vqnmWglOfSgT6x8+VnZxiwzMq3BTinsrO79A8\r\nfQzyDv7SeKBx3HFm18ig/+oXN4NdYjs7i/8ScJOGCSOCw6Y/WThDfVONQqO0\r\nSMSAGFNJ6fCfVnlKWjsBYM9652HdtI/F9NQ=\r\n=5+lM\r\n-----END PGP SIGNATURE-----\r\n","size":2590,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.1.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.1.2_1679670014669_0.7103867241283561"},"_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":1679670014850,"_cnpm_publish_time":1679670014850,"dist-tags":{"latest":"1.1.3"}}