{"name":"simdle-universal","version":"1.0.3","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":"ec1752298f8c1230f1bb5f91a07e184b53df16fa","_id":"simdle-universal@1.0.3","_nodeVersion":"18.7.0","_npmVersion":"8.16.0","dist":{"integrity":"sha512-rfzfC6KjcSiYhmvgDYchvn4eH4Lc7lFnRfLQ3afIX2XWdaRkIH6kk6j9FwASTTNqepLj6h+Rlmz+TNo9Itp4fA==","shasum":"8892383e5cbdee2969d4e027ae57e1a3c9012511","tarball":"http://registry-npm.ywwl.com/simdle-universal/download/simdle-universal-1.0.3.tgz","fileCount":11,"unpackedSize":374434,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDql0jbH1cBM2hya5bB2djC2Vl1qTKhmdTrIkaQTGwR3wIgWj7WLSYoGbXOL3Myfol6Jj6vqCWdizadNvhRcxy1odk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGDu5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmplUg//S6oHQ7Mtw4phG1prNNaxEwWVqtLeiJ3SRFQJ863t4RD31wr+\r\nFjpYisbadGuCoOuchGY2Z5UbCAvJe0y+BQl/7AtRAbBmHOaqKjbzKP2eBpcM\r\nYSGVzB8C9nhqdnNGadJ9IQbn/4hQXzfXinohpX7F9zvQz/Bsot07RY14sgwI\r\ndKHygrFUJLYkYE4Gwkqc4cp+/AOVFBeCzeylBe7kUh3CEuRAq3tOYBn2w5TY\r\nGLYOmyM1QVg7zKU0ofv1IJULfh1yNhYklLoTQliONYYxPVsXOOuQBzf1bpL0\r\nwryGzcLHtgnGwa6PbcYg8dbCpJuBqlpvHA/iFBFS8MS2bxA66ml/ZgwebBSP\r\nd3AQkNq2ORz6+hNhHrECXg29UOmaPmo0EjDTKVFHJqyefjOvTEOUKQzEGgl6\r\nuButukRG/ApqCjqVxMeriimP2vkImdet9pFtgZAMvgNPJeOx2kQyqfdWz8Cp\r\nOjProNfCOBCJnfXo+fK7xghkhPm1lDMepSRY6fxeu+1L6vb02PjLEdjWaUo3\r\nnxm4aLS8gZ5eAvpI6CdP7E34pIpP235KLThHhOM6FPEEAmRU/Nl9pEFPio2f\r\noMB433eZvfNUaJdtNFzt1m2oe7nE4zzAgd7lT3XoVwiQnjkE0SVxXw0Je8RF\r\nYguXsNk/V0vRmtvEWgqbhwsy06YIvXqyZxc=\r\n=roLu\r\n-----END PGP SIGNATURE-----\r\n","size":97076,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.0.3.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.3_1662532537303_0.24431940314046718"},"_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":1662532537461,"_cnpm_publish_time":1662532537461,"dist-tags":{"latest":"1.1.3"}}