{"name":"simdle-native","version":"1.3.6","author":{"name":"Holepunch"},"license":"Apache-2.0","_id":"simdle-native@1.3.6","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"kasperisager","email":"kasperisager@hey.com"}],"homepage":"https://github.com/holepunchto/simdle-native#readme","bugs":{"url":"https://github.com/holepunchto/simdle-native/issues"},"dist":{"shasum":"59b99b0626caca24f54cbaaf3236829dfa1ce9cd","tarball":"http://registry-npm.ywwl.com/simdle-native/download/simdle-native-1.3.6.tgz","fileCount":31,"integrity":"sha512-WXb3AUnMVOgfMbrOlz0SVpL8pMpC9K2WX/wJ7k5alqza77tO/4vCF7pUtuiPJdMxEBIsX30joKRY7JWRJ4yHqQ==","signatures":[{"sig":"MEYCIQD3I7KzljHxUj4xV+NSyHvlRAhvbIgLchSZJZwskZpP4AIhAOquK4hLmgH4guQdORlWgexobl0rzP0uZn19nr1yTp/Z","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1690443,"size":447803,"noattachment":false,"key":"/simdle-native/-/simdle-native-1.3.6.tgz"},"main":"index.js","addon":true,"gitHead":"6c9132a8b9eca5f7b7be0b4f1e814fac39b49bfa","scripts":{"lint":"standard","test":"npm run lint && npm run test:bare && npm run test:node","test:bare":"bare test.mjs","test:node":"node test.mjs"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"repository":{"url":"git+https://github.com/holepunchto/simdle-native.git","type":"git"},"_npmVersion":"10.9.2","description":"libsimdle JavaScript bindings for Node.js","directories":{},"_nodeVersion":"23.7.0","dependencies":{"b4a":"^1.6.0","require-addon":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"brittle":"^3.1.0","standard":"^17.0.0","cmake-bare":"^1.1.7","cmake-napi":"^1.0.2","cmake-fetch":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/simdle-native_1.3.6_1740066510944_0.41537463430260213","host":"s3://npm-registry-packages-npm-production"},"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":1740066511198,"_cnpm_publish_time":1740066511198,"dist-tags":{"latest":"1.3.10"}}