{"name":"simdle-native","version":"1.1.0","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":"2f637e88fb3eecad6d1734e8a1ffa750c20e4914","_id":"simdle-native@1.1.0","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-bZnbx2FmPHAg2CTgha3TgMvAXp5lCSGWMYVIr3phyF5+9j0Kpndl2AOK4dRD9ktdVbEpXx8AjDOAag8a7y9dbA==","shasum":"5b97ec2bc2d63652d228ec9b5a9d6e18a34afd3b","tarball":"http://registry-npm.ywwl.com/simdle-native/download/simdle-native-1.1.0.tgz","fileCount":31,"unpackedSize":437557,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD72B+Tg5IAgcR/YitZjOc+uNSi7hexTCl0UO6E0QPboQIhAInUumlzxj2np50TlD4mf7TqbMsNaMlTOfcHY8U9v6QI"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ9d7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq9/Q/9E8FXBNOZQxgqYoxRJIaf6+B+lLNd8rRJ7QvS+v9E/ZbGcmYG\r\n/j/pv/e2m/mMO4aJE+8hgibjihuIBFhpRApK6t347GtRDPZ363FYnHK4rhpM\r\nXk/qMFTxvlyoxG1J3nnxenM+CCLcKWj1sMeaMTQa9JvEs1gtW4ftuI3YK72g\r\n7SZYufJKOP8YVE9z+jCuUy/kcK/bHB0STtfuQl6WcCuL2TAMe8W/qPmExbhj\r\nZ2hDE6DcdJMahOWP3++UbTJR8+k13jnESXcSZ5lWUd8+6ihkS2mUtV9tjNqS\r\nfv+KXmCGJEzH9kqZEYHRNn/WhJpryLw5yZ2Yvz9IaPuQb46/PrcSL/W04HF0\r\nsJcPuKq3UHPtHqdrqNV8Rdz9ATC5f/VkQwX0hHcIghOr4TELN8GcuiYm+A8W\r\n5t0gkBq6csjfSEsuofMhNZLN4oGR2zxtWlWiB+ko/Hbf4B23K9CLzr3jFZNm\r\n6iQccuHbx4YgsVmxHCbRQl1PwB41/OPv/L4E8Jni0nGKPosqktGhfi/2Uqps\r\nEezfmw2mhaNw+TVwS79aFYFWUe9XDtRGs5ux7P2cXZWZ7w2bU22UO0qfLUh4\r\nlJFyQRQEukpNUigtPqB+KPKVJ+PDrb/bw0Sxu62drYOlmKx+9ifgixMJhY84\r\nK3txTMszpRZ9M7XKLPOSIwcuYirXI7bjiyU=\r\n=QMEY\r\n-----END PGP SIGNATURE-----\r\n","size":110524,"noattachment":false,"key":"/simdle-native/-/simdle-native-1.1.0.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.1.0_1665390459304_0.5756541360555378"},"_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":1665390459565,"_cnpm_publish_time":1665390459565,"dist-tags":{"latest":"1.3.10"}}