{"name":"simdle-universal","version":"1.1.0","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":"2082287d7c710dd2cff34a6b51b3d1bd331851de","_id":"simdle-universal@1.1.0","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-ZH+N1FHGksLWcNgpuaVaX2pI86Zzu58Y5S1mNXd2HuMId75eRsrtpAmCG1RZJXclViUiACVsLA3LD3TQVpha5Q==","shasum":"756d4d7d5da161cfb8458733c4ffed1d7705e709","tarball":"http://registry-npm.ywwl.com/simdle-universal/download/simdle-universal-1.1.0.tgz","fileCount":12,"unpackedSize":413919,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCy6xl8dI4+N8bsw8x/TxFDAJn8XKjgqEhLLulz7IGPswIgebPx659xlG50by8f5tZr1i9HaLsU1GxPqAJf7VkVdzI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ9uJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoqtw//Tdz5p6psdKYajYKhO4dzZzg0G8M4JCDW/xvTkloZIoZ5XLp6\r\nYOBdM1QHW4sUkS5/ZXyHvCbxREqpHlvX1bT2dov0a8n1/YMeTX3sn/TIwclH\r\nE13HElwJ/avRnPIdw38/whV+9PboGSYcNR+vF6TBx+KteWRXrEP7h8tP++QE\r\nkItVJ7t9L7QXeLIy1bEiZDBThk5oLOsjmaF9lvqCBrR67F5azBfLTrbY6cDc\r\noeUOq+pe3Edl/GsTRcw5Vkvn7VIeA/hDqvOqXULvMuWaImGrpPk+zdqUOVUo\r\nO7yJnHq6KV2TBkC9LLfFVG+wGQQdrPybeKYNvzwrlu56b79npRya//DvglUH\r\n4YH4kI+vHmWH4bl08ZhWvEaVtKhwW3pNRXL9X2NbESEDjnKqjC39UpTIQN2z\r\nD4vcwyzSg9N8pFd63fOaNdB6OBPWGY3xlxe5mzXV2JFYVPyYRZjCagHfr+uR\r\nM0RxTYV8qr8mx53g5fKXWQ6AcV6/nqkvvaWqFadcusNUa5nKSyeCU43STwYm\r\ntWiThgSqLnC4k9LMD+h9bW3AysLkRB4m/2VsWsMDO6qj6d4yTbYUbLxaj2FU\r\nB5kVGe3VQBBP+Sn3So096yyW6TMGWcBGyJuYnRt3MK1pwkpciPyypt07E8EE\r\nV/422itC9ucsqkmVMDMpVDXfAV1DDJkKWzU=\r\n=uWLo\r\n-----END PGP SIGNATURE-----\r\n","size":106928,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.1.0.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.0_1665391496943_0.26066052944896856"},"_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":1665391497090,"_cnpm_publish_time":1665391497090,"dist-tags":{"latest":"1.1.3"}}