{"_id":"simdle-universal","_rev":"239324","name":"simdle-universal","description":"Universal wrapper for libsimdle with a JavaScript fallback","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"time":{"modified":"2023-03-24T16:54:10.000Z","created":"2022-09-05T07:48:52.300Z","1.1.0":"2022-10-10T08:44:57.090Z","1.0.4":"2022-09-07T10:17:36.022Z","1.0.3":"2022-09-07T06:35:37.461Z","1.0.2":"2022-09-05T18:08:40.504Z","1.0.1":"2022-09-05T08:46:33.993Z","1.0.0":"2022-09-05T07:48:52.300Z"},"users":{},"author":{"name":"Kasper Isager Dalsgarð","email":"kasper@funktionel.co"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/simdle-universal.git"},"versions":{"1.1.0":{"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":{"shasum":"756d4d7d5da161cfb8458733c4ffed1d7705e709","size":106928,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/simdle-universal/download/simdle-universal-1.1.0.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdle-universal_1.1.0_1665391496943_0.26066052944896856"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-10-10T08:45:20.678Z","publish_time":1665391497090,"_cnpm_publish_time":1665391497090},"1.0.4":{"name":"simdle-universal","version":"1.0.4","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":"e12c175f329eda7d96419916fddafb4308d287d1","_id":"simdle-universal@1.0.4","_nodeVersion":"18.7.0","_npmVersion":"8.16.0","dist":{"shasum":"acb1f953e4f4b881d8b1edd5f1078705965d4c99","size":104698,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.0.4.tgz","tarball":"http://name.csiicloud.com:7001/simdle-universal/download/simdle-universal-1.0.4.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdle-universal_1.0.4_1662545855809_0.30961055822327666"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-07T11:15:50.424Z","publish_time":1662545856022,"_cnpm_publish_time":1662545856022},"1.0.3":{"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":{"shasum":"8892383e5cbdee2969d4e027ae57e1a3c9012511","size":97076,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.0.3.tgz","tarball":"http://name.csiicloud.com:7001/simdle-universal/download/simdle-universal-1.0.3.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdle-universal_1.0.3_1662532537303_0.24431940314046718"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-07T06:38:58.572Z","publish_time":1662532537461,"_cnpm_publish_time":1662532537461},"1.0.2":{"name":"simdle-universal","version":"1.0.2","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":"944df98f9b267ff780d4deaf2bf6d0012640a018","_id":"simdle-universal@1.0.2","_nodeVersion":"18.7.0","_npmVersion":"8.16.0","dist":{"shasum":"caeed40aab4d923c4339cd733c804b3994fd0ece","size":97072,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.0.2.tgz","tarball":"http://name.csiicloud.com:7001/simdle-universal/download/simdle-universal-1.0.2.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdle-universal_1.0.2_1662401320324_0.34737349982886156"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-05T18:12:17.685Z","publish_time":1662401320504,"_cnpm_publish_time":1662401320504},"1.0.1":{"name":"simdle-universal","version":"1.0.1","description":"Universal wrapper for libsimdle with a JavaScript fallback","main":"index.js","browser":{"./index.js":"./browser.js"},"scripts":{"test":"standard && brittle test.mjs"},"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"},"devDependencies":{"brittle":"^3.1.0","standard":"^17.0.0"},"gitHead":"35dfe7d725b4eff3b9d1b3af6c00e0bd8a5b1af6","_id":"simdle-universal@1.0.1","_nodeVersion":"18.7.0","_npmVersion":"8.16.0","dist":{"shasum":"bccdc36013f977684ccb9054971afd01d5e0e3d7","size":2461,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/simdle-universal/download/simdle-universal-1.0.1.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdle-universal_1.0.1_1662367593816_0.12367497056488652"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-05T08:50:37.071Z","publish_time":1662367593993,"_cnpm_publish_time":1662367593993},"1.0.0":{"name":"simdle-universal","version":"1.0.0","description":"Universal wrapper for libsimdle with a JavaScript fallback","main":"index.js","browser":{"./index.js":"./browser.js"},"scripts":{"test":"standard && brittle test.mjs"},"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","simdle-native":"^1.0.0"},"devDependencies":{"brittle":"^3.1.0","standard":"^17.0.0"},"gitHead":"28edb0d3d56f4b9835a94e98a50959c4264a7735","_id":"simdle-universal@1.0.0","_nodeVersion":"18.7.0","_npmVersion":"8.16.0","dist":{"shasum":"eb427b49f16987ec270cacc6719997259a54facb","size":2461,"noattachment":false,"key":"/simdle-universal/-/simdle-universal-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/simdle-universal/download/simdle-universal-1.0.0.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"kasperisager","email":""},{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdle-universal_1.0.0_1662364132163_0.5701229537208363"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-05T08:03:42.108Z","publish_time":1662364132300,"_cnpm_publish_time":1662364132300}},"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","_attachments":{},"homepage":"https://github.com/holepunchto/simdle-universal#readme","bugs":{"url":"https://github.com/holepunchto/simdle-universal/issues"},"license":"ISC"}