{"name":"simdle-native","version":"1.0.3","description":"libsimdle JavaScript bindings for Node.js","main":"index.js","scripts":{"test":"standard && brittle test.mjs","prebuild":"prebuildify --napi","install":"node-gyp-build"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/simdle-native.git"},"author":{"name":"Kasper Isager Dalsgarð","email":"kasper@funktionel.co"},"license":"ISC","bugs":{"url":"https://github.com/holepunchto/simdle-native/issues"},"homepage":"https://github.com/holepunchto/simdle-native#readme","dependencies":{"b4a":"^1.6.0","napi-macros":"^2.0.0","node-gyp-build":"^4.2.3"},"devDependencies":{"brittle":"^3.1.0","prebuildify":"^5.0.1","standard":"^17.0.0"},"gitHead":"988b3eb28f79f619ab85d36ef84a1c8ea9c29c33","_id":"simdle-native@1.0.3","_nodeVersion":"18.7.0","_npmVersion":"8.16.0","dist":{"integrity":"sha512-OSrnsUxu1OoUoETb4JIpbC7IBn8y3Luvy0jmQwdD32rFDv17KYa0QEUxoltOQo2vdJBaV5QBlT0/G6LzGZImqQ==","shasum":"99878579bfcceb730a870cd990ff7a4342127e55","tarball":"http://registry-npm.ywwl.com/simdle-native/download/simdle-native-1.0.3.tgz","fileCount":29,"unpackedSize":435821,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCndV7dnO/klT/E8YroDAP5NyhYWMKelYfWnLLEozwiIwIgXwOhF3tHM3ySX+XiVcB6HL3zIwCzm27tvnmBjSRE0D4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGG9oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpehBAAobZyza4vY8i73+KM5zfqmJorQ+J9rEPyRqLCmfbCExsaMmSW\r\n5/UOc8zH+FUKd+6C67KKBN+InIGHzQZahajSn9sDD3jy2HABbcQQhdTC4zDk\r\nHKAGw3VO1lbW/GIm8U1I/SBqAVsdfszJ2XdvgiGQ5CMvNL56DOS3OrGknaFg\r\ncYkP9nqesREAF/mqEzDxETiRumh8w/CyYYtifonYFgMcBxSwdC/ZMeVirkgg\r\nhIX9UX1Bg5MIvvTPGm9rcW8N3WPSVeL2YvO6BQIsWYAEw8EOSEkSAEJMq1Ki\r\nX2vteMONFNV34yhkoFxsmr9L+Z6y2wHpBR/BmSdS6HT7L5x8Bs9I9zz4znmW\r\nPlN/kRttEC5DXp6ZTMsMou8uNc0geyypijx+6AwAXvg6qYUwl8wUxQyo+OAY\r\nfKOjhsNi1HfSHyW9A75JOAn5dsQD+ffpEoF54fJ/k3+fIx4S7UXakvdlCAoN\r\nsWFot2cqVX9gA0EjRLSU94m82xuilJvgK7iFBu6R7e+6S7H9+ACm6qIFQwbv\r\nAqW4I4NN19oaE9WZnB8Av6GGI/+54usdeIr7RIX7T42nh/Q5xXd/QlvsLIrY\r\nzcvgrdHbFqy2hUqrylhyowDRtxpAcfY2pw5ysS7hGAy/rzXF6ZbXXyY2LcMM\r\nDIYQC22yXnlGj+CP+uwIzrpTa4cHN2iCuVc=\r\n=qedh\r\n-----END PGP SIGNATURE-----\r\n","size":108057,"noattachment":false,"key":"/simdle-native/-/simdle-native-1.0.3.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"kasperisager","email":"kasperisager@hey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdle-native_1.0.3_1662545768476_0.5097674870364792"},"_hasShrinkwrap":false,"readme":"# simdle-native\n\nhttps://github.com/holepunchto/libsimdle JavaScript bindings for Node.js.\n\n```sh\nnpm install simdle-native\n```\n\n## Usage\n\n```js\nconst { cnt } = require('simdle-native')\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\nApache-2.0\n","publish_time":1662545768612,"_cnpm_publish_time":1662545768612,"dist-tags":{"latest":"1.3.10"}}