Compare commits

..

268 Commits

Author SHA1 Message Date
lemire c3657b03ef deploy: 1bcf71bd85 2026-05-06 21:54:39 +00:00
lemire 7541f9d83d deploy: 65e59ccf9b 2026-04-20 22:10:43 +00:00
lemire b8f39b3280 deploy: 61641f9a7a 2026-04-17 23:02:14 +00:00
lemire 49dce840cd deploy: fb83b114ef 2026-04-03 22:51:54 +00:00
lemire d13f56e269 deploy: f25d5f9fc2 2026-03-31 00:23:31 +00:00
lemire 11d8f1bba6 deploy: 18d612df15 2026-03-25 23:58:21 +00:00
lemire 7ca4ea10af deploy: b4a0fd3ff4 2026-03-20 17:22:20 +00:00
lemire 362c247e41 deploy: 5395aacb8b 2026-03-17 19:24:59 +00:00
lemire e7611de5c5 deploy: be94694290 2026-03-13 02:25:13 +00:00
lemire 10c503a942 deploy: e829566589 2026-02-20 23:58:57 +00:00
lemire 429c32383c deploy: 06c774c655 2026-02-19 05:32:42 +00:00
lemire 8dac8f5faa deploy: 980f2ad3af 2025-12-18 02:41:28 +00:00
lemire 18f2907805 deploy: 5d16fd5f31 2025-12-12 23:59:56 +00:00
lemire 52d69fa598 deploy: b1c31b428d 2025-11-11 21:18:02 +00:00
lemire d503c53850 deploy: 235dbc5369 2025-11-03 17:19:41 +00:00
lemire f99478c419 deploy: 3d87bd4abc 2025-11-02 21:44:45 +00:00
lemire ed76cedc16 deploy: 0112be86b0 2025-10-28 04:44:57 +00:00
lemire 0836b6a15d deploy: 3ac287ba3d 2025-10-18 00:41:45 +00:00
lemire af1bb1f005 deploy: e6578fea39 2024-12-07 17:00:00 +00:00
lemire 29b925aae3 deploy: 6fb050d04e 2024-12-07 16:35:53 +00:00
lemire 49a285f3e2 deploy: b4242d3b4f 2024-12-06 03:19:07 +00:00
lemire 0a4fc4420b deploy: 79126ca323 2024-12-03 01:42:03 +00:00
lemire 1f0cfbc48d deploy: 3f87f958d7 2024-12-02 05:15:30 +00:00
lemire 1848c80d24 deploy: 9b314922a1 2024-11-08 17:10:27 +00:00
lemire 06e0a17552 deploy: 587beae307 2024-11-01 22:24:27 +00:00
lemire 80a54f5407 deploy: f53981d945 2024-11-01 16:49:33 +00:00
lemire ead812af6f deploy: 41b4ffd6aa 2024-11-01 16:33:37 +00:00
lemire 7b7a3e0166 deploy: 6cd8a6d776 2024-10-30 02:00:46 +00:00
lemire 9842b613fa deploy: 3c0d032ded 2024-10-19 01:16:41 +00:00
lemire 5adb736e6b deploy: 36f5dbcb75 2024-10-11 18:12:44 +00:00
lemire 88ed6bbe72 deploy: 49901fb254 2024-10-11 01:59:42 +00:00
lemire 74ebc7dd1e deploy: c066b5421b 2024-10-08 15:47:40 +00:00
lemire ba9c6c4f34 deploy: ec7550a70e 2024-10-08 15:09:38 +00:00
lemire 4ad0184c3a deploy: 3ef3078e51 2024-09-21 14:40:19 +00:00
lemire 0ea5d07648 deploy: fd06782c97 2024-09-21 02:18:13 +00:00
lemire af4b051583 deploy: 9303efbd0c 2024-09-21 01:55:55 +00:00
lemire f2655f2c53 deploy: 09ccabbe6c 2024-09-20 16:38:36 +00:00
lemire fa4a94927e deploy: e00cc8c6dc 2024-09-18 13:43:43 +00:00
lemire 623a7834bc deploy: 025a44348a 2024-09-17 02:15:46 +00:00
lemire 2e25ceb041 deploy: 70a68da941 2024-09-06 05:35:30 +00:00
lemire fa84ed1d35 deploy: e341c8b438 2024-08-26 14:56:48 +00:00
jkeiser 0dcb5ba9bf deploy: 615218a3ad 2024-08-19 05:19:26 +00:00
lemire 198bc47f15 deploy: 7a9ff93388 2024-08-15 17:14:03 +00:00
lemire 62227165b0 deploy: fc61d7c7ba 2024-08-10 14:19:04 +00:00
lemire 8233e51f3e deploy: d506af0a79 2024-08-08 00:25:14 +00:00
lemire c2303555b7 deploy: 9b67497ed0 2024-08-01 13:55:04 +00:00
lemire 5b460b8b37 deploy: 0336684df7 2024-07-31 15:30:40 +00:00
lemire f9d0886b94 deploy: c19320dd6e 2024-07-31 14:52:31 +00:00
lemire 6f73869377 deploy: 412a5680e8 2024-07-31 14:34:20 +00:00
lemire bb717359a1 deploy: a05a56856d 2024-07-29 20:14:12 +00:00
lemire 01e8c3e066 deploy: 58173a6a1f 2024-07-26 02:47:57 +00:00
FranciscoThiesen bb71012ca3 deploy: 1721032cfd 2024-07-26 00:50:20 +00:00
lemire 12cb8b62de deploy: acdbbab916 2024-07-16 19:59:31 +00:00
lemire bdcf292027 deploy: 5090247c34 2024-07-13 15:56:36 +00:00
lemire 97a9c69081 deploy: 4180e05730 2024-07-11 12:28:50 +00:00
lemire 0242afa012 deploy: feea2bce2c 2024-07-04 22:09:22 +00:00
lemire da522e4e0e deploy: 3240d55bcc 2024-07-04 21:08:13 +00:00
lemire df2f3f4cd8 deploy: 66fd28fc00 2024-07-04 20:41:33 +00:00
lemire 7d54cc63f7 deploy: 5f638951c6 2024-06-27 19:06:38 +00:00
lemire 32d8dd0673 deploy: 3e94eea939 2024-06-27 17:40:27 +00:00
lemire 8aa008ec57 deploy: 0e8311f812 2024-06-25 22:22:21 +00:00
lemire 1af8b800a4 deploy: 3620e9d151 2024-06-11 19:53:52 +00:00
lemire 0f3f0b276a deploy: 2a4ff73468 2024-06-10 14:42:59 +00:00
lemire 1d3eca61d7 deploy: 77fc2b8447 2024-06-08 02:21:44 +00:00
lemire c773295a9e deploy: ba8b66a633 2024-06-07 16:58:38 +00:00
lemire 243914e0c9 deploy: 66eec5feaf 2024-06-05 13:09:46 +00:00
lemire 94ee98098f deploy: 3964f3e5d2 2024-06-03 18:23:12 +00:00
lemire 1134b7de0c deploy: ee8515122d 2024-05-30 15:43:53 +00:00
lemire 7b4b67f8a4 deploy: 5d35e7ca1f 2024-05-30 15:24:48 +00:00
lemire 6350c77d6b deploy: deefc88b9c 2024-05-30 15:08:25 +00:00
lemire 5663b1d362 deploy: d2954ef68b 2024-05-23 21:12:31 +00:00
lemire 61ed8a2a56 deploy: ac719827ff 2024-05-12 01:10:21 +00:00
lemire fe941d3406 deploy: 6ea77392a7 2024-05-10 16:35:48 +00:00
lemire 7411ad7f3a deploy: e2f879751c 2024-05-10 04:42:17 +00:00
lemire e1bce6549c deploy: bf7834179c 2024-05-07 23:29:00 +00:00
lemire edd9433168 deploy: 69ab8848bf 2024-05-07 22:18:35 +00:00
lemire c9af046526 deploy: 7288323e36 2024-05-07 01:24:48 +00:00
lemire b465758e5d deploy: 52406402ed 2024-05-01 19:08:15 +00:00
lemire 5a9cff1474 deploy: 799d8e3fc9 2024-04-26 18:23:55 +00:00
lemire 4fa5c21397 deploy: 8519e24f12 2024-04-24 06:14:29 +00:00
lemire b3e6c90680 deploy: fffb62743c 2024-04-24 04:19:22 +00:00
lemire f7e23c248c deploy: c888075f8d 2024-04-24 04:01:47 +00:00
lemire c743bc98de deploy: 40b414d184 2024-04-09 19:12:03 +00:00
lemire fff05b87fc deploy: c85e8a7db1 2024-04-09 00:40:43 +00:00
lemire f5b8726f2b deploy: 3f89cb14ddd64d3eaa0c945a56cf80a2ddd251ee 2024-04-08 16:51:39 +00:00
lemire 128e266f5c deploy: c85e8a7db1 2024-04-05 19:54:15 +00:00
lemire e8002bd63e deploy: 83f390f8e7 2024-04-05 19:36:17 +00:00
lemire fe19693d77 deploy: 82563dcf70 2024-04-04 18:24:50 +00:00
lemire 742357c920 deploy: 646bd3f2c3 2024-04-04 16:41:44 +00:00
lemire 8596f838d3 deploy: 4c98e51c53 2024-04-04 16:21:20 +00:00
lemire 52164f6821 deploy: 58e3d5d9cc 2024-04-04 03:09:09 +00:00
lemire a05ec3877c deploy: a22a92dc72 2024-04-03 20:07:03 +00:00
lemire 7fba456f10 deploy: 5997f82c37 2024-03-20 18:36:14 +00:00
lemire dede978b9c deploy: bee410b315 2024-03-20 06:07:02 +00:00
lemire 175ba79e9f deploy: b115e3ef61 2024-03-17 16:31:59 +00:00
lemire c0de0c7733 deploy: 669229df5d 2024-03-17 15:01:53 +00:00
lemire b08e8615a6 deploy: b6a2286e62 2024-03-17 14:46:02 +00:00
lemire 155c12da19 deploy: 3a97c57773 2024-03-17 14:18:13 +00:00
lemire 508d6edb97 deploy: e1c6a778f8 2024-03-10 18:16:42 +00:00
lemire 6ab56a160a deploy: d413dd5b0e 2024-03-10 17:54:47 +00:00
lemire 91f97711df deploy: a33fdc2770 2024-03-10 17:34:36 +00:00
lemire 896f85e2fd deploy: 87f5f7a250 2024-03-10 00:51:30 +00:00
lemire 4645838a3b deploy: 876be23545 2024-03-06 20:57:51 +00:00
lemire fbbf7175f2 deploy: 2028bdaeac 2024-02-27 01:54:53 +00:00
lemire 75696fd1d7 deploy: 1ac3a00ca9 2024-02-27 01:41:40 +00:00
lemire ef54311a83 deploy: 61a52287fc 2024-02-27 01:06:46 +00:00
lemire 427437a493 deploy: 78325888ea 2024-02-26 19:28:36 +00:00
lemire 017ef4100f deploy: a90cb5d900 2024-02-26 19:12:01 +00:00
lemire 041f2667b4 deploy: 34a01ec3af 2024-02-24 00:37:25 +00:00
lemire 7bf8ce27d6 deploy: e510ed2774 2024-02-23 22:10:36 +00:00
lemire d7e96a1f4e deploy: dabac13dde 2024-02-18 17:01:56 +00:00
lemire 62d65f35d0 deploy: aef7111c05 2024-02-16 01:42:30 +00:00
lemire 4edaaadf25 deploy: 2fe3a1467d 2024-02-15 15:54:07 +00:00
lemire 1f09538014 deploy: 167a46a0e7 2024-02-15 15:21:39 +00:00
lemire fef2904e16 deploy: 2b532489cc 2024-02-15 15:04:10 +00:00
lemire 86256211f2 deploy: 85163df88c 2024-02-15 04:48:51 +00:00
lemire 1d481f0625 deploy: 6a5be0f0db 2024-02-09 22:29:21 +00:00
lemire a07eb55a4c deploy: 710a3c7241 2024-02-09 17:29:41 +00:00
lemire 1b69f27dfb deploy: c93e02e172 2024-02-09 17:10:30 +00:00
lemire 70fdcd94a8 deploy: 517143aec4 2024-02-09 16:52:47 +00:00
lemire 41ee0843bc deploy: 9feda5e703 2024-02-09 16:14:24 +00:00
lemire a6e23b0542 deploy: cda198b7b9 2024-02-09 15:57:40 +00:00
lemire 795befd537 deploy: aad17a6a8d 2024-02-09 15:27:36 +00:00
lemire f43801bd88 deploy: 32d072a208 2024-02-08 16:51:58 +00:00
lemire 928cdd734c deploy: 5eab555053 2024-02-06 18:56:05 +00:00
lemire 3a1e160276 deploy: 6430fbd39a 2024-02-06 18:35:05 +00:00
lemire 2ce761092e deploy: 4d2fc31b27 2024-02-06 00:41:57 +00:00
lemire 92c688adce deploy: 33610b59eb 2024-02-05 23:40:41 +00:00
lemire 531b9b3baf deploy: 23290ae48d 2024-02-05 03:30:32 +00:00
lemire 613858dd1f deploy: eb3a085e0f 2024-02-05 03:12:43 +00:00
lemire 628be854d4 deploy: 88bf5cb6d9 2024-01-29 15:59:02 +00:00
lemire 7bafb29f50 deploy: 9b0435d864 2024-01-28 17:57:02 +00:00
lemire faa2e3501e deploy: 02bee7d1b9 2024-01-09 02:21:01 +00:00
lemire 029cfcbecb deploy: 6ef555e6fb 2024-01-08 20:07:03 +00:00
lemire 7fa6e86ca0 deploy: 185ff4e8fe 2023-12-29 15:00:45 +00:00
lemire c44fa06ed2 deploy: 2fa729922e 2023-12-19 17:30:26 +00:00
lemire 1998b60206 deploy: ebd09cb2a3 2023-12-15 13:44:30 +00:00
lemire 588e22e4cb deploy: edc36a87ab 2023-12-10 04:35:29 +00:00
lemire e132ebcfae deploy: 6060be2fdf 2023-12-08 17:21:07 +00:00
lemire 536d91a19b deploy: 3251f61c9d 2023-12-07 17:55:35 +00:00
lemire 44ede6a37b deploy: 561ffcd519 2023-12-04 15:49:30 +00:00
lemire e2630d1fa0 deploy: 5541e78402 2023-12-01 20:18:10 +00:00
lemire c5d8b0f036 deploy: 9a9ed0e2da 2023-12-01 19:40:51 +00:00
lemire d66f574e6a deploy: bca8d3e277 2023-11-30 23:41:28 +00:00
lemire 9acb47b318 deploy: 97196fa969 2023-11-30 23:22:02 +00:00
jkeiser dc3e0d30ac deploy: 23fab307ca 2023-11-30 19:20:55 +00:00
lemire 5cab7cc118 deploy: b88f831dbd 2023-11-30 17:18:45 +00:00
lemire 5d84ec4e47 deploy: 71a73c2c47 2023-11-30 17:05:51 +00:00
lemire bb78bcab58 deploy: 07603aa7f7 2023-11-30 00:12:36 +00:00
lemire df392275ff deploy: f52533538a 2023-11-29 05:03:24 +00:00
lemire 4d73942b2b deploy: 3bb2f0a186 2023-11-26 19:25:39 +00:00
lemire afc63538d2 deploy: 0173eaaad7 2023-11-20 15:13:03 +00:00
lemire 4d13f4b18d deploy: 5459dbd6c6 2023-11-14 03:04:08 +00:00
lemire 8233a48b85 deploy: 9c45f1f292 2023-11-11 09:24:20 +00:00
lemire 6f474aa902 deploy: 17cb457ffd 2023-10-30 17:45:23 +00:00
lemire af32ae2aa9 deploy: 8b2af0473a 2023-10-30 17:12:53 +00:00
lemire 315a29a62f deploy: 29fbbee852 2023-10-28 02:31:19 +00:00
lemire e4feafb624 deploy: baa7d961ce 2023-10-28 02:04:20 +00:00
anonrig 6c06b76b4b deploy: 6412b27c7e 2023-10-28 00:14:30 +00:00
lemire 4012596729 deploy: 9dd6e9c959 2023-10-26 02:40:50 +00:00
lemire 68eb8a36c0 deploy: 6db330c1a2 2023-10-26 02:11:05 +00:00
lemire 5ad72578ef deploy: 993ac4b87c 2023-10-26 00:05:09 +00:00
lemire 82311cc00e deploy: 35e87896f0 2023-10-25 15:09:15 +00:00
lemire b8d344d4b0 deploy: f7e281cadc 2023-10-20 20:24:41 +00:00
lemire 08168fb60c deploy: 13405afd4b 2023-10-20 20:01:46 +00:00
lemire 9b47c75a5a deploy: e11ad58aad 2023-10-09 19:48:46 +00:00
lemire 5305f7e7a3 deploy: 1875ed6550 2023-09-20 15:16:39 +00:00
lemire 0950864667 deploy: 80d26298a0 2023-09-20 14:58:47 +00:00
lemire 13e59e29af deploy: ff77ac801e 2023-09-11 15:11:23 +00:00
lemire cf2fc7dbc3 deploy: e0699994ef 2023-09-09 17:44:50 +00:00
lemire 5cb337b29d deploy: 68ba9a1b2a 2023-08-31 01:16:27 +00:00
lemire 7700caaecd deploy: cc24bb4114 2023-08-29 23:58:27 +00:00
jkeiser 7c0a1dc8c3 deploy: 14ec0ca8f4 2023-08-29 23:06:08 +00:00
lemire 0a371008e1 deploy: f7922075c3 2023-08-25 15:49:03 +00:00
lemire 2d9af0f20a deploy: bf849e3619 2023-08-22 18:25:24 +00:00
lemire 9ea818b600 deploy: c09e8dc225 2023-08-18 19:43:50 +00:00
lemire c18a95994c deploy: 5bf585ef02 2023-08-18 18:50:57 +00:00
lemire 8cbab04bd7 deploy: caff09cafc 2023-08-14 16:33:16 +00:00
lemire 42907ec3f4 deploy: f043db4dca 2023-08-02 20:43:36 +00:00
lemire 9f308dbe33 deploy: e3bd0828d1 2023-08-02 20:17:56 +00:00
jkeiser 723f3d5c64 deploy: 9408298e0e 2023-08-02 18:34:33 +00:00
lemire f490716868 deploy: 6e7d415040 2023-08-02 00:50:08 +00:00
jkeiser 816d978e84 deploy: 2ccd5b9c97 2023-07-21 19:24:41 +00:00
lemire 50b78d2d0e deploy: 1cdcbf79b3 2023-07-21 18:38:02 +00:00
lemire b7fd59e5f4 deploy: 7013ed98cc 2023-07-21 18:11:36 +00:00
jkeiser ae9a4504e6 deploy: 4dec6ed5a7 2023-07-18 17:43:11 +00:00
jkeiser d952c6e639 deploy: 1dfd48195d 2023-07-18 06:54:40 +00:00
jkeiser 327ea2d014 deploy: 1e97af7dfb 2023-07-17 22:16:34 +00:00
jkeiser e404a11496 deploy: a74e87df17 2023-07-17 20:47:40 +00:00
jkeiser e64a194382 deploy: 3274299647 2023-07-17 20:19:48 +00:00
lemire 1ef0a4d718 deploy: c5c43e9c7f 2023-07-07 02:49:13 +00:00
lemire d6b58c8de2 deploy: 031ee32969 2023-07-07 02:21:56 +00:00
jkeiser 9d77f4e70b deploy: b613326d69 2023-07-06 19:57:57 +00:00
lemire e2b8f41e10 deploy: d2f8e84fc1 2023-06-26 13:28:27 +00:00
lemire e6cabf3557 deploy: 08000518cb 2023-06-26 12:58:44 +00:00
lemire 7fde3b7e67 deploy: 90040d96a5 2023-06-23 01:56:36 +00:00
lemire ce87836f99 deploy: 92174c927d 2023-06-15 14:27:45 +00:00
lemire 813d27c260 deploy: b399c0165e 2023-06-15 13:56:41 +00:00
lemire 79e5417456 deploy: 445ae024ba 2023-06-15 13:31:52 +00:00
lemire d209d5c461 deploy: 74bb7b2533 2023-06-05 13:32:03 +00:00
lemire 98acce23fa deploy: fd97288561 2023-06-03 01:15:21 +00:00
lemire 8b410f0172 deploy: 1da0d8ac65 2023-06-03 00:51:41 +00:00
lemire 9953d383de deploy: 85661a2901 2023-06-01 20:36:33 +00:00
lemire bd9c79eba6 deploy: 3fcdb65d88 2023-05-26 14:32:35 +00:00
lemire 5c6b91e492 deploy: 8b00d91a2c 2023-05-26 14:02:35 +00:00
lemire 7364dc2244 deploy: 7db3f97ba8 2023-05-26 13:38:00 +00:00
lemire d7ea1da240 deploy: 412a8f7c4d 2023-05-23 21:56:17 +00:00
lemire 5eea3538e4 deploy: 6d92563280 2023-05-23 17:45:25 +00:00
lemire 7d0c1205ff deploy: 0998233d58 2023-05-23 17:44:42 +00:00
lemire b62957b674 deploy: cb735818ec 2023-05-23 17:01:25 +00:00
lemire 439be32213 deploy: 41ee548e3f 2023-05-23 16:54:56 +00:00
lemire bbce7456e9 deploy: e9d5d5088a 2023-05-22 21:54:13 +00:00
lemire 071bee4c7a deploy: 0a951c53155f1620f69edffb37406d0a6842df9a 2023-05-22 21:33:41 +00:00
lemire 0df524fc69 deploy: e9d5d5088a 2023-05-22 17:57:44 +00:00
lemire fec6fdd62d deploy: 083a5d7351 2023-05-15 19:14:42 +00:00
lemire 1d7cec0cb5 deploy: 25fcc8b432 2023-05-14 21:52:36 +00:00
lemire 99ba4734aa deploy: a9c120f779 2023-05-14 21:31:48 +00:00
lemire 488f896581 deploy: 2a68a32012 2023-05-12 23:34:51 +00:00
lemire ecfe49de3a deploy: 21a2ccaeb8 2023-05-06 03:31:32 +00:00
lemire af3bcd560d deploy: 6cbb6ac89b 2023-05-06 01:53:34 +00:00
lemire 092c08e6c3 deploy: e9f0f1bb9b 2023-04-29 01:41:38 +00:00
lemire d54e315199 deploy: 7ef1ebd4fb 2023-04-28 14:05:59 +00:00
lemire 6b96b24044 deploy: ebc51fbd1a 2023-04-24 12:15:47 +00:00
lemire 17f5a8322d deploy: f77ac963f4 2023-04-23 16:02:43 +00:00
lemire 8b7630ce57 deploy: ae3d912f8d 2023-04-23 14:59:10 +00:00
lemire d021a0e188 deploy: f435fddda1 2023-04-11 18:09:22 +00:00
lemire eae45df437 deploy: 14d927128b 2023-04-08 20:41:29 +00:00
lemire 20a2867164 deploy: 48152a0326 2023-04-08 20:21:09 +00:00
lemire bf209fae7c deploy: b5cf53232c 2023-04-06 15:03:15 +00:00
lemire f113339fae deploy: b3d0b732e6 2023-04-04 18:32:43 +00:00
lemire 29e0a19beb deploy: 3c29f40f2f 2023-04-04 15:43:46 +00:00
lemire a9924519e9 deploy: 4a89d79984 2023-04-01 22:50:47 +00:00
lemire 75785727c9 deploy: 4699dd0ce2 2023-03-30 15:20:27 +00:00
lemire 6bfb71e2d8 deploy: cfd337bb50 2023-03-30 15:00:46 +00:00
lemire c4f3780d64 deploy: 59025bc8b1 2023-03-24 17:32:56 +00:00
lemire 6fcf305a24 deploy: 830323f383 2023-03-22 13:30:13 +00:00
lemire 7de5b30588 deploy: 3571f3a8d0 2023-03-18 20:51:17 +00:00
lemire 6b54e34da8 deploy: 4b13020d65 2023-03-14 02:05:23 +00:00
lemire 801c02dbe0 deploy: 75c6c950e5 2023-03-14 01:44:00 +00:00
lemire 2d475d9604 deploy: 5ad7698af1 2023-03-13 21:34:40 +00:00
lemire cbe0215457 deploy: 3f3f6cde7c 2023-03-13 20:09:50 +00:00
lemire 153ecb1069 deploy: 338224849d 2023-03-13 19:27:57 +00:00
lemire b6accae72b deploy: ada52641b4 2023-03-13 19:12:11 +00:00
lemire 79ecbd2436 deploy: 7bf33f6c8a 2023-03-13 17:38:56 +00:00
lemire 4b24e53fea deploy: 34dcd33a88 2023-03-09 17:11:36 +00:00
lemire a6b74064a4 deploy: 77ad00b63c 2023-03-09 16:23:18 +00:00
lemire 229eb30fba deploy: 25e7f1765a 2023-03-09 15:54:32 +00:00
lemire 20a8721b99 deploy: 8d01255ceb 2023-03-09 13:39:50 +00:00
lemire 51f8a13d9e deploy: 8ec016b093 2023-03-08 21:21:04 +00:00
lemire f5b4be610e deploy: 9e726b9856 2023-03-08 20:02:28 +00:00
lemire cbd6b74c96 deploy: ba50571d66 2023-03-06 21:15:44 +00:00
lemire 7b462aa855 deploy: 6e4c29b7c5 2023-03-04 22:59:35 +00:00
lemire 2f1506d7db deploy: ec0b48b772 2023-03-02 19:38:52 +00:00
lemire a84d0d02ed deploy: d65acbd47b 2023-03-02 14:51:29 +00:00
lemire 47b9cbc71c deploy: 75240ad8e1 2023-03-02 00:31:23 +00:00
lemire ca86fd800e deploy: 3efb44dc0f 2023-03-02 00:15:42 +00:00
lemire 601ae9d6e1 deploy: 12a1b6db53 2023-03-01 05:22:22 +00:00
lemire 9fcd9fc871 deploy: 37e87f6f99 2023-03-01 05:05:06 +00:00
lemire 2018fd44fc deploy: cd13b02bf0 2023-02-28 14:59:45 +00:00
lemire 7e8d259d8c deploy: 624174d916 2023-02-23 02:35:31 +00:00
lemire f9ac7e853d deploy: 8a247f1321 2023-02-23 02:04:06 +00:00
lemire 7cd2b81820 deploy: 7aa35bffd3 2023-02-23 01:45:25 +00:00
lemire 1fbdc3be38 deploy: d6c910686b 2023-02-14 02:24:38 +00:00
lemire 7f9812886c deploy: 3177cd1b5d 2023-02-07 00:27:18 +00:00
lemire c8359364f4 deploy: 63d9ce3c58 2023-02-07 00:07:52 +00:00
lemire 168726fd4a deploy: 8e8180560d 2023-02-06 23:56:24 +00:00
lemire 48fd1f7cab deploy: 68be9c2170 2023-01-30 21:35:35 +00:00
lemire 7ddd4d2021 deploy: 269ae7ad6b 2023-01-30 19:42:55 +00:00
1449 changed files with 140099 additions and 440155 deletions
-56
View File
@@ -1,56 +0,0 @@
version: '{build}'
branches: { only: [ master ] }
configuration: Release
image: Visual Studio 2019
platform: x64
cache:
- C:\dependencies -> dependencies\CMakeLists.txt
environment:
# Forward slash is used because this is used in CMake as is
simdjson_DEPENDENCY_CACHE_DIR: C:/dependencies
matrix:
- job_name: VS2019
CMAKE_ARGS: -A %Platform%
- job_name: VS2019ARM
CMAKE_ARGS: -A ARM64 -DSIMDJSON_DEVELOPER_MODE=ON -DCMAKE_CROSSCOMPILING=1 -D SIMDJSON_GOOGLE_BENCHMARKS=OFF # Does Google Benchmark builds under VS ARM?
- job_name: VS2017 (Static, No Threads)
image: Visual Studio 2017
CMAKE_ARGS: -A %Platform% -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF -DSIMDJSON_ENABLE_THREADS=OFF
CTEST_ARGS: -LE explicitonly
- job_name: VS2019 (Win32)
platform: Win32
CMAKE_ARGS: -A %Platform% -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=ON -DSIMDJSON_ENABLE_THREADS=ON # This should be the default. Testing anyway.
CTEST_ARGS: -LE explicitonly
- job_name: VS2019 (Win32, No Exceptions)
platform: Win32
CMAKE_ARGS: -A %Platform% -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=ON -DSIMDJSON_ENABLE_THREADS=ON -DSIMDJSON_EXCEPTIONS=OFF
CTEST_ARGS: -LE explicitonly
- job_name: VS2015
image: Visual Studio 2015
CMAKE_ARGS: -A %Platform% -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF -DSIMDJSON_ENABLE_THREADS=OFF
CTEST_ARGS: -LE explicitonly
build_script:
- mkdir build
- cd build
- cmake --version
- cmake %CMAKE_ARGS% ..
- cmake -LH ..
- cmake --build . --config %Configuration% --verbose --parallel
for:
-
matrix:
except:
- job_name: VS2019ARM
test_script:
- ctest --output-on-failure -C %Configuration% --verbose %CTEST_ARGS% --parallel
clone_folder: c:\projects\simdjson
matrix:
fast_finish: true
-26
View File
@@ -1,26 +0,0 @@
task:
timeout_in: 120m
freebsd_instance:
matrix:
- image_family: freebsd-13-0-snap
env:
ASSUME_ALWAYS_YES: YES
simdjson_DEPENDENCY_CACHE_DIR: $HOME/.dep_cache
dep_cache:
folder: $HOME/.dep_cache
reupload_on_changes: false
fingerprint_script: cat dependencies/CMakeLists.txt
setup_script:
- pkg update -f
- pkg install bash
- pkg install cmake
- pkg install git
build_script:
- mkdir build
- cd build
- cmake -DSIMDJSON_BASH=OFF -DSIMDJSON_GIT=OFF ..
- make
test_script:
- cd build
- ctest --output-on-failure -LE explicitonly
-1
View File
@@ -1 +0,0 @@
BasedOnStyle: LLVM
-47
View File
@@ -1,47 +0,0 @@
CompileFlags:
CompilationDatabase: build
Add:
- -Werror -Wall -Wextra -Weffc++ -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion
- -Wundefined-inline
Diagnostics:
Suppress:
- misc-unused-alias-decls
- misc-unused-using-decls
- misc-definitions-in-headers # TODO fix and remove these violations
---
If:
PathMatch:
- include/.*
- src/.*
PathExclude:
- include/simdjson.h
- src/simdjson.cpp
CompileFlags:
Add:
- -Wno-unneeded-internal-declaration
- -Wno-undefined-internal # TODO fix and remove these violations
- -Wno-unused-function
- -Wno-unused-const-variable
Diagnostics:
Suppress:
- pp_including_mainfile_in_preamble
- unused-includes
---
# Amalgamated files that require or partly define an implementation
If:
PathMatch:
- .*/(arm64|fallback|haswell|icelake|ppc64|westmere)/begin.h
- .*/generic/.*
Diagnostics:
Suppress:
- pragma_attribute_no_pop_eof
---
# clang has a bad time detecting the push/pop together in src/ for some reason
If:
PathMatch:
- include/simdjson/.*/end.h
- src/(arm64|fallback|haswell|icelake|ppc64|westmere).cpp
Diagnostics:
Suppress:
- pragma_attribute_no_pop_eof
- pragma_attribute_stack_mismatch
-15
View File
@@ -1,15 +0,0 @@
*
!.git
!Makefile
!amalgamate.py
!benchmark
!dependencies
!include
!jsonchecker
!jsonexamples
!scripts
!singleheader
!src
!style
!tests
!tools
-424
View File
@@ -1,424 +0,0 @@
kind: pipeline
name: gcc9
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: gcc:9
environment:
CC: gcc
CXX: g++
BUILD_FLAGS: -- -j
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=OFF -DSIMDJSON_IMPLEMENTATION=icelake;haswell;westmere;fallback
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
- apt-get update -qq
- apt-get -t buster-backports install -y cmake
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS -L acceptance -LE per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=icelake ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=haswell ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=westmere ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=fallback ctest $CTEST_FLAGS -L per_implementation
- ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
---
kind: pipeline
name: clang6
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: conanio/clang60
user: root
environment:
CC: clang-6.0
CXX: clang++-6.0
BUILD_FLAGS: -- -j
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=OFF -DSIMDJSON_IMPLEMENTATION=icelake;haswell;westmere;fallback
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS -L acceptance -LE per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=icelake ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=haswell ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=westmere ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=fallback ctest $CTEST_FLAGS -L per_implementation
- ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
---
kind: pipeline
name: dynamic-gcc9
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: gcc:9
environment:
CC: gcc
CXX: g++
BUILD_FLAGS: -- -j
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
- apt-get update -qq
- apt-get -t buster-backports install -y cmake
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS
---
kind: pipeline
name: dynamic-clang9
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: conanio/clang9
user: root
environment:
CC: clang-9
CXX: clang++-9
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON
BUILD_FLAGS: -- -j
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS
---
kind: pipeline
name: sanitize-gcc9
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: gcc:9
environment:
CC: gcc
CXX: g++
BUILD_FLAGS: -- -j
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=OFF -DSIMDJSON_IMPLEMENTATION=icelake;haswell;westmere;fallback
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
- apt-get update -qq
- apt-get -t buster-backports install -y cmake
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L acceptance -LE per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=icelake ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=haswell ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=westmere ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=fallback ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
---
kind: pipeline
name: sanitize-clang9
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: conanio/clang9
user: root
environment:
CC: clang-9
CXX: clang++-9
CMAKE_FLAGS: -DSIMDJSON_SANITIZE=ON -DSIMDJSON_IMPLEMENTATION=icelake;haswell;westmere;fallback
BUILD_FLAGS: -- -j
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L acceptance -LE per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=icelake ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=haswell ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=westmere ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=fallback ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
---
kind: pipeline
name: cpp20-clang11-libcpp
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: pauldreik/llvm-11
user: root
environment:
CC: clang-11
CXX: clang++-11
CMAKE_FLAGS: -GNinja
BUILD_FLAGS:
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
CXXFLAGS: -std=c++20 -stdlib=libc++
commands:
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS
---
kind: pipeline
name: arm64-gcc8
platform: { os: linux, arch: arm64 }
steps:
- name: Build and Test
image: gcc:8
environment:
CC: gcc
CXX: g++
BUILD_FLAGS: -- -j
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=OFF -DSIMDJSON_IMPLEMENTATION=arm64;fallback
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
- apt-get update -qq
- apt-get -t buster-backports install -y cmake
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS -L acceptance -LE per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=arm64 ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=fallback ctest $CTEST_FLAGS -L per_implementation
- ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
---
kind: pipeline
name: arm64-clang6
platform: { os: linux, arch: arm64 }
steps:
- name: Build and Test
image: debian:buster-backports
environment:
CC: clang-6.0
CXX: clang++-6.0
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON
BUILD_FLAGS: -- -j
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- apt-get -qq update
- apt-get -t buster-backports install -y cmake
- apt-get install -y clang-6.0 git
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS
---
kind: pipeline
name: arm64-dynamic-gcc8
platform: { os: linux, arch: arm64 }
steps:
- name: Build and Test
image: gcc:8
environment:
CC: gcc
CXX: g++
BUILD_FLAGS: -- -j
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
- apt-get update -qq
- apt-get -t buster-backports install -y cmake
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS
---
kind: pipeline
name: arm64-dynamic-clang6
platform: { os: linux, arch: arm64 }
steps:
- name: Build and Test
image: debian:buster-backports
environment:
CC: clang-6.0
CXX: clang++-6.0
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON
BUILD_FLAGS: -- -j
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- apt-get -qq update
- apt-get -t buster-backports install -y cmake
- apt-get install -y clang-6.0 git
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS
---
kind: pipeline
name: arm64-sanitize-gcc8
platform: { os: linux, arch: arm64 }
steps:
- name: Build and Test
image: gcc:8
environment:
BUILD_FLAGS: -- -j
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=OFF -DSIMDJSON_IMPLEMENTATION=arm64;fallback
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
CC: gcc
CXX: g++
commands:
- echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
- apt-get update -qq
- apt-get -t buster-backports install -y cmake
- apt-get install -y libstdc++6
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L acceptance -LE per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=arm64 ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=fallback ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
---
kind: pipeline
name: arm64-sanitize-clang6
platform: { os: linux, arch: arm64 }
steps:
- name: Build and Test
image: debian:buster-backports
environment:
CC: clang-6.0
CXX: clang++-6.0
CMAKE_FLAGS: -DSIMDJSON_SANITIZE=ON -DSIMDJSON_IMPLEMENTATION=arm64;fallback
BUILD_FLAGS: -- -j
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- apt-get -qq update
- apt-get -t buster-backports install -y cmake
- apt-get install -y clang-6.0 git
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L acceptance -LE per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=arm64 ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=fallback ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -L per_implementation
- ASAN_OPTIONS="detect_leaks=0" ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
---
kind: pipeline
name: ninja-clang9
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: conanio/clang9
user: root
environment:
CC: clang-9
CXX: clang++-9
BUILD_FLAGS: -- -j 4
CMAKE_FLAGS: -GNinja -DBUILD_SHARED_LIBS=OFF
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
CXXFLAGS: -stdlib=libc++
commands:
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS
---
kind: pipeline
name: libcpp-clang9
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: conanio/clang9
user: root
environment:
CC: clang-9
CXX: clang++-9
BUILD_FLAGS: -- -j
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=OFF
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
CXXFLAGS: -stdlib=libc++
commands:
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS
---
kind: pipeline
name: libcpp-clang7
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: conanio/clang7
user: root
environment:
CC: clang-7
CXX: clang++-7
BUILD_FLAGS: -- -j
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=OFF
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
CXXFLAGS: -stdlib=libc++
commands:
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS
---
kind: pipeline
name: noexceptions-gcc9
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: gcc:9
environment:
CC: gcc
CXX: g++
BUILD_FLAGS: -- -j
CMAKE_FLAGS: -DSIMDJSON_EXCEPTIONS=OFF
CTEST_FLAGS: -j4 --output-on-failure -LE explicitonly
commands:
- echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
- apt-get update -qq
- apt-get -t buster-backports install -y cmake
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . $BUILD_FLAGS
- ctest $CTEST_FLAGS
---
kind: pipeline
name: arm64-fuzz
platform: { os: linux, arch: arm64 }
steps:
- name: Build and run fuzzers shortly
image: ubuntu:20.04
environment:
CC: clang
CXX: clang++
DEBIAN_FRONTEND: noninteractive
ASAN_OPTIONS: detect_leaks=0
commands:
- apt-get -qq update
- apt-get install -q -y clang cmake git wget zip ninja-build
- wget -O corpus.tar.gz https://readonly:readonly@www.pauldreik.se/fuzzdata/index.php?project=simdjson
- tar xf corpus.tar.gz && rm corpus.tar.gz
- fuzz/build_like_ossfuzz.sh
- mkdir -p common_out
- for fuzzer in build/fuzz/fuzz_* ; do echo $fuzzer;$fuzzer common_out out/* -max_total_time=40; done
---
kind: pipeline
name: stylecheck
platform: { os: linux, arch: amd64 }
steps:
- name: Build and Test
image: ubuntu:18.04
commands:
- apt-get update -y
- apt-get install -y python clang-format
- ./style/run-clang-format.py -r include/ benchmark/ src/ tests/
-12
View File
@@ -1,12 +0,0 @@
# https://editorconfig.org/
root = true
# Conservatively avoid changing defaults for other file types, e.g. raw json files for test cases,
# Makefiles, etc.
[*.{cpp,h,md}]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
tab_width = 2
trim_trailing_whitespace = true
-118
View File
@@ -1,118 +0,0 @@
# Set the default behavior, in case people don't have core.autocrlf set.
# Uncomment next line to adjust line endings
* text=auto
# we don't want json files to be modified for this project
*.json binary diff=astextplain
# Common settings that generally should always be used with your language specific settings
#
# From generator:
# https://www.davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
#
# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.txt text
*.sql text
# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as an asset (binary) by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary
# Scripts
*.bash text eol=lf
*.sh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
# Serialisation
#*.json text
*.toml text
*.xml text
*.yaml text
*.yml text
# Archives
*.7z binary
*.gz binary
*.tar binary
*.zip binary
#
# Exclude files from exporting
#
.gitattributes export-ignore
.gitignore export-ignore
.editorconfig export-ignore
# Sources
*.c text eol=lf diff=c
*.cc text eol=lf diff=cpp
*.cxx text eol=lf diff=cpp
*.cpp text eol=lf diff=cpp
*.c++ text eol=lf diff=cpp
*.hpp text eol=lf diff=cpp
*.h text eol=lf diff=c
*.h++ text eol=lf diff=cpp
*.hh text eol=lf diff=cpp
# Compiled Object files
*.slo binary
*.lo binary
*.o binary
*.obj binary
# Precompiled Headers
*.gch binary
*.pch binary
# Compiled Dynamic libraries
*.so binary
*.dylib binary
*.dll binary
# Compiled Static libraries
*.lai binary
*.la binary
*.a binary
*.lib binary
# Executables
*.exe binary
*.out binary
*.app binary
-69
View File
@@ -1,69 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug (unverified)
assignees: ''
---
Before submitting an issue, please ensure that you have read the documentation:
* Basics is an overview of how to use simdjson and its APIs to parse JSON: https://github.com/simdjson/simdjson/blob/master/doc/basics.md
* Builder is an overview of how to use simdjson to generate JSON: https://github.com/simdjson/simdjson/blob/master/doc/builder.md
* Performance shows some more advanced scenarios and how to tune for them: https://github.com/simdjson/simdjson/blob/master/doc/performance.md
* Contributing: https://github.com/simdjson/simdjson/blob/master/CONTRIBUTING.md
* We follow the [JSON specification as described by RFC 8259](https://www.rfc-editor.org/rfc/rfc8259.txt) (T. Bray, 2017). If you wish to support features that are not part of RFC 8259, then you should not refer to your issue as a bug.
**Describe the bug**
A clear and concise description of what the bug is. A bug is a failure to build with normal compiler settings or a misbehaviour: when running the code, you get a result that differs from the expected result from our documentation.
A compiler or static-analyzer warning is not a bug. It is possible with tools such as Visual Studio to require that rarely enabled warnings are considered errors. Do not report such cases as bugs. We do accept pull requests if you want to silence warnings issued by code analyzers, however.
We are committed to providing good documentation. We accept the lack of documentation or a misleading documentation as a bug (a 'documentation bug').
An unexpected poor software performance can be accepted as a bug (a 'performance bug').
We accept the identification of an issue by a sanitizer or some checker tool (e.g., valgrind) as a bug, but you must first ensure that it is not a false positive.
We recommend that you run your tests using different optimization levels. In particular, we recommend your run tests with the simdjson library and you code compiled in debug mode. The simdjson then sets the SIMDJSON_DEVELOPMENT_CHECKS macro to 1, and this triggers additional checks on your code and on the internals of the library. If possible, we recommend that you run tests with sanitizers (e.g., see [No more leaks with sanitize flags in gcc and clang](https://lemire.me/blog/2016/04/20/no-more-leaks-with-sanitize-flags-in-gcc-and-clang/)). You can compile the library with sanitizers for debugging purposes (e.g., set SIMDJSON_SANITIZE to ON using CMake), but you should also turn on sanitizers on your own code. You may also use tools like valgrind or the commercial equivalent.
Mixing debug and release simdjson code is unsafe: you either build all your code using simdjson in
release mode or all of it in debug mode.
Before reporting a bug, please ensure that you have read our documentation.
**To Reproduce**
Steps to reproduce the behaviour: provide a code sample if possible. Please provide a complete test with data. Remember that a bug is either a failure to build or an unexpected result when running the code.
If we cannot reproduce the issue, then we cannot address it. Note that a stack trace from your own program is not enough. A sample of your source code is insufficient: please provide a complete test for us to reproduce the issue. Please reduce the issue: use as small and as simple an example of the bug as possible.
It should be possible to trigger the bug by using solely simdjson with our default build setup. If you can only observe the bug within some specific context, with some other software, please reduce the issue first.
**simdjson release**
Unless you plan to contribute to simdjson, you should only work from releases. Please be mindful that our main branch may have additional features, bugs and documentation items.
It is fine to report bugs against our main branch, but if that is what you are doing, please be explicit.
**Configuration (please complete the following information if relevant)**
- OS: [e.g. Ubuntu 16.04.6 LTS]
- Compiler* [e.g. Apple clang version 11.0.3 (clang-1103.0.32.59) x86_64-apple-darwin19.4.0]
- Version [e.g. 22]
- Optimization setting (e.g., -O3)
We support up-to-date 64-bit ARM and x64 FreeBSD, macOS, Windows and Linux systems. Please ensure that your configuration is supported before labelling the issue as a bug.
* We do not support unreleased or experimental compilers. If you encounter an issue with a
pre-release version of a compiler, do not report it as a bug to simdjson. However, we always
invite contributions either in the form an analysis or of a code contribution.
* Vendors (e.g., Apple and Microsoft) stop supporting old systems. Once a compiler system is no longer supported by its vendor, we no longer support it. We will gladly accept code contributions, but we do not consider it a *bug* if you have issues with an obsolete compiler systems. This policy extends to obsolete standard libraries, linkers and other build tools. Please do not report it as an issue. If you cannot resolve the issue yourself, we encourage you to reach out to the vendor for legacy support.
Under Windows, we support Visual Studio (both with LLVM and without). We do not support MinGW and other alternate compiler systems. Windows users should be aware that there [is a long-running bug with GCC under Windows](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412).
**Indicate whether you are willing or able to provide a bug fix as a pull request**
If you plan to contribute to simdjson, please read our guide:
* CONTRIBUTING guide: https://github.com/simdjson/simdjson/blob/master/CONTRIBUTING.md and our
* HACKING guide: https://github.com/simdjson/simdjson/blob/master/HACKING.md
-1
View File
@@ -1 +0,0 @@
blank_issues_enabled: false
-38
View File
@@ -1,38 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
Before submitting an issue, please ensure that you have read the documentation:
* Basics is an overview of how to use simdjson and its APIs to parse JSON: https://github.com/simdjson/simdjson/blob/master/doc/basics.md
* Builder is an overview of how to use simdjson to generate JSON: https://github.com/simdjson/simdjson/blob/master/doc/builder.md
* Performance shows some more advanced scenarios and how to tune for them: https://github.com/simdjson/simdjson/blob/master/doc/performance.md
* Contributing: https://github.com/simdjson/simdjson/blob/master/CONTRIBUTING.md
* We follow the [JSON specification as described by RFC 8259](https://www.rfc-editor.org/rfc/rfc8259.txt) (T. Bray, 2017).
We do not make changes to simdjson without clearly identifiable benefits, which typically means either performance improvements, bug fixes or new features. Avoid bike-shedding: we all have opinions about how to write code, but we want to focus on what makes simdjson objectively better.
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
Please provide a clear rationale for the feature. Be advised that simdjson is a community-based project: you should consider providing help.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
**Are you willing to contribute code or documentation toward this new feature?**
If you plan to contribute to simdjson, please read our
* CONTRIBUTING guide: https://github.com/simdjson/simdjson/blob/master/CONTRIBUTING.md and our
* HACKING guide: https://github.com/simdjson/simdjson/blob/master/HACKING.md
@@ -1,33 +0,0 @@
---
name: Standard issue template
about: Issue
title: ''
labels: ''
assignees: ''
---
Before submitting an issue, please ensure that you have read the documentation:
* Basics is an overview of how to use simdjson and its APIs to parse JSON: https://github.com/simdjson/simdjson/blob/master/doc/basics.md
* Builder is an overview of how to use simdjson to generate JSON: https://github.com/simdjson/simdjson/blob/master/doc/builder.md
* Performance shows some more advanced scenarios and how to tune for them: https://github.com/simdjson/simdjson/blob/master/doc/performance.md
* Contributing: https://github.com/simdjson/simdjson/blob/master/CONTRIBUTING.md
* We follow the [JSON specification as described by RFC 8259](https://www.rfc-editor.org/rfc/rfc8259.txt) (T. Bray, 2017).
We do not make changes to simdjson without clearly identifiable benefits, which typically means either performance improvements, bug fixes or new features. Avoid bike-shedding: we all have opinions about how to write code, but we want to focus on what makes simdjson objectively better.
Is your issue:
1. A bug report? If so, please point at a reproducible test. Indicate whether you are willing or able to provide a bug fix as a pull request. As a matter of policy, we do not consider a compiler warning to be a bug.
2. A build issue? If so, provide all possible details regarding your system configuration. If we cannot reproduce your issue, we cannot fix it.
3. A feature request? Please provide a clear rationale for the feature. Be advised that simdjson is a community-based project: you should consider providing help.
4. A documentation issue? Can you suggest an improvement?
If you plan to contribute to simdjson, please read our
* CONTRIBUTING guide: https://github.com/simdjson/simdjson/blob/master/CONTRIBUTING.md and our
* HACKING guide: https://github.com/simdjson/simdjson/blob/master/HACKING.md
-54
View File
@@ -1,54 +0,0 @@
Short title (summary):
Description
- What did you change and why? (1-3 sentences)
- Issue reproduced / related issue: link the issue if relevant (e.g. #123)
Type of change
- [ ] Bug fix
- [ ] Optimization
- [ ] New feature
- [ ] Refactor / cleanup
- [ ] Documentation / tests
- [ ] Other (please describe):
How to verify / test
- Add additional tests to verify bugs or new features.
- If you claim performance gains, you should provide benchmark numbers using high quality benchmarking code.
Please read before contributing:
- CONTRIBUTING: https://github.com/simdjson/simdjson/blob/master/CONTRIBUTING.md
- HACKING: https://github.com/simdjson/simdjson/blob/master/HACKING.md
- AI Usage Policy: https://github.com/simdjson/simdjson/blob/master/AI_USAGE_POLICY.md
If you can, we recommend running our tests with the sanitizers turned on.
For non-Visual Studio users, it is as easy as doing:
```bash
cmake -B build -D SIMDJSON_SANITIZE=ON -D SIMDJSON_DEVELOPER_MODE=ON
cmake --build build
ctest --test-dir build
```
Our CI checks, among other things, for trailing whitespace. If a test fails for that reason,
use the "artifacts" button to download the artifact and inspect the problematic lines,
or run `scripts/remove_trailing_whitespace.sh` locally if you have a bash shell and `sed`.
Checklist before submitting
- [ ] I added/updated tests covering my change (if applicable)
- [ ] Code builds locally and passes my check
- [ ] Documentation / README updated if needed
- [ ] Commits are atomic and messages are clear
- [ ] I linked the related issue (if applicable)
Final notes
- For large PRs, prefer smaller incremental PRs or request staged review.
Thanks for the contribution!
-29
View File
@@ -1,29 +0,0 @@
name: Ubuntu aarch64 (GCC 13)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v3
name: Test
id: runcmd
with:
arch: aarch64
distro: ubuntu_latest
githubToken: ${{ github.token }}
install: |
apt-get update -q -y
apt-get install -y cmake make g++
run: |
cmake -DSIMDJSON_SANITIZE_UNDEFINED=ON -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -B build
cmake --build build -j=2
ctest --output-on-failure --test-dir build
-34
View File
@@ -1,34 +0,0 @@
name: Alpine Linux
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: start docker
run: |
docker run -w /src -dit --name alpine -v $PWD:/src alpine:latest
echo 'docker exec alpine "$@";' > ./alpine.sh
chmod +x ./alpine.sh
- name: install packages
run: |
./alpine.sh apk update
./alpine.sh apk add build-base cmake g++ linux-headers git bash
- name: cmake
run: |
./alpine.sh cmake -DSIMDJSON_DEVELOPER_MODE=ON -B build_for_alpine
- name: build
run: |
./alpine.sh cmake --build build_for_alpine
- name: test
run: |
./alpine.sh bash -c "cd build_for_alpine && ctest -LE explicitonly --output-on-failure"
-24
View File
@@ -1,24 +0,0 @@
name: CIFuzz
on: [pull_request]
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'simdjson'
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'simdjson'
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v4
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
-33
View File
@@ -1,33 +0,0 @@
name: Debian
on: [push, pull_request]
defaults:
run:
shell: sh
permissions:
contents: read
jobs:
pkg-config:
runs-on: ubuntu-latest
container:
image: debian:testing
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt -y update
apt -y --no-install-recommends install g++ cmake make pkg-config
- name: Build and install
run: |
cmake -B build
cmake --build build
cmake --install build
- name: Test pkg-config
run: g++ examples/quickstart/quickstart.cpp $(pkg-config --cflags --libs simdjson)
-39
View File
@@ -1,39 +0,0 @@
name: Doxygen GitHub Pages
on:
release:
# Trigger when a release object is created and when it's published.
# Some GitHub flows create a release object then publish it later; include both.
types: [created, published]
# Also trigger on tag creation pushes so releasing via Git tags still runs the workflow
push:
tags:
- "v*" # common release tag pattern like v1.2.3
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Doxygen
run: sudo apt-get install doxygen graphviz -y
- run: mkdir docs
- name: Install theme
run: ./tools/prepare_doxygen.sh
- name: Generate Doxygen Documentation
run: doxygen
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/api/html
-17
View File
@@ -1,17 +0,0 @@
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
- name: Verify
run: emcc -v
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v3.6.0
- name: Configure
run: emcmake cmake -B build
- name: Build # We build but do not test
run: cmake --build build
@@ -1,34 +0,0 @@
name: Detect trailing whitespace
on: [push, pull_request]
jobs:
whitespace:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Remove whitespace and check the diff
run: |
set -eu
scripts/remove_trailing_whitespace.sh
git diff >whitespace.patch
cat whitespace.patch
if [ $(wc -c <whitespace.patch) -ne 0 ] ; then
echo " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! "
echo "You have trailing whitespace, please download the artifact"
echo "and apply with git apply <whitespace.patch or"
echo "run scripts/remove_trailing_whitespace.sh locally."
echo " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! "
exit 1
else
echo "no trailing whitespace found, good!"
fi
- name: Archive whitespace patch
uses: actions/upload-artifact@v4
if: always()
with:
name: whitespace-patch
path: |
whitespace.patch
if-no-files-found: ignore
-167
View File
@@ -1,167 +0,0 @@
name: Fuzz and run valgrind
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: 23 */8 * * *
jobs:
build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-latest
env:
# fuzzers that change behaviour with SIMDJSON_FORCE_IMPLEMENTATION
defaultimplfuzzers: atpointer dump dump_raw_tape element minify parser print_json
# fuzzers that loop over the implementations themselves, or don't need to switch.
implfuzzers: implementations minifyimpl ndjson ondemand padded utf8
implementations: haswell westmere fallback
UBSAN_OPTIONS: halt_on_error=1
MAXLEN: -max_len=4000
CLANGVERSION: 19
# which optimization level to use for the sanitizer build (see build_fuzzer.variants.sh)
OPTLEVEL: -O3
steps:
- name: Install packages necessary for building
run: |
sudo apt update
sudo apt-get install --quiet ninja-build valgrind zip unzip lsb-release wget software-properties-common gnupg
wget https://apt.llvm.org/llvm.sh
sudo apt-get purge --auto-remove llvm python3-lldb-15 llvm-15
chmod +x llvm.sh
sudo ./llvm.sh $CLANGVERSION
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- uses: actions/cache@v4
id: cache-corpus
with:
path: out/
key: corpus-${{ github.run_id }}
restore-keys: corpus-
- name: show statistics for the cached corpus
run: |
echo number of files in github action corpus cache:
find out -type f |wc -l
- name: Create and prepare the initial seed corpus
run: |
fuzz/build_corpus.sh
mv corpus.zip seed_corpus.zip
mkdir seedcorpus
unzip -q -d seedcorpus seed_corpus.zip
- name: List clang versions
run: |
ls /usr/bin/clang*
which clang++
clang++ --version
- name: Build all the variants
run: CLANGSUFFIX=-$CLANGVERSION fuzz/build_fuzzer_variants.sh
- name: Explore fast (release build, default implementation)
run: |
set -eux
for fuzzer in $defaultimplfuzzers $implfuzzers; do
mkdir -p out/$fuzzer # in case this is a new fuzzer, or the github action cached corpus is broken
# get input from everyone else (corpus cross pollination)
others=$(find out -type d -not -name $fuzzer -not -name out -not -name cmin)
build-fast/fuzz/fuzz_$fuzzer out/$fuzzer $others seedcorpus -max_total_time=30 $MAXLEN
done
- name: Fuzz default impl. fuzzers with sanitizer+asserts (good at detecting errors)
run: |
set -eux
for fuzzer in $defaultimplfuzzers; do
# get input from everyone else (corpus cross pollination)
others=$(find out -type d -not -name $fuzzer -not -name out -not -name cmin)
for implementation in $implementations; do
export SIMDJSON_FORCE_IMPLEMENTATION=$implementation
build-sanitizers$OPTLEVEL/fuzz/fuzz_$fuzzer out/$fuzzer $others seedcorpus -max_total_time=20 $MAXLEN
done
echo now have $(ls out/$fuzzer |wc -l) files in corpus
done
- name: Fuzz differential impl. fuzzers with sanitizer+asserts (good at detecting errors)
run: |
set -eux
for fuzzer in $implfuzzers; do
# get input from everyone else (corpus cross pollination)
others=$(find out -type d -not -name $fuzzer -not -name out -not -name cmin)
build-sanitizers$OPTLEVEL/fuzz/fuzz_$fuzzer out/$fuzzer $others seedcorpus -max_total_time=20 $MAXLEN
echo now have $(ls out/$fuzzer |wc -l) files in corpus
done
- name: Minimize the corpus with the fast fuzzer on the default implementation
run: |
set -eux
for fuzzer in $defaultimplfuzzers $implfuzzers; do
mkdir -p out/cmin/$fuzzer
# get input from everyone else (corpus cross pollination)
others=$(find out -type d -not -name $fuzzer -not -name out -not -name cmin)
build-fast/fuzz/fuzz_$fuzzer -merge=1 $MAXLEN out/cmin/$fuzzer out/$fuzzer $others seedcorpus
rm -rf out/$fuzzer
mv out/cmin/$fuzzer out/$fuzzer
done
- name: Package the corpus into an artifact
run: |
for fuzzer in $defaultimplfuzzers $implfuzzers; do
tar rf corpus.tar out/$fuzzer
done
- name: Save the corpus as a github artifact
uses: actions/upload-artifact@v4
with:
name: corpus
path: corpus.tar
- name: Store the corpus externally
run: |
gzip --keep corpus.tar
curl -F"filedata=@corpus.tar.gz" https://simdjson:${{ secrets.fuzzdatapassword }}@www.pauldreik.se/fuzzdata/index.php
# This takes a subset of the minimized corpus and run it through valgrind. It is slow,
# therefore take a "random" subset. The random selection is accomplished by sorting on filenames,
# which are hashes of the content.
- name: Run some of the minimized corpus through valgrind (replay build, default implementation)
run: |
for fuzzer in $defaultimplfuzzers $implfuzzers; do
find out/$fuzzer -type f |sort|head -n200|xargs -n40 valgrind build-replay/fuzz/fuzz_$fuzzer 2>&1|tee valgrind-$fuzzer.txt
done
- name: Compress the valgrind output
run: tar cf valgrind.tar valgrind-*.txt
- name: Save valgrind output as a github artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: valgrindresults
path: valgrind.tar
if-no-files-found: ignore
- name: Archive any crashes as an artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: crashes
path: |
crash-*
leak-*
timeout-*
if-no-files-found: ignore
-50
View File
@@ -1,50 +0,0 @@
name: LoongArch64-CI
on: [push, pull_request]
jobs:
loongarch64:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- { toolchain-version: 2023.08.08 }
steps:
- uses: actions/checkout@v4
- name: Install build requirements
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends cmake
- uses: actions/cache/restore@v4
id: restore-cache
with:
path: /opt/cross-tools
key: loongarch64-${{ matrix.platform.toolchain-version }}
- name: Download LoongArch64 gcc+glibc toolchain
if: ${{ !steps.restore-cache.outputs.cache-hit }}
run: |
url="https://github.com/loongson/build-tools/releases/download/${{ matrix.platform.toolchain-version }}/x86_64-cross-tools-loongarch64-gcc-libc.tar.xz"
wget "$url" -O /tmp/toolchain.tar.xz
mkdir -p /opt
tar -C /opt -x -f /tmp/toolchain.tar.xz
- uses: actions/cache/save@v3
if: ${{ !steps.restore-cache.outputs.cache-hit }}
with:
path: /opt/cross-tools
key: loongarch64-${{ matrix.platform.toolchain-version }}
- name: setup Loongarch64 build environment
run: |
echo "/opt/cross-tools/bin" >> $GITHUB_PATH
echo "CC=loongarch64-unknown-linux-gnu-gcc" >> $GITHUB_ENV
echo "CXX=loongarch64-unknown-linux-gnu-g++" >> $GITHUB_ENV
- name: configure
run: cmake -B build -DCMAKE_SYSTEM_PROCESSOR=loongarch64 -DARCH=lonngarch64 -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=loongarch64-unknown-linux-gnu-gcc -DCMAKE_CXX_COMPILER=loongarch64-unknown-linux-gnu-g++
- name: build
run: cmake --build build
-44
View File
@@ -1,44 +0,0 @@
name: Macos
on: [push, pull_request]
jobs:
macos-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Use cmake
run: |
mkdir builddebug &&
cd builddebug &&
cmake -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j &&
cd .. &&
mkdir build &&
cd build &&
cmake -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j &&
cmake --install . &&
echo -e '#include <simdjson.h>\nint main(int argc,char**argv) {simdjson::dom::parser parser;simdjson::dom::element tweets = parser.load(argv[1]); }' > tmp.cpp && c++ -Idestination/include -Ldestination/lib -std=c++17 -Wl,-rpath,destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json &&
cd ../tests/installation_tests/find &&
mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination .. && cmake --build .
- name: Use cmake (shared)
run: |
mkdir buildshared &&
cd buildshared &&
cmake -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j &&
cmake --install . &&
echo -e '#include <simdjson.h>\nint main(int argc,char**argv) {simdjson::dom::parser parser;simdjson::dom::element tweets = parser.load(argv[1]); }' > tmp.cpp && c++ -Idestination/include -Ldestination/lib -std=c++17 -Wl,-rpath,destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json &&
cd ../tests/installation_tests/find &&
mkdir buildshared && cd buildshared && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../buildshared/destination .. && cmake --build .
-46
View File
@@ -1,46 +0,0 @@
name: MSYS2-CLANG-CI
on: [push, pull_request]
jobs:
windows-mingw:
name: ${{ matrix.msystem }}
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
include:
- msystem: "MINGW64"
install: mingw-w64-x86_64-libxml2 mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang
type: Release
- msystem: "MINGW64"
install: mingw-w64-x86_64-libxml2 mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang
type: Debug
- msystem: "MINGW64"
install: mingw-w64-x86_64-libxml2 mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang
type: RelWithDebInfo
env:
CMAKE_GENERATOR: Ninja
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- uses: msys2/setup-msys2@v2
with:
update: true
msystem: ${{ matrix.msystem }}
install: ${{ matrix.install }}
- name: Build and Test
run: |
mkdir build
cd build
cmake -DSIMDJSON_DEVELOPER_MODE=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DBUILD_SHARED_LIBS=OFF -DSIMDJSON_DO_NOT_USE_THREADS_NO_MATTER_WHAT=ON ..
cmake --build . --verbose
ctest -j4 --output-on-failure -LE explicitonly
-48
View File
@@ -1,48 +0,0 @@
name: MSYS2-CI
on: [push, pull_request]
jobs:
windows-mingw:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
name: ${{ matrix.msystem }}
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
include:
- msystem: "MINGW64"
install: mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-gcc
type: Release
- msystem: "MINGW64"
install: mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-gcc
type: Debug
- msystem: "MINGW64"
install: mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-gcc
type: RelWithDebInfo
env:
CMAKE_GENERATOR: Ninja
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- uses: msys2/setup-msys2@v2
with:
update: true
msystem: ${{ matrix.msystem }}
install: ${{ matrix.install }}
- name: Build and Test
run: |
mkdir build
cd build
cmake -DSIMDJSON_DEVELOPER_MODE=ON -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DBUILD_SHARED_LIBS=OFF -DSIMDJSON_DO_NOT_USE_THREADS_NO_MATTER_WHAT=ON ..
cmake --build . --verbose
ctest -j4 --output-on-failure -LE explicitonly
-29
View File
@@ -1,29 +0,0 @@
name: Ubuntu ppc64le (GCC 11)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v3
name: Test
id: runcmd
with:
arch: ppc64le
distro: ubuntu_latest
githubToken: ${{ github.token }}
install: |
apt-get update -q -y
apt-get install -y cmake make g++
run: |
cmake -DCMAKE_BUILD_TYPE=Release -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -B build
cmake --build build -j=2
ctest --output-on-failure --test-dir build
-29
View File
@@ -1,29 +0,0 @@
name: Ubuntu riscv64 (GCC 11)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v3
name: Test
id: runcmd
with:
arch: riscv64
distro: ubuntu_latest
githubToken: ${{ github.token }}
install: |
apt-get update -q -y
apt-get install -y cmake make g++
run: |
cmake -DCMAKE_BUILD_TYPE=Release -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -B build
cmake --build build -j=2
ctest --output-on-failure --test-dir build
-29
View File
@@ -1,29 +0,0 @@
name: Ubuntu rvv VLEN=1024 (clang 18)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt-get update -q -y
sudo apt-get install -y cmake make g++-riscv64-linux-gnu qemu-user-static clang-18
- name: Build
run: |
CC=clang-18 CXX=clang++-18 CFLAGS="--target=riscv64-linux-gnu -march=rv64gcv_zvbb" CXXFLAGS="${CFLAGS}" \
cmake --toolchain=cmake/toolchains-ci/riscv64-linux-gnu.cmake -DSIMDJSON_DEVELOPER_MODE=ON -B build
cmake --build build/ -j$(nproc) --config Release
- name: Test VLEN=1024
run: |
QEMU_LD_PREFIX="/usr/riscv64-linux-gnu" \
QEMU_CPU="rv64,v=on,zvbb=on,vlen=1024,rvv_ta_all_1s=on,rvv_ma_all_1s=on" \
ctest --timeout 1800 --output-on-failure --test-dir build -j $(nproc)
-24
View File
@@ -1,24 +0,0 @@
name: Ubuntu rvv VLEN=128 (clang 17)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt-get update -q -y
sudo apt-get install -y cmake make g++-riscv64-linux-gnu qemu-user-static clang-17
- name: Build
run: |
CC=clang-17 CXX=clang++-17 CFLAGS="--target=riscv64-linux-gnu -march=rv64gcv" CXXFLAGS="${CFLAGS}" \
cmake --toolchain=cmake/toolchains-ci/riscv64-linux-gnu.cmake -DSIMDJSON_DEVELOPER_MODE=ON -B build
cmake --build build/ -j$(nproc) --config Release
-39
View File
@@ -1,39 +0,0 @@
name: Ubuntu rvv VLEN=128 (clang 20)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt-get update -q -y
sudo apt-get install -y cmake make g++-riscv64-linux-gnu qemu-user-static clang-20
- name: Build
run: |
CC=clang-20 CXX=clang++-20 CFLAGS="--target=riscv64-linux-gnu -march=rv64gcv" CXXFLAGS="${CFLAGS}" \
cmake --toolchain=cmake/toolchains-ci/riscv64-linux-gnu.cmake -DSIMDJSON_DEVELOPER_MODE=ON -B build
cmake --build build/ -j$(nproc) --config Release
- name: Test VLEN=128
run: |
QEMU_LD_PREFIX="/usr/riscv64-linux-gnu" \
QEMU_CPU="rv64,v=on,vlen=128,rvv_ta_all_1s=on,rvv_ma_all_1s=on" \
ctest --timeout 1800 --output-on-failure --test-dir build -j $(nproc)
- name: Build VLS
run: |
CC=clang-20 CXX=clang++-20 CFLAGS="--target=riscv64-linux-gnu -march=rv64gcv_zvl128b_zba_zbb_zbc -mrvv-vector-bits=zvl" CXXFLAGS="${CFLAGS}" \
cmake --toolchain=cmake/toolchains-ci/riscv64-linux-gnu.cmake -DSIMDJSON_DEVELOPER_MODE=ON -B build-vls
cmake --build build-vls/ -j$(nproc) --config Release
- name: Test VLEN=128 VLS
run: |
QEMU_LD_PREFIX="/usr/riscv64-linux-gnu" \
QEMU_CPU="rv64,v=on,zba=on,zbb=on,zbc=on,vlen=128,rvv_ta_all_1s=on,rvv_ma_all_1s=on" \
ctest --timeout 1800 --output-on-failure --test-dir build-vls -j $(nproc)
-39
View File
@@ -1,39 +0,0 @@
name: Ubuntu rvv VLEN=256 (gcc 14)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt-get update -q -y
sudo apt-get install -y cmake make g++-14-riscv64-linux-gnu qemu-user-static
- name: Build
run: |
CC=riscv64-linux-gnu-gcc-14 CXX=riscv64-linux-gnu-g++-14 CFLAGS=-march=rv64gcv CXXFLAGS="${CFLAGS}" \
cmake --toolchain=cmake/toolchains-ci/riscv64-linux-gnu.cmake -DSIMDJSON_DEVELOPER_MODE=ON -B build
cmake --build build/ -j$(nproc) --config Release
- name: Test VLEN=256
run: |
QEMU_LD_PREFIX="/usr/riscv64-linux-gnu" \
QEMU_CPU="rv64,v=on,zvbb=on,vlen=256,rvv_ta_all_1s=on,rvv_ma_all_1s=on" \
ctest --timeout 1800 --output-on-failure --test-dir build -j $(nproc)
- name: Build VLS
run: |
CC=riscv64-linux-gnu-gcc-14 CXX=riscv64-linux-gnu-g++-14 CFLAGS="-march=rv64gcv_zvl256b -mrvv-vector-bits=zvl" CXXFLAGS="${CFLAGS}" \
cmake --toolchain=cmake/toolchains-ci/riscv64-linux-gnu.cmake -DSIMDJSON_DEVELOPER_MODE=ON -B build-vls
cmake --build build-vls/ -j$(nproc) --config Release
- name: Test VLEN=256 VLS
run: |
QEMU_LD_PREFIX="/usr/riscv64-linux-gnu" \
QEMU_CPU="rv64,v=on,zvbb=on,vlen=256,rvv_ta_all_1s=on,rvv_ma_all_1s=on" \
ctest --timeout 1800 --output-on-failure --test-dir build-vls -j $(nproc)
-39
View File
@@ -1,39 +0,0 @@
name: Ubuntu rvv VLEN=512 (clang 19)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt-get update -q -y
sudo apt-get install -y cmake make g++-riscv64-linux-gnu qemu-user-static clang-19
- name: Build
run: |
CC=clang-19 CXX=clang++-19 CFLAGS="--target=riscv64-linux-gnu -march=rv64gcv" CXXFLAGS="${CFLAGS}" \
cmake --toolchain=cmake/toolchains-ci/riscv64-linux-gnu.cmake -DSIMDJSON_DEVELOPER_MODE=ON -B build
cmake --build build/ -j$(nproc) --config Release
- name: Test VLEN=512
run: |
QEMU_LD_PREFIX="/usr/riscv64-linux-gnu" \
QEMU_CPU="rv64,v=on,vlen=512,rvv_ta_all_1s=on,rvv_ma_all_1s=on" \
ctest --timeout 1800 --output-on-failure --test-dir build -j $(nproc)
- name: Build VLS
run: |
CC=clang-19 CXX=clang++-19 CFLAGS="--target=riscv64-linux-gnu -march=rv64gcv_zvl512b_zba_zbb_zbc -mrvv-vector-bits=zvl" CXXFLAGS="${CFLAGS}" \
cmake --toolchain=cmake/toolchains-ci/riscv64-linux-gnu.cmake -DSIMDJSON_DEVELOPER_MODE=ON -B build-vls
cmake --build build-vls/ -j$(nproc) --config Release
- name: Test VLEN=512 VLS
run: |
QEMU_LD_PREFIX="/usr/riscv64-linux-gnu" \
QEMU_CPU="rv64,v=on,zba=on,zbb=on,zbc=on,vlen=512,rvv_ta_all_1s=on,rvv_ma_all_1s=on" \
ctest --timeout 1800 --output-on-failure --test-dir build-vls -j $(nproc)
-29
View File
@@ -1,29 +0,0 @@
name: Ubuntu s390x (GCC 11)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v3
name: Test
id: runcmd
with:
arch: s390x
distro: ubuntu_latest
githubToken: ${{ github.token }}
install: |
apt-get update -q -y
apt-get install -y cmake make g++
run: |
cmake -DCMAKE_BUILD_TYPE=Release -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -B build
cmake --build build -j=2
ctest --output-on-failure --test-dir build
-23
View File
@@ -1,23 +0,0 @@
name: Ubuntu 22.04 CI (CLANG 13)
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Use cmake
run: |
mkdir build &&
cd build &&
CXX=clang++-13 cmake -DSIMDJSON_DEVELOPER_MODE=ON .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j
-23
View File
@@ -1,23 +0,0 @@
name: Ubuntu 22.04 CI (CLANG 14)
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Use cmake
run: |
mkdir build &&
cd build &&
CXX=clang++-14 cmake -DSIMDJSON_DEVELOPER_MODE=ON .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j
-65
View File
@@ -1,65 +0,0 @@
name: Ubuntu 22.04 CI (GCC 12, CXX 20)
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Configure Debug Build
run: |
CXX=g++-12 cmake -DSIMDJSON_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF -B builddebug
- name: Compile Debug Build
run: |
cmake --build builddebug
- name: Test Debug Build
run: |
ctest --output-on-failure -LE explicitonly -j --test-dir builddebug
- name: Configure Release Build
run: |
CXX=g++-12 cmake -DSIMDJSON_CXX_STANDARD=20 -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination -B build
- name: Compile Release Build
run: |
cmake --build build
- name: Test Release Build
run: |
ctest --output-on-failure -LE explicitonly -j --test-dir build
- name: Install Release Build
run: |
cmake --install build
- name: Generate Example Code
run: |
echo -e '#include <simdjson.h>\nint main(int argc,char**argv) {simdjson::dom::parser parser;simdjson::dom::element tweets = parser.load(argv[1]); }' > tmp.cpp
- name: Compile Example Code
run: |
c++ -Idestination/include -Ldestination/lib -std=c++17 -Wl,-rpath,destination/lib -o linkandrun tmp.cpp -lsimdjson
- name: Run Example Code
run: |
./linkandrun jsonexamples/twitter.json
- name: Configure Find Tests
run: |
cd tests/installation_tests/find && \
cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../destination -B build
- name: Compile Find Tests
run: |
cd tests/installation_tests/find && cmake --build build
-23
View File
@@ -1,23 +0,0 @@
name: Ubuntu 22.04 CI (GCC 12)
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Use cmake
run: |
mkdir build &&
cd build &&
CXX=g++-12 cmake -DSIMDJSON_DEVELOPER_MODE=ON .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j
@@ -1,24 +0,0 @@
name: Ubuntu 22.04 CI GCC 12 with GLIBCXX_ASSERTIONS
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Install gcc12
run: sudo apt-get install -y g++-12
- name: Use cmake
run: |
mkdir build &&
cd build &&
CXX=g++-12 cmake -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_GLIBCXX_ASSERTIONS=ON -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DEVELOPER_MODE=ON .. &&
cmake --build . &&
ctest . -E avoid_
-24
View File
@@ -1,24 +0,0 @@
name: Ubuntu 22.04 CI (GCC 12) with Thread Sanitizer
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Use cmake
run: |
mkdir build &&
cd build &&
CXX=g++-12 cmake -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_SANITIZE_THREADS=ON .. &&
cmake --build . --target document_stream_tests --target ondemand_document_stream_tests --target parse_many_test &&
ctest --output-on-failure -R parse_many_test &&
ctest --output-on-failure -R document_stream_tests
-47
View File
@@ -1,47 +0,0 @@
name: Ubuntu 22.04 CI (GCC 11)
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Use cmake to build just the library
run: |
mkdir buildjustlib &&
cd buildjustlib &&
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DSIMDJSON_DEVELOPER_MODE=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
cmake --build . &&
cmake --install . &&
echo -e '#include <simdjson.h>\nint main(int argc,char**argv) {simdjson::dom::parser parser;simdjson::dom::element tweets = parser.load(argv[1]); }' > tmp.cpp &&
c++ -Idestination/include -Ldestination/lib -std=c++17 -Wl,-rpath,destination/lib -o linkandrun tmp.cpp -lsimdjson &&
cd ../tests/installation_tests/find &&
mkdir buildjustlib &&
cd buildjustlib &&
cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../buildjustlib/destination .. &&
cmake --build .
- name: Use cmake
run: |
mkdir builddebug &&
cd builddebug &&
cmake -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j &&
cd .. &&
mkdir build &&
cd build &&
cmake -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j &&
cmake --install . &&
echo -e '#include <simdjson.h>\nint main(int argc,char**argv) {simdjson::dom::parser parser;simdjson::dom::element tweets = parser.load(argv[1]); }' > tmp.cpp && c++ -Idestination/include -Ldestination/lib -std=c++17 -Wl,-rpath,destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json &&
cd ../tests/installation_tests/find &&
mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../../../build/destination .. && cmake --build .
-29
View File
@@ -1,29 +0,0 @@
name: Performance check on Ubuntu 24.04 CI (GCC 13)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Use cmake
run: |
mkdir build &&
cd build &&
cmake -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_ENABLE_DOM_CHECKPERF=ON -DCMAKE_CXX_FLAGS="-Werror=old-style-cast -pedantic -Wpedantic" -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
cmake --build . --target checkperf &&
ctest --output-on-failure -R checkperf
@@ -1,22 +0,0 @@
name: Ubuntu 24.04 CI (CXX 20, noexcept)
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04
strategy:
matrix:
cxx: [g++-13, clang++-16]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Prepare
run: cmake -DSIMDJSON_CXX_STANDARD=20 -DSIMDJSON_EXCEPTIONS=OFF -DSIMDJSON_DEVELOPER_MODE=ON -B build
env:
CXX: ${{matrix.cxx}}
- name: Build
run: cmake --build build -j=2
- name: Test
run: ctest --output-on-failure --test-dir build
-22
View File
@@ -1,22 +0,0 @@
name: Ubuntu 24.04 CI (CXX 20)
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04
strategy:
matrix:
cxx: [g++-13, clang++-16]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Prepare
run: cmake -DSIMDJSON_CXX_STANDARD=20 -DSIMDJSON_DEVELOPER_MODE=ON -B build
env:
CXX: ${{matrix.cxx}}
- name: Build
run: cmake --build build -j=2
- name: Test
run: ctest --output-on-failure --test-dir build
-34
View File
@@ -1,34 +0,0 @@
name: Ubuntu 24.04 CI (GCC 13) without exceptions
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Use cmake
run: |
mkdir builddebug &&
cd builddebug &&
cmake -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_EXCEPTIONS=OFF -DBUILD_SHARED_LIBS=OFF .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j &&
cd .. &&
mkdir build &&
cd build &&
cmake -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_EXCEPTIONS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j &&
make install &&
echo -e '#include <simdjson.h>\nint main(int argc,char**argv) {simdjson::dom::parser parser;simdjson::dom::element tweets = parser.load(argv[1]); }' > tmp.cpp && c++ -Idestination/include -Ldestination/lib -std=c++17 -Wl,-rpath,destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json &&
mkdir testfindpackage &&
cd testfindpackage &&
echo -e 'cmake_minimum_required(VERSION 3.14)\nproject(simdjsontester)\nset(CMAKE_CXX_STANDARD 17)\nfind_package(simdjson REQUIRED)'> CMakeLists.txt && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../destination .. && cmake --build .
-34
View File
@@ -1,34 +0,0 @@
name: Ubuntu 24.04 CI (GCC 13) Without Threads
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Use cmake
run: |
mkdir builddebug &&
cd builddebug &&
cmake -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_ENABLE_THREADS=OFF -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j &&
cd .. &&
mkdir build &&
cd build &&
cmake -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_ENABLE_THREADS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j &&
make install &&
echo -e '#include <simdjson.h>\nint main(int argc,char**argv) {simdjson::dom::parser parser;simdjson::dom::element tweets = parser.load(argv[1]); }' > tmp.cpp && c++ -Idestination/include -Ldestination/lib -std=c++17 -Wl,-rpath,destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json &&
mkdir testfindpackage &&
cd testfindpackage &&
echo -e 'cmake_minimum_required(VERSION 3.14)\nproject(simdjsontester)\nset(CMAKE_CXX_STANDARD 17)\nfind_package(simdjson REQUIRED)'> CMakeLists.txt && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../destination .. && cmake --build .
-41
View File
@@ -1,41 +0,0 @@
name: Ubuntu 24.04 CI (GCC 13) With Memory Sanitizer
on: [push, pull_request]
jobs:
ubuntu-build-address-sanitizer:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Use cmake with address sanitizer
run: |
mkdir builddebug &&
cd builddebug &&
cmake -DSIMDJSON_SANITIZE=ON -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j
ubuntu-build-undefined-sanitizer:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: Use cmake with undefined sanitizer
run: |
mkdir builddebugundefsani &&
cd builddebugundefsani &&
cmake -DSIMDJSON_SANITIZE_UNDEFINED=ON -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=OFF .. &&
cmake --build . &&
ctest --output-on-failure -LE explicitonly -j
-25
View File
@@ -1,25 +0,0 @@
name: Ubuntu 24.04 CI
on: [push, pull_request]
jobs:
ubuntu-build:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04
strategy:
matrix:
shared: [ON, OFF]
cxx: [g++-13, clang++-16]
sanitizer: [ON, OFF]
build_type: [RelWithDebInfo, Debug, Release]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Prepare
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_SANITIZE=${{matrix.sanitizer}} -DBUILD_SHARED_LIBS=${{matrix.shared}} -B build
env:
CXX: ${{matrix.cxx}}
- name: Build
run: cmake --build build -j=2
- name: Test
run: ctest --output-on-failure --test-dir build
-21
View File
@@ -1,21 +0,0 @@
name: VS17-ARM-CI
on: [push, pull_request]
jobs:
ci:
name: windows-vs17
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- {arch: ARM64}
- {arch: ARM64EC}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Use cmake
run: |
cmake -A ${{ matrix.arch }} -DCMAKE_SYSTEM_VERSION="10.0.22621.0" -DCMAKE_CROSSCOMPILING=1 -DSIMDJSON_DEVELOPER_MODE=ON -D SIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_EXCEPTIONS=OFF -B build &&
cmake --build build --verbose
-44
View File
@@ -1,44 +0,0 @@
name: VS17-CI CXX20
on: [push, pull_request]
jobs:
ci:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
name: windows-vs17
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- {gen: Visual Studio 17 2022, arch: Win32, shared: ON}
- {gen: Visual Studio 17 2022, arch: Win32, shared: OFF}
- {gen: Visual Studio 17 2022, arch: x64, shared: ON}
- {gen: Visual Studio 17 2022, arch: x64, shared: OFF}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Configure
run: |
cmake -DSIMDJSON_CXX_STANDARD=20 -G "${{matrix.gen}}" -A ${{matrix.arch}} -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -DBUILD_SHARED_LIBS=${{matrix.shared}} -B build
- name: Build Debug
run: cmake --build build --config Debug --verbose
- name: Build Release
run: cmake --build build --config Release --verbose
- name: Run Release tests
run: |
cd build
ctest -C Release -LE explicitonly --output-on-failure
- name: Run Debug tests
run: |
cd build
ctest -C Debug -LE explicitonly --output-on-failure
- name: Install
run: |
cmake --install build --config Release
- name: Test Installation
run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -B build_install_test tests/installation_tests/find
cmake --build build_install_test --config Release
-30
View File
@@ -1,30 +0,0 @@
name: VS17-CI-SANITIZE
on: [push, pull_request]
jobs:
ci:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
name: windows-vs17
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- {gen: Visual Studio 17 2022, arch: x64, shared: OFF, build_type: Debug}
- {gen: Visual Studio 17 2022, arch: x64, shared: OFF, build_type: Release}
- {gen: Visual Studio 17 2022, arch: x64, shared: OFF, build_type: RelWithDebInfo}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Configure
run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -DSANITIZE=ON -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -DBUILD_SHARED_LIBS=${{matrix.shared}} -B build
- name: Build
run: cmake --build build --config ${{matrix.build_type}} --verbose
- name: Run tests
run: |
cd build
ctest -C ${{matrix.build_type}} -LE explicitonly --output-on-failure
-40
View File
@@ -1,40 +0,0 @@
name: VS17-CI
on: [push, pull_request]
jobs:
ci:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
name: windows-vs17
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- {gen: Visual Studio 17 2022, arch: Win32, shared: ON, build_type: Release}
- {gen: Visual Studio 17 2022, arch: Win32, shared: OFF, build_type: Release}
- {gen: Visual Studio 17 2022, arch: x64, shared: ON, build_type: Release}
- {gen: Visual Studio 17 2022, arch: x64, shared: OFF, build_type: Debug}
- {gen: Visual Studio 17 2022, arch: x64, shared: OFF, build_type: Release}
- {gen: Visual Studio 17 2022, arch: x64, shared: OFF, build_type: RelWithDebInfo}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Configure
run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -DBUILD_SHARED_LIBS=${{matrix.shared}} -B build
- name: Build Debug
run: cmake --build build --config ${{matrix.build_type}} --verbose
- name: Run tests
run: |
cd build
ctest -C ${{matrix.build_type}} -LE explicitonly --output-on-failure
- name: Install
run: |
cmake --install build --config ${{matrix.build_type}}
- name: Test Installation
run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -B build_install_test tests/installation_tests/find
cmake --build build_install_test --config ${{matrix.build_type}}
-37
View File
@@ -1,37 +0,0 @@
name: VS17-CLANG-CI
on: [push, pull_request]
jobs:
ci:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
name: windows-vs17
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- {gen: Visual Studio 17 2022, arch: x64, build_type: Debug}
- {gen: Visual Studio 17 2022, arch: x64, build_type: Release}
- {gen: Visual Studio 17 2022, arch: x64, build_type: RelWithDebInfo}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Configure
run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -T ClangCL -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -B build
- name: Build
run: cmake --build build --config ${{matrix.build_type}} --verbose
- name: Run tests
run: |
cd build
ctest -C ${{matrix.build_type}} -LE explicitonly --output-on-failure
- name: Install
run: |
cmake --install build --config ${{matrix.build_type}}
- name: Test Installation
run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -B build_install_test tests/installation_tests/find
cmake --build build_install_test --config ${{matrix.build_type}}
-37
View File
@@ -1,37 +0,0 @@
name: VS17-CLANG-CI
on: [push, pull_request]
jobs:
ci:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
name: windows-vs17
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- {gen: Visual Studio 17 2022, arch: x64, build_type: Debug}
- {gen: Visual Studio 17 2022, arch: x64, build_type: Release}
- {gen: Visual Studio 17 2022, arch: x64, build_type: RelWithDebInfo}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Configure
run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -T ClangCL -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -B build
- name: Build
run: cmake --build build --config ${{matrix.build_type}} --verbose
- name: Run tests
run: |
cd build
ctest -C ${{matrix.build_type}} -LE explicitonly --output-on-failure
- name: Install
run: |
cmake --install build --config ${{matrix.build_type}}
- name: Test Installation
run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -B build_install_test tests/installation_tests/find
cmake --build build_install_test --config ${{matrix.build_type}}
-30
View File
@@ -1,30 +0,0 @@
name: VS17-NoExcept-CI
on: [push, pull_request]
jobs:
ci:
name: windows-vs17
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- name: 'Run CMake with VS17'
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildDirectory: "${{ github.workspace }}/../../_temp/windows"
cmakeBuildType: Release
buildWithCMake: true
cmakeGenerator: VS16Win64
cmakeAppendedArgs: -DSIMDJSON_COMPETITION=OFF -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_EXCEPTIONS=OFF
buildWithCMakeArgs: --config Release
- name: 'Run CTest'
run: ctest -C Release -LE explicitonly --output-on-failure
working-directory: "${{ github.workspace }}/../../_temp/windows"
-109
View File
@@ -1,109 +0,0 @@
# eclipse project files
.cproject
.project
.settings
# emacs temp files
*~
# vim temp files
.*.swp
# XCode
^build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
*.DS_Store
# IDE specific folder for JetBrains IDEs
.idea/
cmake-build-debug/
cmake-build-release/
# Visual Studio Code artifacts
.vscode/*
.history/
# Visual Studio artifacts
/.vs/
# C/C++ build outputs
.build/
bins
gens
libs
objs
# C++ ignore from https://github.com/github/gitignore/blob/master/C%2B%2B.gitignore
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
# CMake files that may be specific to our installation
# Build outputs
/build*/
/visual_studio/
# Fuzzer outputs generated by instructions in fuzz/Fuzzing.md
/corpus.zip
/ossfuzz-out/
/out/
# Generated docs
/doc/api
*.orig
# VSCode workspace files
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# clangd
.cache
View File
-190
View File
@@ -1,190 +0,0 @@
language: cpp
dist: bionic
arch:
- ppc64le
cache:
directories:
- $HOME/.dep_cache
env:
global:
- simdjson_DEPENDENCY_CACHE_DIR=$HOME/.dep_cache
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
env:
- COMPILER="CC=gcc-8 && CXX=g++-8"
compiler: gcc-8
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
env:
- COMPILER="CC=gcc-9 && CXX=g++-9"
compiler: gcc-9
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-10
env:
- COMPILER="CC=gcc-10 && CXX=g++-10"
compiler: gcc-10
# The sanitizer runs fail systematically
# - os: linux
# addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - g++-10
# env:
# - COMPILER="CC=gcc-10 && CXX=g++-10"
# - SANITIZE="on"
# compiler: gcc-10-sanitize
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-10
env:
- COMPILER="CC=gcc-10 && CXX=g++-10"
- STATIC="on"
compiler: gcc-10-static
- os: linux
addons:
apt:
sources:
- llvm-toolchain-bionic-6.0
packages:
- clang-6.0
env:
- COMPILER="CC=clang-6.0 && CXX=clang++-6.0"
compiler: clang-6
- os: linux
addons:
apt:
sources:
- llvm-toolchain-bionic-7
packages:
- clang-7
env:
- COMPILER="CC=clang-7 && CXX=clang++-7"
compiler: clang-7
- os: linux
addons:
apt:
sources:
- llvm-toolchain-bionic-8
packages:
- clang-8
env:
- COMPILER="CC=clang-8 && CXX=clang++-8"
compiler: clang-8
- os: linux
addons:
apt:
sources:
- llvm-toolchain-bionic-9
packages:
- clang-9
env:
- COMPILER="CC=clang-9 && CXX=clang++-9"
compiler: clang-9
- os: linux
addons:
apt:
packages:
- clang-10
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
env:
- COMPILER="CC=clang-10 && CXX=clang++-10"
compiler: clang-10
- os: linux
addons:
apt:
packages:
- clang-10
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
env:
- COMPILER="CC=clang-10 && CXX=clang++-10"
- STATIC="on"
compiler: clang-10-static
# The clang sanitizer runs fail frequently at setup time
# - os: linux
# addons:
# apt:
# packages:
# - clang-10
# sources:
# - ubuntu-toolchain-r-test
# - sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
# key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
# env:
# - COMPILER="CC=clang-10 && CXX=clang++-10"
# - SANITIZE="on"
# compiler: clang-10-sanitize
before_install:
- eval "${COMPILER}"
install:
- wget -q -O - "https://raw.githubusercontent.com/simdjson/debian-ppa/master/key.gpg" | sudo apt-key add -
- sudo apt-add-repository "deb https://raw.githubusercontent.com/simdjson/debian-ppa/master simdjson main"
- sudo apt-get -qq update
- sudo apt-get purge cmake cmake-data
- sudo apt-get -t simdjson -y install cmake
- export CMAKE_CXX_FLAGS="-maltivec -mcpu=power9 -mtune=power9"
- export CMAKE_C_FLAGS="${CMAKE_CXX_FLAGS}"
- export CMAKE_FLAGS="-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} -DSIMDJSON_IMPLEMENTATION=ppc64;fallback";
- if [[ "${SANITIZE}" == "on" ]]; then
export CMAKE_FLAGS="${CMAKE_FLAGS} -DSIMDJSON_SANITIZE=ON";
export ASAN_OPTIONS="detect_leaks=0";
fi
- if [[ "${STATIC}" == "on" ]]; then
export CMAKE_FLAGS="${CMAKE_FLAGS} -DBUILD_SHARED_LIBS=OFF";
fi
- export CTEST_FLAGS="-j4 --output-on-failure -LE explicitonly"
script:
- mkdir build
- cd build
- cmake $CMAKE_FLAGS ..
- cmake --build . -- -j2
- SIMDJSON_FORCE_IMPLEMENTATION=ppc64 ctest $CTEST_FLAGS -L per_implementation
- SIMDJSON_FORCE_IMPLEMENTATION=fallback ctest $CTEST_FLAGS -L per_implementation
- ctest $CTEST_FLAGS -LE "acceptance|per_implementation"
-22
View File
@@ -1,22 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
// C++
"llvm-vs-code-extensions.vscode-clangd",
"xaver.clang-format",
// Python
"ms-python.python",
// .github/*
"github.vscode-github-actions",
// cmake
"ms-vscode.cmake-tools",
"twxs.cmake"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [
]
}
-134
View File
@@ -1,134 +0,0 @@
{
"editor.rulers": [
{"column": 95 },
{"column": 120 }
],
"cmake.configureArgs": [
"-DSIMDJSON_DEVELOPER_MODE=ON"
],
"files.trimTrailingWhitespace": true,
"files.associations": {
".clangd": "yaml",
"array": "cpp",
"iterator": "cpp",
"chrono": "cpp",
"optional": "cpp",
"__locale": "cpp",
"__tuple": "cpp",
"__bit_reference": "cpp",
"__config": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__functional_base": "cpp",
"__hash_table": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__nullptr": "cpp",
"__split_buffer": "cpp",
"__string": "cpp",
"__threading_support": "cpp",
"__tree": "cpp",
"algorithm": "cpp",
"atomic": "cpp",
"bit": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"cinttypes": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"exception": "cpp",
"forward_list": "cpp",
"fstream": "cpp",
"functional": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"list": "cpp",
"locale": "cpp",
"map": "cpp",
"memory": "cpp",
"mutex": "cpp",
"new": "cpp",
"numeric": "cpp",
"ostream": "cpp",
"random": "cpp",
"ratio": "cpp",
"regex": "cpp",
"set": "cpp",
"sstream": "cpp",
"stack": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"thread": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"utility": "cpp",
"valarray": "cpp",
"vector": "cpp",
"*.ipp": "cpp",
"__functional_base_03": "cpp",
"filesystem": "cpp",
"*.inc": "cpp",
"compare": "cpp",
"concepts": "cpp",
"variant": "cpp",
"__bits": "cpp",
"csignal": "cpp",
"future": "cpp",
"queue": "cpp",
"shared_mutex": "cpp",
"ranges": "cpp",
"span": "cpp",
"__verbose_abort": "cpp",
"charconv": "cpp",
"source_location": "cpp",
"strstream": "cpp",
"typeindex": "cpp",
"*.tcc": "cpp",
"memory_resource": "cpp",
"numbers": "cpp",
"semaphore": "cpp",
"stop_token": "cpp",
"cfenv": "cpp",
"format": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xutility": "cpp",
"coroutine": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xmemory": "cpp",
"xstring": "cpp",
"xtr1common": "cpp",
"xtree": "cpp"
}
}
-56
View File
@@ -1,56 +0,0 @@
# AI Usage Policy
Contributors can use whatever tools they would like to
craft their contributions, but there must be a **human in the loop**.
**Contributors must read and review all LLM-generated code or text before they
ask other project members to review it.** The contributor is always the author
and is fully accountable for their contributions. Contributors should be
sufficiently confident that the contribution is high enough quality that asking
for a review is a good use of scarce maintainer time, and they should be **able
to answer questions about their work** during review.
We expect that new contributors will be less confident in their contributions,
and our guidance to them is to **start with small contributions** that they can
fully understand to build confidence. We aspire to be a welcoming community
that helps new contributors grow their expertise, but learning involves taking
small steps, getting feedback, and iterating. Passing maintainer feedback to an
LLM doesn't help anyone grow, and does not sustain our community.
This policy includes, but is not limited to, the following kinds of
contributions:
- Code, usually in the form of a pull request
- Issues or security vulnerabilities
- Comments and feedback on pull requests
## Extractive Contributions
The reason for our "human-in-the-loop" contribution policy is that processing
patches, PRs, RFCs, and comments is not free -- it takes a lot of
maintainer time and energy to review those contributions! Sending the
unreviewed output of an LLM to open source project maintainers *extracts* work
from them in the form of design and code review, so we call this kind of
contribution an "extractive contribution".
## Transparency
For contributions involving significant AI assistance, we encourage you to disclose
its use and explain your process. If a submission appears to rely heavily on AI
without disclosure, we may doubt that the **human-in-the-loop** requirement has
been met. Please show awareness of your use of AI.
## Copyright
Artificial intelligence systems raise many questions around copyright that have
yet to be answered. Our policy on AI tools is similar to our copyright policy:
Contributors are responsible for ensuring that they have the right to
contribute code under the terms of our license, typically meaning that either
they, their employer, or their collaborators hold the copyright. Using AI tools
to regenerate copyrighted material does not remove the copyright, and
contributors are responsible for ensuring that such material does not appear in
their contributions. Contributions found to violate this policy will be removed
just like any other offending contribution.
## Reference
- [LLVM AI Tool Use Policy](https://discourse.llvm.org/t/rfc-llvm-ai-tool-policy-human-in-the-loop/89159)
-4
View File
@@ -1,4 +0,0 @@
# List of authors for copyright purposes, in no particular order
Daniel Lemire
Geoff Langdale
John Keiser
-448
View File
@@ -1,448 +0,0 @@
cmake_minimum_required(VERSION 3.14)
# Build performance optimizations
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Export compile commands for faster IDE integration")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Enable parallel compilation on MSVC
if(MSVC)
add_compile_options(/MP)
endif()
project(
simdjson
# The version number is modified by tools/release.py
VERSION 4.6.2
DESCRIPTION "Parsing gigabytes of JSON per second"
HOMEPAGE_URL "https://simdjson.org/"
LANGUAGES CXX C
)
set(SIMDJSON_GITHUB_REPOSITORY "https://github.com/simdjson/simdjson")
string(
COMPARE EQUAL
"${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}"
is_top_project
)
# ---- Options, variables ----
# These version numbers are modified by tools/release.py
set(SIMDJSON_LIB_VERSION "33.0.0" CACHE STRING "simdjson library version")
set(SIMDJSON_LIB_SOVERSION "33" CACHE STRING "simdjson library soversion")
option(SIMDJSON_BUILD_STATIC_LIB "Build simdjson_static library along with simdjson (only makes sense if BUILD_SHARED_LIBS=ON)" OFF)
if(SIMDJSON_BUILD_STATIC_LIB AND NOT BUILD_SHARED_LIBS)
message(WARNING "SIMDJSON_BUILD_STATIC_LIB only makes sense if BUILD_SHARED_LIBS is set to ON")
message(WARNING "You might be building and installing a two identical static libraries.")
endif()
option(SIMDJSON_ENABLE_THREADS "Link with thread support" ON)
include(cmake/simdjson-props.cmake)
include(cmake/implementation-flags.cmake)
include(cmake/exception-flags.cmake)
option(SIMDJSON_DISABLE_DEPRECATED_API "Disables deprecated APIs" OFF)
if(SIMDJSON_DISABLE_DEPRECATED_API)
simdjson_add_props(
target_compile_definitions PUBLIC
SIMDJSON_DISABLE_DEPRECATED_API=1
)
endif()
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.25.0")
option(SIMDJSON_STATIC_REFLECTION "Enables static reflection (experimental), requires C++26" OFF)
else()
set(SIMDJSON_STATIC_REFLECTION OFF CACHE BOOL "Enables static reflection (experimental)" FORCE)
message(WARNING "SIMDJSON_STATIC_REFLECTION is disabled because your CMake version is below 3.25")
endif()
if(SIMDJSON_STATIC_REFLECTION)
simdjson_add_props(
target_compile_definitions PUBLIC
SIMDJSON_STATIC_REFLECTION=1
)
endif()
option(SIMDJSON_DEVELOPMENT_CHECKS "Enable development-time aids, such as \
checks for incorrect API usage. Enabled by default in DEBUG." OFF)
if(SIMDJSON_DEVELOPMENT_CHECKS)
simdjson_add_props(
target_compile_definitions PUBLIC
SIMDJSON_DEVELOPMENT_CHECKS
)
endif()
if(is_top_project)
option(SIMDJSON_INSTALL "Enable target install" ON)
option(SIMDJSON_DEVELOPER_MODE "Enable targets for developing simdjson" OFF)
option(BUILD_SHARED_LIBS "Build simdjson as a shared library" OFF)
option(SIMDJSON_SINGLEHEADER "Disable singleheader generation" ON)
else()
option(SIMDJSON_INSTALL "Enable target install" ${BUILD_SHARED_LIBS})
endif()
include(cmake/handle-deprecations.cmake)
include(cmake/developer-options.cmake)
# ---- simdjson library ----
set(SIMDJSON_SOURCES src/simdjson.cpp)
add_library(simdjson ${SIMDJSON_SOURCES})
add_library(simdjson::simdjson ALIAS simdjson)
set(SIMDJSON_LIBRARIES simdjson)
# Check for <bit> header compatibility
include(CheckIncludeFileCXX)
check_include_file_cxx(bit SIMDJSON_HAS_BIT_HEADER)
# Enable precompiled headers for faster builds
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16")
set(SIMDJSON_PRECOMPILE_HEADERS
<algorithm>
<array>
<atomic>
<cassert>
<cctype>
<cerrno>
<cstddef>
<cstdint>
<cstdlib>
<cstring>
<memory>
<string>
<utility>
<vector>
)
if(SIMDJSON_HAS_BIT_HEADER)
list(APPEND SIMDJSON_PRECOMPILE_HEADERS <bit>)
endif()
target_precompile_headers(simdjson PRIVATE ${SIMDJSON_PRECOMPILE_HEADERS})
endif()
if(SIMDJSON_BUILD_STATIC_LIB)
add_library(simdjson_static STATIC ${SIMDJSON_SOURCES})
add_library(simdjson::simdjson_static ALIAS simdjson_static)
list(APPEND SIMDJSON_LIBRARIES simdjson_static)
# Reuse precompiled headers for static library
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16")
target_precompile_headers(simdjson_static REUSE_FROM simdjson)
endif()
endif()
set_target_properties(
simdjson PROPERTIES
VERSION "${SIMDJSON_LIB_VERSION}"
SOVERSION "${SIMDJSON_LIB_SOVERSION}"
# FIXME: symbols should be hidden by default
WINDOWS_EXPORT_ALL_SYMBOLS YES
)
# FIXME: Use proper CMake integration for exports
if(WIN32 AND BUILD_SHARED_LIBS)
target_compile_definitions(
simdjson
PRIVATE SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY=1
INTERFACE SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY=1
)
endif()
simdjson_add_props(
target_include_directories
PUBLIC "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
PRIVATE "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>"
)
# Optimize linker settings for faster builds
if(MSVC)
target_link_options(simdjson PRIVATE /INCREMENTAL)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_options(simdjson PRIVATE /DEBUG:FASTLINK)
endif()
endif()
if(SIMDJSON_STATIC_REFLECTION)
# We would like to require C++26, but no compiler supports that!
# This is a hack:
simdjson_add_props(
target_compile_options PUBLIC
-freflection -fexpansion-statements -stdlib=libc++ -std=c++26
)
else()
simdjson_add_props(target_compile_features PUBLIC cxx_std_11)
endif()
# workaround for GNU GCC poor AVX load/store code generation
if(
CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86(_64)?)$"
)
simdjson_add_props(
target_compile_options PRIVATE
-mno-avx256-split-unaligned-load -mno-avx256-split-unaligned-store
)
endif()
option(SIMDJSON_MINUS_ZERO_AS_FLOAT "Treat -0 as a floating-point value" OFF)
if(SIMDJSON_MINUS_ZERO_AS_FLOAT)
simdjson_add_props(target_compile_definitions PRIVATE SIMDJSON_MINUS_ZERO_AS_FLOAT=1)
endif(SIMDJSON_MINUS_ZERO_AS_FLOAT)
# GCC and Clang have horrendous Debug builds when using SIMD.
# A common fix is to use '-Og' instead.
# bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
if(
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR
CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
)
message(STATUS "Adding -Og to compile flag")
simdjson_add_props(
target_compile_options PRIVATE
$<$<CONFIG:DEBUG>:-Og>
)
# We still want to enable development checks in Debug mode
simdjson_add_props(
target_compile_definitions PUBLIC
SIMDJSON_DEVELOPMENT_CHECKS
)
endif()
if(SIMDJSON_ENABLE_THREADS)
find_package(Threads REQUIRED)
simdjson_add_props(target_link_libraries PUBLIC Threads::Threads)
simdjson_add_props(target_compile_definitions PUBLIC SIMDJSON_THREADS_ENABLED=1)
endif()
simdjson_apply_props(simdjson)
if(SIMDJSON_BUILD_STATIC_LIB)
simdjson_apply_props(simdjson_static)
endif()
# ---- Install rules ----
if(SIMDJSON_INSTALL)
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
if(SIMDJSON_SINGLEHEADER)
install(
FILES singleheader/simdjson.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
COMPONENT simdjson_Development
)
endif()
install(
TARGETS simdjson
EXPORT simdjsonTargets
RUNTIME COMPONENT simdjson_Runtime
LIBRARY COMPONENT simdjson_Runtime
NAMELINK_COMPONENT simdjson_Development
ARCHIVE COMPONENT simdjson_Development
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
configure_file(cmake/simdjson-config.cmake.in simdjson-config.cmake @ONLY)
write_basic_package_version_file(
simdjson-config-version.cmake
COMPATIBILITY SameMinorVersion
)
set(
SIMDJSON_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/simdjson"
CACHE STRING "CMake package config location relative to the install prefix"
)
mark_as_advanced(SIMDJSON_INSTALL_CMAKEDIR)
install(
FILES
"${PROJECT_BINARY_DIR}/simdjson-config.cmake"
"${PROJECT_BINARY_DIR}/simdjson-config-version.cmake"
DESTINATION "${SIMDJSON_INSTALL_CMAKEDIR}"
COMPONENT simdjson_Development
)
install(
EXPORT simdjsonTargets
NAMESPACE simdjson::
DESTINATION "${SIMDJSON_INSTALL_CMAKEDIR}"
COMPONENT simdjson_Development
)
if(SIMDJSON_BUILD_STATIC_LIB)
install(
TARGETS simdjson_static
EXPORT simdjson_staticTargets
ARCHIVE COMPONENT simdjson_Development
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
install(
EXPORT simdjson_staticTargets
NAMESPACE simdjson::
DESTINATION "${SIMDJSON_INSTALL_CMAKEDIR}"
COMPONENT simdjson_Development
)
endif()
# pkg-config
include(cmake/JoinPaths.cmake)
join_paths(PKGCONFIG_INCLUDEDIR "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
join_paths(PKGCONFIG_LIBDIR "\${prefix}" "${CMAKE_INSTALL_LIBDIR}")
if(SIMDJSON_ENABLE_THREADS)
set(PKGCONFIG_CFLAGS "-DSIMDJSON_THREADS_ENABLED=1")
if(CMAKE_THREAD_LIBS_INIT)
set(PKGCONFIG_LIBS_PRIVATE "Libs.private: ${CMAKE_THREAD_LIBS_INIT}")
endif()
endif()
configure_file("simdjson.pc.in" "simdjson.pc" @ONLY)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/simdjson.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
)
endif()
#
# CPack
#
if(is_top_project)
set(CPACK_PACKAGE_VENDOR "Daniel Lemire")
set(CPACK_PACKAGE_CONTACT "lemire@gmail.com")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README.md")
set(CPACK_RPM_PACKAGE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
include(CPack)
endif()
# ---- Developer mode extras ----
if(is_top_project AND NOT SIMDJSON_DEVELOPER_MODE)
message(STATUS "Building only the library. Advanced users and contributors may want to turn SIMDJSON_DEVELOPER_MODE to ON, e.g., via -D SIMDJSON_DEVELOPER_MODE=ON.")
elseif(SIMDJSON_DEVELOPER_MODE AND NOT is_top_project)
message(AUTHOR_WARNING "Developer mode in simdjson is intended for the developers of simdjson")
endif()
if(NOT SIMDJSON_DEVELOPER_MODE)
return()
endif()
simdjson_apply_props(simdjson-internal-flags)
set(
SIMDJSON_USER_CMAKECACHE
"${CMAKE_BINARY_DIR}/.simdjson-user-CMakeCache.txt"
)
add_custom_target(
simdjson-user-cmakecache
COMMAND "${CMAKE_COMMAND}"
-D "BINARY_DIR=${CMAKE_BINARY_DIR}"
-D "USER_CMAKECACHE=${SIMDJSON_USER_CMAKECACHE}"
-P "${PROJECT_SOURCE_DIR}/cmake/simdjson-user-cmakecache.cmake"
VERBATIM
)
# Setup tests
enable_testing()
# So we can build just tests with "make all_tests"
add_custom_target(all_tests)
add_subdirectory(windows)
include(cmake/CPM.cmake)
add_subdirectory(dependencies) ## This needs to be before tools because of cxxopts
add_subdirectory(tools) ## This needs to be before tests because of cxxopts
# Data: jsonexamples is left with only the bare essential.
# most of the data has been moved to https://github.com/simdjson/simdjson-data
add_subdirectory(jsonexamples)
if(SIMDJSON_SINGLEHEADER)
add_subdirectory(singleheader)
endif()
#
# Compile tools / tests / benchmarks
#
add_subdirectory(tests)
add_subdirectory(examples)
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # we only include the benchmarks on 64-bit systems.
add_subdirectory(benchmark)
endif()
add_subdirectory(fuzz)
#
# Source files should be just ASCII
#
find_program(FIND find)
find_program(FILE file)
find_program(GREP grep)
if(FIND AND FILE AND GREP)
add_test(
NAME just_ascii
COMMAND sh -c "\
${FIND} include src windows tools singleheader tests examples benchmark \
-path benchmark/checkperf-reference -prune -name '*.h' -o -name '*.cpp' \
-type f -exec ${FILE} '{}' \; | ${GREP} -qv ASCII || exit 0 && exit 1"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
)
endif()
##
## In systems like R, libraries must not use stderr or abort to be acceptable.
## Thus we make it a hard rule that one is not allowed to call abort or stderr.
## The sanitized builds are allowed to abort.
##
if(NOT SIMDJSON_SANITIZE)
find_program(GREP grep)
find_program(NM nm)
if((NOT GREP) OR (NOT NM))
message("grep and nm are unavailable on this system.")
else()
add_test(
NAME "avoid_abort"
# Under FreeBSD, the __cxa_guard_abort symbol may appear but it is fine.
# So we want to look for <space><possibly _>abort as a test.
COMMAND sh -c "${NM} $<TARGET_FILE_NAME:simdjson> | ${GREP} ' _*abort' || exit 0 && exit 1"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
add_test(
NAME "avoid_cout"
COMMAND sh -c "${NM} $<TARGET_FILE_NAME:simdjson> | ${GREP} ' _*cout' || exit 0 && exit 1"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
add_test(
NAME "avoid_cerr"
COMMAND sh -c "${NM} $<TARGET_FILE_NAME:simdjson> | ${GREP} ' _*cerr' || exit 0 && exit 1"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
add_test(
NAME "avoid_printf"
COMMAND sh -c "${NM} $<TARGET_FILE_NAME:simdjson> | ${GREP} ' _*printf' || exit 0 && exit 1"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
add_test(
NAME "avoid_stdout"
COMMAND sh -c "${NM} $<TARGET_FILE_NAME:simdjson> | ${GREP} stdout || exit 0 && exit 1"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
add_test(
NAME "avoid_stderr"
COMMAND sh -c "${NM} $<TARGET_FILE_NAME:simdjson> | ${GREP} stderr || exit 0 && exit 1"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
endif()
endif()
-110
View File
@@ -1,110 +0,0 @@
Contributing
============
The simdjson library is an open project written in C++. Contributions are invited. Contributors
agree to the project's license.
We have an extensive list of issues, and contributions toward any of these issues is invited.
Contributions can take the form of code samples, better documentation or design ideas.
In particular, the following contributions are invited:
- The library is focused on performance. Well-documented performance optimization are invited.
- Fixes to known or newly discovered bugs are always welcome. Typically, a bug fix should come with
a test demonstrating that the bug has been fixed.
- The simdjson library is advanced software and maintainability and flexibility are always a
concern. Specific contributions to improve maintainability and flexibility are invited.
We discourage the following types of contributions:
- Code refactoring. We all have our preferences as to how code should be written, but unnecessary
refactoring can waste time and introduce new bugs. If you believe that refactoring is needed, you
first must explain how it helps in concrete terms. Does it improve the performance?
- Applications of new language features for their own sake. Using advanced C++ language constructs
is actually a negative as it may reduce portability (to old compilers, old standard libraries and
systems) and reduce accessibility (to programmers that have not kept up), so it must be offsetted
by clear gains like performance or maintainability. When in doubt, avoid advanced C++ features
(beyond C++11).
- Style formatting. In general, please abstain from reformatting code just to make it look prettier.
Though code formatting is important, it can also be a waste of time if several contributors try to
tweak the code base toward their own preference. Please do not introduce unneeded white-space
changes.
In short, most code changes should either bring new features or better performance. We want to avoid unmotivated code changes.
Specific rules
----------
We have few hard rules, but we have some:
- Printing to standard output or standard error (`stderr`, `stdout`, `std::cerr`, `std::cout`) in the core library is forbidden. This follows from the [Writing R Extensions](https://cran.r-project.org/doc/manuals/R-exts.html) manual which states that "Compiled code should not write to stdout or stderr".
- Calls to `abort()` are forbidden in the core library. This follows from the [Writing R Extensions](https://cran.r-project.org/doc/manuals/R-exts.html) manual which states that "Under no circumstances should your compiled code ever call abort or exit".
- All source code files (.h, .cpp) must be ASCII.
- All C macros introduced in public headers need to be prefixed with either `SIMDJSON_` or `simdjson_`.
- We avoid trailing white space characters within lines. That is, your lines of code should not terminate with unnecessary spaces. Generally, please avoid making unnecessary changes to white-space characters when contributing code.
Tools, tests and benchmarks are not held to these same strict rules.
General Guidelines
----------
Contributors are encouraged to :
- Document their changes. Though we do not enforce a rule regarding code comments, we prefer that non-trivial algorithms and techniques be somewhat documented in the code.
- Follow as much as possible the existing code style. We do not enforce a specific code style, but we prefer consistency. We avoid contractions (isn't, aren't) in the comments.
- Modify as few lines of code as possible when working on an issue. The more lines you modify, the harder it is for your fellow human beings to understand what is going on.
- Tools may report "problems" with the code, but we never delegate programming to tools: if there is a problem with the code, we need to understand it. Thus we will not "fix" code merely to please a static analyzer.
- Provide tests for any new feature. We will not merge a new feature without tests.
- Run before/after benchmarks so that we can appreciate the effect of the changes on the performance.
Pull Requests
--------------
Pull requests are always invited. However, we ask that you follow these guidelines:
- It is wise to discuss your ideas first as part of an issue before you start coding. If you omit this step and code first, be prepared to have your code receive scrutiny and be dropped.
- Users should provide a rationale for their changes. Does it improve performance? Does it add a feature? Does it improve maintainability? Does it fix a bug? This must be explicitly stated as part of the pull request. Do not propose changes based on taste or intuition. We do not delegate programming to tools: that some tool suggested a code change is not reason enough to change the code.
1. When your code improves performance, please document the gains with a benchmark using hard numbers.
2. If your code fixes a bug, please either fix a failing test, or propose a new test.
3. Other types of changes must be clearly motivated. We openly discourage changes with no identifiable benefits.
- Changes should be focused and minimal. You should change as few lines of code as possible. Please do not reformat or touch files needlessly.
- New features must be accompanied by new tests, in general.
- Your code should pass our continuous-integration tests. It is your responsibility to ensure that your proposal pass the tests. We do not merge pull requests that would break our build.
- An exception to this would be changes to non-code files, such as documentation and assets, or trivial changes to code, such as comments, where it is encouraged to explicitly ask for skipping a CI run using the `[skip ci]` prefix in your Pull Request title **and** in the first line of the most recent commit in a push. Example for such a commit: `[skip ci] Fixed typo in power_of_ten's docs`
This benefits the project in such a way that the CI pipeline is not burdened by running jobs on changes that don't change any behavior in the code, which reduces wait times for other Pull Requests that do change behavior and require testing.
If the benefits of your proposed code remain unclear, we may choose to discard your code: that is not an insult, we frequently discard our own code. We may also consider various alternatives and choose another path. Again, that is not an insult or a sign that you have wasted your time.
Style
-----
Our formatting style is inspired by the LLVM style.
The simdjson library is written using the snake case: when a variable or a function is a phrase, each space is replaced by an underscore character, and the first letter of each word written in lowercase. Compile-time constants are written entirely in uppercase with the same underscore convention.
Code of Conduct
---------------
Though we do not have a formal code of conduct, we will not tolerate bullying, bigotry or
intimidation. Everyone is welcome to contribute. If you have concerns, you can raise them privately with the core team members (e.g., D. Lemire, J. Keiser).
We welcome contributions from women and less represented groups. If you need help, please reach out.
Consider the following points when engaging with the project:
- We discourage arguments from authority: ideas are discussed on their own merits and not based on who stated it.
- Be mindful that what you may view as an aggression is maybe merely a difference of opinion or a misunderstanding.
- Be mindful that a collection of small aggressions, even if mild in isolation, can become harmful.
Getting Started Hacking
-----------------------
An overview of simdjson's directory structure, with pointers to architecture and design
considerations and other helpful notes, can be found at [HACKING.md](HACKING.md).
AI Usage Policy
---------------
Please also review our [AI Usage Policy](AI_USAGE_POLICY.md).
-45
View File
@@ -1,45 +0,0 @@
# contributors (in no particular order)
Thomas Navennec
Kai Wolf
Tyler Kennedy
Frank Wessels
George Fotopoulos
Heinz N. Gies
Emil Gedda
Wojciech Muła
Georgios Floros
Dong Xie
Nan Xiao
Egor Bogatov
Jinxi Wang
Luiz Fernando Peres
Wouter Bolsterlee
Anish Karandikar
Reini Urban
Tom Dyson
Ihor Dotsenko
Alexey Milovidov
Chang Liu
Sunny Gleason
John Keiser
Zach Bjornson
Vitaly Baranov
Juho Lauri
Michael Eisel
Io Daza Dillon
Paul Dreik
Jeremie Piotte
Matthew Wilson
Dušan Jovanović
Matjaž Ostroveršnik
Nong Li
Furkan Taşkale
Brendan Knapp
Danila Kutenin
Pavel Pavlov
Hao Chen
Nicolas Boyer
Kim Walisch and Jatin Bhateja (AVX-512 bitset decoder)
Fangzheng Zhang and Weiqiang Wan (AVX-512 kernel)
# if you have contributed to the project and your name does not
# appear in this list, please let us know!
-2584
View File
File diff suppressed because it is too large Load Diff
-395
View File
@@ -1,395 +0,0 @@
Hacking simdjson
================
Here is wisdom about how to build, test and run simdjson from within the repository. This is mostly useful for people who plan to contribute simdjson, or maybe study the design.
If you plan to contribute to simdjson, please read our [CONTRIBUTING](https://github.com/simdjson/simdjson/blob/master/CONTRIBUTING.md) guide.
- [Hacking simdjson](#hacking-simdjson)
- [Build Quickstart](#build-quickstart)
- [Design notes](#design-notes)
- [Developer mode](#developer-mode)
- [Directory Structure and Source](#directory-structure-and-source)
- [Runtime Dispatching](#runtime-dispatching)
- [Regenerating Single-Header Files](#regenerating-single-header-files)
- [Usage (CMake on 64-bit platforms like Linux, FreeBSD or macOS)](#usage-cmake-on-64-bit-platforms-like-linux-freebsd-or-macos)
- [Usage (CMake on 64-bit Windows using Visual Studio 2019 or better)](#usage-cmake-on-64-bit-windows-using-visual-studio-2019-or-better)
- [Various References](#various-references)
Build Quickstart
------------------------------
For non-Windows system,
```bash
cmake -B -D SIMDJSON_DEVELOPER_MODE=ON ..
cmake --build build
ctest --test-dir build
```
It is similar for Visual Studio users, please see the CMake or Visual Studio documentation.
By default the library is built in Release mode.
Assertions and development checks
------------------------------
We do not use conventional `assert` in simdjson. Instead we use the macro
`SIMDJSON_ASSUME`:
```cpp
SIMDJSON_ASSUME(something_that_is_true());
```
Sometimes, you need to do a bit more work that a simple check.
The `SIMDJSON_DEVELOPMENT_CHECKS` macro is true only in Debug mode unless manually set.
It is acceptable to add checks that you would not do in Release mode as long as
they are guarded:
```cpp
#if SIMDJSON_DEVELOPMENT_CHECKS
// do sanity checks here
```
Working with sanitizers
------------------------------
The simdjson library must be memory-safe. We cannot allow buffer overruns.
During development, if you system supports it, we recommend configuring
the project with `-D SIMDJSON_SANITIZE=ON`.
```bash
cmake -B -D SIMDJSON_SANITIZE=ON -D SIMDJSON_DEVELOPER_MODE=ON ..
cmake --build build
ctest --test-dir build
```
Design notes
------------------------------
The parser works in two stages:
- Stage 1. (Find marks) Identifies quickly structure elements, strings, and so forth. We validate UTF-8 encoding at that stage.
- Stage 2. (Structure building) Involves constructing a "tree" of sort (materialized as a tape) to navigate through the data. Strings and numbers are parsed at this stage.
The role of stage 1 is to identify pseudo-structural characters as quickly as possible. A character is pseudo-structural if and only if:
1. Not enclosed in quotes, AND
2. Is a non-whitespace character, AND
3. Its preceding character is either:
(a) a structural character, OR
(b) whitespace OR
(c) the final quote in a string.
This helps as we redefine some new characters as pseudo-structural such as the characters 1, G, n in the following:
> { "foo" : 1.5, "bar" : 1.5 GEOFF_IS_A_DUMMY bla bla , "baz", null }
Stage 1 also does unicode validation.
Stage 2 handles all of the rest: number parsings, recognizing atoms like true, false, null, and so forth.
Developer mode
--------------
Build system targets that are only useful for developers of the simdjson
library are behind the `SIMDJSON_DEVELOPER_MODE` option. Enabling this option
makes tests, examples, benchmarks and other developer targets available. Not
enabling this option means that you are a consumer of simdjson and thus you
only get the library targets and options.
Developer mode is forced to be on when the `CI` environment variable is set to
a value that CMake recognizes as "on", which is set to `true` in all of the CI
workflows used by simdjson.
Directory Structure and Source
------------------------------
Before diving into the directory structure, here are key concepts used in the codebase:
- **Amalgamated File**: A file that is conditionally included in the amalgamation process. These are wrapped in `#ifndef SIMDJSON_CONDITIONAL_INCLUDE` blocks and are included based on the target implementation (e.g., ARM64, x86). They include implementation-specific files (e.g., `arm64.h`) and generic files (e.g., under `generic/`). Amalgamated files have associated dependency files (`dependencies.h`) to track includes.
- **Amalgamator File**: A file that orchestrates the inclusion of amalgamated files. Examples: `arm64.h`, `arm64/implementation.h`, `generic/amalgamated.h`. These are not themselves amalgamated but control conditional inclusions.
- **Free Dependency File**: A top-level header that is always included unconditionally. These do not have dependency files and represent the public API (e.g., main headers).
- **Implementation-Specific File**: A file tied to a specific CPU architecture or instruction set (e.g., `arm64/`, `haswell/`). These must be amalgamated.
- **Generic File**: A shared file (under `generic/` or `simdjson/generic/`) that contains common code included once per implementation.
- **Builtin File**: Special files under `simdjson/builtin/` that handle the builtin implementation, a fallback/default implementation used when no optimized implementation is available.
- **Conditional Include Block**: A section wrapped in `#ifndef SIMDJSON_CONDITIONAL_INCLUDE` for editor-only or implementation-specific content.
The script `singleheader/amalgation_helper.py` will generate an HTML report which you can use to visualize the status of each file.
simdjson's source structure, from the top level, looks like this:
* **CMakeLists.txt:** The main build system.
* **include:** User-facing declarations and inline definitions (most user-facing functions are inlined).
* simdjson.h: the `simdjson` namespace. A "main include" that includes files from include/simdjson/. This is equivalent to
the distributed simdjson.h.
* simdjson/*.h: Declarations for public simdjson classes and functions.
* simdjson/*-inl.h: Definitions for public simdjson classes and functions.
* simdjson/internal/*.h: the `simdjson::internal` namespace. Private classes and functions used by the rest of simdjson.
* simdjson/dom.h: the `simdjson::dom` namespace. Includes all public DOM classes.
* simdjson/dom/*.h: Declarations/definitions for individual DOM classes.
* simdjson/arm64|fallback|haswell|icelake|ppc64|westmere.h: `simdjson::<implementation>` namespace. Common implementation-specific tools like number and string parsing, as well as minification.
* simdjson/arm64|fallback|haswell|icelake|ppc64|westmere/*.h: implementation-specific functions such as , etc.
* simdjson/generic/*.h: the bulk of the actual code, written generically and compiled for each implementation, using functions defined in the implementation's .h files.
* simdjson/generic/dependencies.h: dependencies on common, non-implementation-specific simdjson classes. This will be included before including amalgamated.h.
* simdjson/generic/amalgamated.h: all generic ondemand classes for an implementation.
* simdjson/ondemand.h: the `simdjson::ondemand` namespace. Includes all public ondemand classes.
* simdjson/builtin.h: the `simdjson::builtin` namespace. Aliased to the most universal implementation available.
* simdjson/builtin/ondemand.h: the `simdjson::builtin::ondemand` namespace.
* simdjson/arm64|fallback|haswell|icelake|ppc64|westmere/ondemand.h: the `simdjson::<implementation>::ondemand` namespace. On-Demand compiled for the specific implementation.
* simdjson/generic/ondemand/*.h: individual On-Demand classes, generically written.
* simdjson/generic/ondemand/dependencies.h: dependencies on common, non-implementation-specific simdjson classes. This will be included before including amalgamated.h.
* simdjson/generic/ondemand/amalgamated.h: all generic ondemand classes for an implementation.
* simdjson/builder.h: the `simdjson::builder` namespace. Includes all public builder classes.
* simdjson/builtin/builder.h: the `simdjson::builtin::builder` namespace.
* simdjson/arm64|fallback|haswell|icelake|ppc64|westmere/builder.h: the `simdjson::<implementation>::builder` namespace. Builder compiled for the specific implementation.
* simdjson/generic/builder/*.h: individual Builder classes, generically written.
* simdjson/generic/builder/dependencies.h: dependencies on common, non-implementation-specific simdjson classes. This will be included before including amalgamated.h.
* simdjson/generic/builder/amalgamated.h: all generic builder classes for an implementation.
* **src:** The source files for non-inlined functionality (e.g. the architecture-specific parser
implementations).
* simdjson.cpp: A "main source" that includes all implementation files from src/. This is
equivalent to the distributed simdjson.cpp.
* *.cpp: other misc. implementations, such as `simdjson::implementation` and the minifier.
* arm64|fallback|haswell|icelake|ppc64|westmere.cpp: Architecture-specific parser implementations.
* generic/*.h: `simdjson::<implementation>` namespace. Generic implementation of the parser, particularly the `dom_parser_implementation`.
* generic/stage1/*.h: `simdjson::<implementation>::stage1` namespace. Generic implementation of the simd-heavy tokenizer/indexer pass of the simdjson parser. Used for the On-Demand interface
* generic/stage2/*.h: `simdjson::<implementation>::stage2` namespace. Generic implementation of the tape creator, which consumes the index from stage 1 and actually parses numbers and string and such. Used for the DOM interface.
Other important files and directories:
* **.github/workflows:** Definitions for GitHub Actions (CI).
* **singleheader:** Contains generated `simdjson.h` and `simdjson.cpp` that we release. The files `singleheader/simdjson.h` and `singleheader/simdjson.cpp` should never be edited by hand.
* **singleheader/amalgamate.py:** Generates `singleheader/simdjson.h` and `singleheader/simdjson.cpp` for release (python script). If you add a new implementation (e.g., rvv), you need to edit this file (IMPLEMENTATIONS).
* **singleheader/amalgation_helper.py:** Generates and `amalgamation_report.html` that helps you understand the status of each file.
* **benchmark:** This is where we do benchmarking. Benchmarking is core to every change we make; the
cardinal rule is don't regress performance without knowing exactly why, and what you're trading
for it. Many of our benchmarks are microbenchmarks. We are effectively doing controlled scientific experiments for the purpose of understanding what affects our performance. So we simplify as much as possible. We try to avoid irrelevant factors such as page faults, interrupts, unnecessary system calls. We recommend checking the performance as follows:
```bash
mkdir build
cd build
cmake -D SIMDJSON_DEVELOPER_MODE=ON ..
cmake --build . --config Release
benchmark/dom/parse ../jsonexamples/twitter.json
```
The last line becomes `./benchmark/Release/parse.exe ../jsonexample/twitter.json` under Windows. You may also use Google Benchmark:
```bash
mkdir build
cd build
cmake -D SIMDJSON_DEVELOPER_MODE=ON ..
cmake --build . --target bench_parse_call --config Release
./benchmark/bench_parse_call
```
The last line becomes `./benchmark/Release/bench_parse_call.exe` under Windows. Under Windows, you can also build with the clang compiler by adding `-T ClangCL` to the call to `cmake ..`: `cmake -T ClangCL ..`.
* **fuzz:** The source for fuzz testing. This lets us explore important edge and middle cases
* **fuzz:** The source for fuzz testing. This lets us explore important edge and middle cases
automatically, and is run in CI.
* **jsonchecker:** A set of JSON files used to check different functionality of the parser.
* **pass*.json:** Files that should pass validation.
* **fail*.json:** Files that should fail validation.
* **jsonchecker/minefield/y_*.json:** Files that should pass validation.
* **jsonchecker/minefield/n_*.json:** Files that should fail validation.
* **jsonexamples:** A wide spread of useful, real-world JSON files with different characteristics
and sizes.
* **test:** The tests are here. basictests.cpp and errortests.cpp are the primary ones.
* **tools:** Source for executables that can be distributed with simdjson. Some examples:
* `json2json mydoc.json` parses the document, constructs a model and then dumps back the result to standard output.
* `json2json -d mydoc.json` parses the document, constructs a model and then dumps model (as a tape) to standard output. The tape format is described in the accompanying file `tape.md`.
* `minify mydoc.json` minifies the JSON document, outputting the result to standard output. Minifying means to remove the unneeded white space characters.
* `jsonpointer mydoc.json <jsonpath> <jsonpath> ... <jsonpath>` parses the document, constructs a model and then processes a series of [JSON Pointer paths](https://tools.ietf.org/html/rfc6901). The result is itself a JSON document.
> **Don't modify the files in singleheader/ directly; these are automatically generated.**
While simdjson distributes just two files from the singleheader/ directory, we *maintain* the code in
multiple files under include/ and src/. The files include/simdjson.h and src/simdjson.cpp are the "spine" for
these, and you can include them as if they were the corresponding singleheader/ files.
Runtime Dispatching
--------------------
A key feature of simdjson is the ability to compile different processing kernels, optimized for specific instruction sets, and to select
the most appropriate kernel at runtime. This ensures that users get the very best performance while still enabling simdjson to run everywhere.
This technique is frequently called runtime dispatching. The simdjson achieves runtime dispatching entirely in C++: we do not assume
that the user is building the code using CMake, for example.
To make runtime dispatching work, it is critical that the code be compiled for the lowest supported processor. In particular, you should
not use flags such as -mavx2, /arch:AVX2 and so forth while compiling simdjson. When you do so, you allow the compiler to use advanced
instructions. In turn, these advanced instructions present in the code may cause a runtime failure if the runtime processor does not
support them. Even a simple loop, compiled with these flags, might generate binary code that only run on advanced processors.
So we compile simdjson for a generic processor. Our users should do the same if they want simdjson's runtime dispatch to work. It is important
to understand that if runtime dispatching does not work, then simdjson will cause crashes on older processors. Of course, if a user chooses
to compile their code for a specific instruction set (e.g., AVX2), they are responsible for the failures if they later run their code
on a processor that does not support AVX2. Yet, if we were to entice these users to do so, we would share the blame: thus we carefully instruct
users to compile their code in a generic way without doing anything to enable advanced instructions.
We only use runtime dispatching on x64 (AMD/Intel) platforms, at the moment. On ARM processors, we would need a standard way to query, at runtime,
the processor for its supported features. We do not know how to do so on ARM systems in general. Thankfully it is not yet a concern: 64-bit ARM
processors are fairly uniform as far as the instruction sets they support.
In all cases, simdjson uses advanced instructions by relying on "intrinsic functions": we do not write assembly code. The intrinsic functions
are special functions that the compiler might recognize and translate into fast code. To make runtime dispatching work, we rely on the fact that
the header providing these instructions
(intrin.h under Visual Studio, x86intrin.h elsewhere) defines all of the intrinsic functions, including those that are not supported
processor.
At this point, we are require to use one of two main strategies.
1. On POSIX systems, the main compilers (LLVM clang, GNU gcc) allow us to use any intrinsic function after including the header, but they fail to inline the resulting instruction if the target processor does not support them. Because we compile for a generic processor, we would not be able to use most intrinsic functions. Thankfully, more recent versions of these compilers allow us to flag a region of code with a specific target, so that we can compile only some of the code with support for advanced instructions. Thus in our C++, one might notice macros like `TARGET_HASWELL`. It is then our responsibility, at runtime, to only run the regions of code (that we call kernels) matching the properties of the runtime processor. The benefit of this approach is that the compiler not only let us use intrinsic functions, but it can also optimize the rest of the code in the kernel with advanced instructions we enabled.
2. Under Visual Studio, the problem is somewhat simpler. Visual Studio will not only provide the intrinsic functions, but it will also allow us to use them. They will compile just fine. It is at runtime that they may cause a crash. So we do not need to mark regions of code for compilation toward advanced processors (e.g., with `TARGET_HASWELL` macros). The downside of the Visual Studio approach is that the compiler is not allowed to use advanced instructions others than those we specify. In principle, this means that Visual Studio has weaker optimization opportunities.
We also handle the special case where a user is compiling using LLVM clang under Windows, [using the Visual Studio toolchain](https://devblogs.microsoft.com/cppblog/clang-llvm-support-in-visual-studio/). If you compile with LLVM clang under Visual Studio, then the header files (intrin.h or x86intrin.h) no longer provides the intrinsic functions that are unsupported by the processor. This appears to be deliberate on the part of the LLVM engineers. With a few lines of code, we handle this scenario just like LLVM clang under a POSIX system, but forcing the inclusion of the specific headers, and rolling our own intrinsic function as needed.
Regenerating Single-Header Files
---------------------------------------
The simdjson.h and simdjson.cpp files in the singleheader directory are not always up-to-date with the rest of the code; they are only ever
systematically regenerated on releases. To ensure you have the latest code, you can regenerate them by running this at the top level:
```bash
mkdir build
cd build
cmake -D SIMDJSON_DEVELOPER_MODE=ON ..
cmake --build . # needed, because currently dependencies do not work fully for the amalgamate target
cmake --build . --target amalgamate
```
You need to have python3 installed on your system.
The amalgamator script `amalgamate.py` generates singleheader/simdjson.h by
reading through include/simdjson.h, copy/pasting each header file into the amalgamated file at the
point it gets included (but only once per header). singleheader/simdjson.cpp is generated from
src/simdjson.cpp the same way, except files under generic/ may be included and copy/pasted multiple
times.
## Usage (CMake on 64-bit platforms like Linux, FreeBSD or macOS)
Requirements: In addition to git, we require a recent version of CMake as well as bash.
1. On macOS, the easiest way to install cmake might be to use [brew](https://brew.sh) and then type
```
brew install cmake
```
2. Under Linux, you might be able to install CMake as follows:
```
apt-get update -qq
apt-get install -y cmake
```
3. On FreeBSD, you might be able to install bash and CMake as follows:
```
pkg update -f
pkg install bash
pkg install cmake
```
You need a recent compiler like clang or gcc. We recommend at least GNU GCC/G++ 7 or LLVM clang 6.
Building: While in the project repository, do the following:
```
mkdir build
cd build
cmake -D SIMDJSON_DEVELOPER_MODE=ON ..
cmake --build .
ctest
```
CMake will build a library. By default, it builds a static library (e.g., libsimdjson.a on Linux).
You can build a shared library:
```
mkdir buildshared
cd buildshared
cmake -D BUILD_SHARED_LIBS=ON -D SIMDJSON_DEVELOPER_MODE=ON ..
cmake --build .
ctest
```
In some cases, you may want to specify your compiler, especially if the default compiler on your system is too old. You need to tell cmake which compiler you wish to use by setting the CC and CXX variables. Under bash, you can do so with commands such as `export CC=gcc-7` and `export CXX=g++-7`. You can also do it as part of the `cmake` command: `cmake -DCMAKE_CXX_COMPILER=g++ ..`. You may proceed as follows:
```
brew install gcc@8
mkdir build
cd build
export CXX=g++-8 CC=gcc-8
cmake -D SIMDJSON_DEVELOPER_MODE=ON ..
cmake --build .
ctest
```
If your compiler does not default on C++11 support or better you may get failing tests. If so, you may be able to exclude the failing tests by replacing `ctest` with `ctest -E "^quickstart$"`.
Note that the name of directory (`build`) is arbitrary, you can name it as you want (e.g., `buildgcc`) and you can have as many different such directories as you would like (one per configuration).
## Usage (CMake on 64-bit Windows using Visual Studio 2019 or better)
Recent versions of Visual Studio support CMake natively, [please refer to the Visual Studio documentation](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170).
We assume you have a common 64-bit Windows PC with at least Visual Studio 2019.
- Grab the simdjson code from GitHub, e.g., by cloning it using [GitHub Desktop](https://desktop.github.com/).
- Install [CMake](https://cmake.org/download/). When you install it, make sure to ask that `cmake` be made available from the command line. Please choose a recent version of cmake.
- Create a subdirectory within simdjson, such as `build`.
- Using a shell, go to this newly created directory. You can start a shell directly from GitHub Desktop (Repository > Open in Command Prompt).
- Type `cmake ..` in the shell while in the `build` repository.
- This last command (`cmake ...`) created a Visual Studio solution file in the newly created directory (e.g., `simdjson.sln`). Open this file in Visual Studio. You should now be able to build the project and run the tests. For example, in the `Solution Explorer` window (available from the `View` menu), right-click `ALL_BUILD` and select `Build`. To test the code, still in the `Solution Explorer` window, select `RUN_TESTS` and select `Build`.
Though having Visual Studio installed is necessary, one can build simdjson using only cmake commands:
- `mkdir build`
- `cd build`
- `cmake ..`
- `cmake --build . --config Release`
Furthermore, if you have installed LLVM clang on Windows, for example as a component of Visual Studio 2019, you can configure and build simdjson using LLVM clang on Windows using cmake:
- `mkdir build`
- `cd build`
- `cmake -T ClangCL ..`
- `cmake --build . --config Release`
## Various References
- [How to implement atoi using SIMD?](https://stackoverflow.com/questions/35127060/how-to-implement-atoi-using-simd)
- [Parsing JSON is a Minefield 💣](http://seriot.ch/parsing_json.php)
- https://tools.ietf.org/html/rfc7159
- http://rapidjson.org/md_doc_sax.html
- https://github.com/Geal/parser_benchmarks/tree/master/json
- Gron: A command line tool that makes JSON greppable https://news.ycombinator.com/item?id=16727665
- GoogleGson https://github.com/google/gson
- Jackson https://github.com/FasterXML/jackson
- https://www.yelp.com/dataset_challenge
- RapidJSON. http://rapidjson.org/
Inspiring links:
- https://auth0.com/blog/beating-json-performance-with-protobuf/
- https://gist.github.com/shijuvar/25ad7de9505232c87034b8359543404a
- https://github.com/frankmcsherry/blog/blob/master/posts/2018-02-11.md
-201
View File
@@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018-2025 The simdjson authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-18
View File
@@ -1,18 +0,0 @@
Copyright 2018-2025 The simdjson authors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-278
View File
@@ -1,278 +0,0 @@
[![][license img]][license] [![][licensemit img]][licensemit]
[![Doxygen Documentation](https://img.shields.io/badge/docs-doxygen-green.svg)](https://simdjson.github.io/simdjson/)
simdjson : Parsing gigabytes of JSON per second
===============================================
<img src="images/official_logo/logo_noir/SVG/logo_simdjson_noir.svg" width="40%" style="float: right">
JSON is everywhere on the Internet. Servers spend a *lot* of time parsing it. We need a fresh
approach. The simdjson library uses commonly available SIMD instructions and microparallel algorithms
to parse JSON 4x faster than RapidJSON and 25x faster than JSON for Modern C++.
* **Fast:** Over 4x faster than commonly used production-grade JSON parsers.
* **Record Breaking Features:** Minify JSON at 6 GB/s, validate UTF-8 at 13 GB/s, NDJSON at 3.5 GB/s.
* **Easy:** First-class, easy to use and carefully documented APIs.
* **Strict:** Full JSON and UTF-8 validation, lossless parsing. Performance with no compromises.
* **Automatic:** Selects a CPU-tailored parser at runtime. No configuration needed.
* **Reliable:** From memory allocation to error handling, simdjson's design avoids surprises.
* **Peer Reviewed:** Our research appears in venues like VLDB Journal, Software: Practice and Experience.
This library is part of the [Awesome Modern C++](https://awesomecpp.com) list.
Table of Contents
-----------------
* [Real-world usage](#real-world-usage)
* [Quick Start](#quick-start)
* [Documentation](#documentation)
* [Godbolt](#godbolt)
* [Performance results](#performance-results)
* [Packages](#packages)
* [Bindings and Ports of simdjson](#bindings-and-ports-of-simdjson)
* [About simdjson](#about-simdjson)
* [Funding](#funding)
* [Contributing to simdjson](#contributing-to-simdjson)
* [License](#license)
Real-world usage
----------------
- [Node.js](https://nodejs.org/)
- [ClickHouse](https://github.com/ClickHouse/ClickHouse)
- [Meta Velox](https://velox-lib.io)
- [Google Pax](https://github.com/google/paxml)
- [milvus](https://github.com/milvus-io/milvus)
- [QuestDB](https://questdb.io/blog/questdb-release-8-0-3/)
- [Clang Build Analyzer](https://github.com/aras-p/ClangBuildAnalyzer)
- [Shopify HeapProfiler](https://github.com/Shopify/heap-profiler)
- [StarRocks](https://github.com/StarRocks/starrocks)
- [Microsoft FishStore](https://github.com/microsoft/FishStore)
- [Intel PCM](https://github.com/intel/pcm)
- [WatermelonDB](https://github.com/Nozbe/WatermelonDB)
- [Apache Doris](https://github.com/apache/doris)
- [Dgraph](https://github.com/dgraph-io/dgraph)
- [UJRPC](https://github.com/unum-cloud/ujrpc)
- [fastgltf](https://github.com/spnda/fastgltf)
- [vast](https://github.com/tenzir/vast)
- [ada-url](https://github.com/ada-url/ada)
- [fastgron](https://github.com/adamritter/fastgron)
- [WasmEdge](https://wasmedge.org)
- [RonDB](https://github.com/logicalclocks/rondb)
- [GreptimeDB](https://github.com/GreptimeTeam/greptimedb)
- [mamba](https://github.com/mamba-org/mamba)
- [Ladybird Browser](https://ladybird.org)
- [SereneDB](https://github.com/serenedb/serenedb)
If you are planning to use simdjson in a product, please work from one of our releases.
Quick Start
-----------
The simdjson library is easily consumable with a single .h and .cpp file.
0. Prerequisites: `g++` (version 7 or better) or `clang++` (version 6 or better), and a 64-bit
system with a command-line shell (e.g., Linux, macOS, freeBSD). We also support programming
environments like Visual Studio and Xcode, but different steps are needed. Users of clang++ may need to specify the C++ version (e.g., `c++ -std=c++17`) since clang++ tends to default on C++98.
1. Pull [simdjson.h](singleheader/simdjson.h) and [simdjson.cpp](singleheader/simdjson.cpp) into a
directory, along with the sample file [twitter.json](jsonexamples/twitter.json). You can download them with the `wget` utility:
```
wget https://raw.githubusercontent.com/simdjson/simdjson/master/singleheader/simdjson.h https://raw.githubusercontent.com/simdjson/simdjson/master/singleheader/simdjson.cpp https://raw.githubusercontent.com/simdjson/simdjson/master/jsonexamples/twitter.json
```
2. Create `quickstart.cpp`:
```cpp
#include <iostream>
#include "simdjson.h"
using namespace simdjson;
int main(void) {
ondemand::parser parser;
padded_string json = padded_string::load("twitter.json");
ondemand::document tweets = parser.iterate(json);
std::cout << uint64_t(tweets["search_metadata"]["count"]) << " results." << std::endl;
}
```
3. `c++ -o quickstart quickstart.cpp simdjson.cpp`
4. `./quickstart`
```
100 results.
```
Documentation
-------------
Usage documentation is available:
* [Basics](doc/basics.md) is an overview of how to use simdjson and its APIs.
* [Builder](doc/builder.md) is an overview of how to efficiently write JSON strings using simdjson.
* [Performance](doc/performance.md) shows some more advanced scenarios and how to tune for them.
* [Implementation Selection](doc/implementation-selection.md) describes runtime CPU detection and
how you can work with it.
* [API](https://simdjson.github.io/simdjson/) contains the automatically generated API documentation.
* [Compile-Time Parsing](doc/compile_time.md) presents our compile-time parsing function (C++26 only).
Godbolt
-------------
Some users may want to browse code along with the compiled assembly. You want to check out the following lists of examples:
* [C++26 reflection example](https://godbolt.org/z/K3Px64TqK)
* [simdjson examples with errors handled through exceptions](https://godbolt.org/z/7G5qE4sr9)
* [simdjson examples with errors without exceptions](https://godbolt.org/z/e9dWb9E4v)
Performance results
-------------------
The simdjson library uses three-quarters less instructions than state-of-the-art parser [RapidJSON](https://rapidjson.org). To our knowledge, simdjson is the first fully-validating JSON parser
to run at [gigabytes per second](https://en.wikipedia.org/wiki/Gigabyte) (GB/s) on commodity processors. It can parse millions of JSON documents per second on a single core.
The following figure represents parsing speed in GB/s for parsing various files
on an Intel Skylake processor (3.4 GHz) using the GNU GCC 10 compiler (with the -O3 flag).
We compare against the best and fastest C++ libraries on benchmarks that load and process the data.
The simdjson library offers full unicode ([UTF-8](https://en.wikipedia.org/wiki/UTF-8)) validation and exact
number parsing.
<img src="doc/rome.png" width="60%">
The simdjson library offers high speed whether it processes tiny files (e.g., 300 bytes)
or larger files (e.g., 3MB). The following plot presents parsing
speed for [synthetic files over various sizes generated with a script](https://github.com/simdjson/simdjson_experiments_vldb2019/blob/master/experiments/growing/gen.py) on a 3.4 GHz Skylake processor (GNU GCC 9, -O3).
<img src="doc/growing.png" width="60%">
[All our experiments are reproducible](https://github.com/simdjson/simdjson_experiments_vldb2019).
For NDJSON files, we can exceed 3 GB/s with [our multithreaded parsing functions](https://github.com/simdjson/simdjson/blob/master/doc/parse_many.md).
Packages
------------------------------
[![Packaging status](https://repology.org/badge/vertical-allrepos/simdjson.svg)](https://repology.org/project/simdjson/versions)
Bindings and Ports of simdjson
------------------------------
We distinguish between "bindings" (which just wrap the C++ code) and a port to another programming language (which reimplements everything).
- [ZippyJSON](https://github.com/michaeleisel/zippyjson): Swift bindings for the simdjson project.
- [libpy_simdjson](https://github.com/gerrymanoim/libpy_simdjson/): high-speed Python bindings for simdjson using [libpy](https://github.com/quantopian/libpy).
- [pysimdjson](https://github.com/TkTech/pysimdjson): Python bindings for the simdjson project.
- [cysimdjson](https://github.com/TeskaLabs/cysimdjson): high-speed Python bindings for the simdjson project.
- [simdjson-rs](https://github.com/simd-lite): Rust port.
- [simdjson-rust](https://github.com/SunDoge/simdjson-rust): Rust wrapper (bindings).
- [SimdJsonSharp](https://github.com/EgorBo/SimdJsonSharp): C# version for .NET Core (bindings and full port).
- [simdjson_nodejs](https://github.com/luizperes/simdjson_nodejs): Node.js bindings for the simdjson project.
- [simdjson_php](https://github.com/crazyxman/simdjson_php): PHP bindings for the simdjson project.
- [simdjson_ruby](https://github.com/saka1/simdjson_ruby): Ruby bindings for the simdjson project.
- [fast_jsonparser](https://github.com/anilmaurya/fast_jsonparser): Ruby bindings for the simdjson project.
- [simdjson-go](https://github.com/minio/simdjson-go): Go port using Golang assembly.
- [rcppsimdjson](https://github.com/eddelbuettel/rcppsimdjson): R bindings.
- [simdjson_erlang](https://github.com/ChomperT/simdjson_erlang): erlang bindings.
- [simdjsone](https://github.com/saleyn/simdjsone): erlang bindings.
- [lua-simdjson](https://github.com/FourierTransformer/lua-simdjson): lua bindings.
- [hermes-json](https://hackage.haskell.org/package/hermes-json): haskell bindings.
- [zimdjson](https://github.com/EzequielRamis/zimdjson): Zig port.
- [simdjzon](https://github.com/travisstaloch/simdjzon): Zig port.
- [JSON-Simd](https://github.com/rawleyfowler/JSON-simd): Raku bindings.
- [JSON::SIMD](https://metacpan.org/pod/JSON::SIMD): Perl bindings; fully-featured JSON module that uses simdjson for decoding.
- [gemmaJSON](https://github.com/sainttttt/gemmaJSON): Nim JSON parser based on simdjson bindings.
- [simdjson-java](https://github.com/simdjson/simdjson-java): Java port.
- [mruby-fast-json](https://github.com/Asmod4n/mruby-fast-json): mruby binding with high API coverage.
About simdjson
--------------
The simdjson library takes advantage of modern microarchitectures, parallelizing with SIMD vector
instructions, reducing branch misprediction, and reducing data dependency to take advantage of each
CPU's multiple execution cores.
Our default front-end is called On-Demand, and we wrote a paper about it:
- John Keiser, Daniel Lemire, [On-Demand JSON: A Better Way to Parse Documents?](http://arxiv.org/abs/2312.17149), Software: Practice and Experience 54 (6), 2024.
Some people [enjoy reading the first (2019) simdjson paper](https://arxiv.org/abs/1902.08318): A description of the design
and implementation of simdjson is in our research article:
- Geoff Langdale, Daniel Lemire, [Parsing Gigabytes of JSON per Second](https://arxiv.org/abs/1902.08318), VLDB Journal 28 (6), 2019.
We have an in-depth paper focused on the UTF-8 validation:
- John Keiser, Daniel Lemire, [Validating UTF-8 In Less Than One Instruction Per Byte](https://arxiv.org/abs/2010.03090), Software: Practice & Experience 51 (5), 2021.
We also have an informal [blog post providing some background and context](https://branchfree.org/2019/02/25/paper-parsing-gigabytes-of-json-per-second/).
For the video inclined, we had a talk at QCon San Francisco 2019<br />
[![simdjson at QCon San Francisco 2019](http://img.youtube.com/vi/wlvKAT7SZIQ/0.jpg)](http://www.youtube.com/watch?v=wlvKAT7SZIQ)<br />
(It was the best voted talk, we're kinda proud of it.)
We also had a CppCon 2025 talk. We show how C++26 reflection allows for one-line serialization (to_json(player)) or deserialization—without invasive macros or manual mapping—using nothing but the C++ standard library. Whether youre a performance junkie or simply interested in the roadmap for the next decade of C++ development, watch our full talk!
[![simdjson at CppCon 2025](http://img.youtube.com/vi/Mcgk3CxHYMs/0.jpg)](http://www.youtube.com/watch?v=Mcgk3CxHYMs)<br />
Citing this work
-----------------
If you use simdjson in published research, please cite the software library. A suitable BibTeX entry is:
```bibtex
@misc{simdjson,
title={{The simdjson library: Parsing Gigabytes of JSON per Second}},
author={Daniel Lemire and Geoff Langdale and John Keiser and Paul Dreik and Francisco Thiesen and others},
year={2019},
howpublished={Software library},
note={https://github.com/simdjson/simdjson}
}
```
Funding
-------
The work is supported by the Natural Sciences and Engineering Research Council of Canada under grants
RGPIN-2017-03910 and RGPIN-2024-03787.
[license]: LICENSE
[license img]: https://img.shields.io/badge/License-Apache%202-blue.svg
[licensemit]: LICENSE-MIT
[licensemit img]: https://img.shields.io/badge/License-MIT-blue.svg
Contributing to simdjson
------------------------
Head over to [CONTRIBUTING.md](CONTRIBUTING.md) for information on contributing to simdjson, and
[HACKING.md](HACKING.md) for information on source, building, and architecture/design.
Stars
------
[![Star History Chart](https://api.star-history.com/svg?repos=simdjson/simdjson&type=Date)](https://www.star-history.com/#simdjson/simdjson&Date)
License
-------
This code is made available under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) as well as under the MIT License. As a user, you can pick the license you prefer.
Under Windows, we build some tools using the windows/dirent_portable.h file (which is outside our library code): it is under the liberal (business-friendly) MIT license.
For compilers that do not support [C++17](https://en.wikipedia.org/wiki/C%2B%2B17), we bundle the string-view library which is published under the [Boost license](http://www.boost.org/LICENSE_1_0.txt). Like the Apache license, the Boost license is a permissive license allowing commercial redistribution.
For efficient number serialization, we bundle Florian Loitsch's implementation of the Grisu2 algorithm for binary to decimal floating-point numbers. The implementation was slightly modified by JSON for Modern C++ library. Both Florian Loitsch's implementation and JSON for Modern C++ are provided under the MIT license.
For runtime dispatching, we use some code from the PyTorch project licensed under 3-clause BSD.
-7
View File
@@ -1,7 +0,0 @@
# Security Policy
## Reporting a Vulnerability
Please use the following contact information for reporting a vulnerability:
- [Daniel Lemire](https://github.com/lemire) - daniel@lemire.me
+127
View File
@@ -0,0 +1,127 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/generic/amalgamated.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('amalgamated_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">amalgamated.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#if defined(SIMDJSON_CONDITIONAL_INCLUDE) &amp;&amp; !defined(SIMDJSON_GENERIC_DEPENDENCIES_H)</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h!</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/generic/base.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/generic/jsoncharutils.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;simdjson/generic/atomparsing.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &quot;simdjson/generic/dom_parser_implementation.h&quot;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include &quot;simdjson/generic/implementation_simdjson_result_base.h&quot;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &quot;simdjson/generic/numberparsing.h&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include &quot;simdjson/generic/implementation_simdjson_result_base-inl.h&quot;</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_53368a02099cf3699f2996a5d88d70b6.html">generic</a></li><li class="navelem"><b>amalgamated.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+167
View File
@@ -0,0 +1,167 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: Class List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('annotated.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">Class List</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span><span onclick="javascript:toggleLevel(4);">4</span><span onclick="javascript:toggleLevel(5);">5</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacesimdjson.html" target="_self">simdjson</a></td><td class="desc">The top level simdjson namespace, containing everything the library provides </td></tr>
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_0_" class="arrow" onclick="toggleFolder('0_0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacesimdjson_1_1dom.html" target="_self">dom</a></td><td class="desc">A DOM API on top of the simdjson parser </td></tr>
<tr id="row_0_0_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_0_0_" class="arrow" onclick="toggleFolder('0_0_0_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1dom_1_1array.html" target="_self">array</a></td><td class="desc">JSON array </td></tr>
<tr id="row_0_0_0_0_" class="odd"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1dom_1_1array_1_1iterator.html" target="_self">iterator</a></td><td class="desc"></td></tr>
<tr id="row_0_0_1_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1dom_1_1document.html" target="_self">document</a></td><td class="desc">A parsed JSON document </td></tr>
<tr id="row_0_0_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_0_2_" class="arrow" onclick="toggleFolder('0_0_2_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1dom_1_1document__stream.html" target="_self">document_stream</a></td><td class="desc">A forward-only stream of documents </td></tr>
<tr id="row_0_0_2_0_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1dom_1_1document__stream_1_1iterator.html" target="_self">iterator</a></td><td class="desc">An iterator through a forward-only stream of documents </td></tr>
<tr id="row_0_0_3_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1dom_1_1element.html" target="_self">element</a></td><td class="desc">A JSON element </td></tr>
<tr id="row_0_0_4_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1dom_1_1key__value__pair.html" target="_self">key_value_pair</a></td><td class="desc">Key/value pair in an object </td></tr>
<tr id="row_0_0_5_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_0_5_" class="arrow" onclick="toggleFolder('0_0_5_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1dom_1_1object.html" target="_self">object</a></td><td class="desc">JSON object </td></tr>
<tr id="row_0_0_5_0_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1dom_1_1object_1_1iterator.html" target="_self">iterator</a></td><td class="desc"></td></tr>
<tr id="row_0_0_6_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1dom_1_1parser.html" target="_self">parser</a></td><td class="desc">A persistent document parser </td></tr>
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_1_" class="arrow" onclick="toggleFolder('0_1_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>SIMDJSON_IMPLEMENTATION</b></td><td class="desc"></td></tr>
<tr id="row_0_1_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_1_0_" class="arrow" onclick="toggleFolder('0_1_0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>builder</b></td><td class="desc"></td></tr>
<tr id="row_0_1_0_0_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1builder_1_1string__builder.html" target="_self">string_builder</a></td><td class="desc">A builder for JSON strings representing documents </td></tr>
<tr id="row_0_1_1_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_1_1_" class="arrow" onclick="toggleFolder('0_1_1_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html" target="_self">ondemand</a></td><td class="desc">A fast, simple, DOM-like interface that parses JSON as you use it </td></tr>
<tr id="row_0_1_1_0_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html" target="_self">array</a></td><td class="desc">A forward-only JSON array </td></tr>
<tr id="row_0_1_1_1_" class="odd"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html" target="_self">array_iterator</a></td><td class="desc">A forward-only JSON array </td></tr>
<tr id="row_0_1_1_2_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html" target="_self">document</a></td><td class="desc">A JSON document </td></tr>
<tr id="row_0_1_1_3_" class="odd"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html" target="_self">document_reference</a></td><td class="desc">A <a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html" title="A document_reference is a thin wrapper around a document reference instance.">document_reference</a> is a thin wrapper around a document reference instance </td></tr>
<tr id="row_0_1_1_4_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span id="arr_0_1_1_4_" class="arrow" onclick="toggleFolder('0_1_1_4_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html" target="_self">document_stream</a></td><td class="desc">A forward-only stream of documents </td></tr>
<tr id="row_0_1_1_4_0_" class="odd"><td class="entry"><span style="width:80px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html" target="_self">iterator</a></td><td class="desc"></td></tr>
<tr id="row_0_1_1_5_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html" target="_self">field</a></td><td class="desc">A JSON field (key/value pair) in an object </td></tr>
<tr id="row_0_1_1_6_" class="odd"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html" target="_self">number</a></td><td class="desc">A type representing a JSON number </td></tr>
<tr id="row_0_1_1_7_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html" target="_self">object</a></td><td class="desc">A forward-only JSON object field iterator </td></tr>
<tr id="row_0_1_1_8_" class="odd"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html" target="_self">object_iterator</a></td><td class="desc"></td></tr>
<tr id="row_0_1_1_9_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html" target="_self">parser</a></td><td class="desc">A JSON fragment iterator </td></tr>
<tr id="row_0_1_1_10_" class="odd"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html" target="_self">raw_json_string</a></td><td class="desc">A string escaped per JSON rules, terminated with quote (") </td></tr>
<tr id="row_0_1_1_11_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html" target="_self">value</a></td><td class="desc">An ephemeral JSON value returned during iteration </td></tr>
<tr id="row_0_1_2_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html" target="_self">dom_parser_implementation</a></td><td class="desc"></td></tr>
<tr id="row_0_1_3_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html" target="_self">implementation_simdjson_result_base</a></td><td class="desc">The result of a simdjson operation that could fail </td></tr>
<tr id="row_0_1_4_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container.html" target="_self">open_container</a></td><td class="desc"></td></tr>
<tr id="row_0_2_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1fractured__json__options.html" target="_self">fractured_json_options</a></td><td class="desc">Configuration options for FracturedJson formatting </td></tr>
<tr id="row_0_3_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1has__custom__serialization.html" target="_self">has_custom_serialization</a></td><td class="desc"></td></tr>
<tr id="row_0_4_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1implementation.html" target="_self">implementation</a></td><td class="desc">An implementation of simdjson for a particular CPU architecture </td></tr>
<tr id="row_0_5_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1padded__memory__map.html" target="_self">padded_memory_map</a></td><td class="desc">A class representing a memory-mapped file with padding </td></tr>
<tr id="row_0_6_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1padded__string.html" target="_self">padded_string</a></td><td class="desc">String with extra allocation for ease of use with parser::parse() </td></tr>
<tr id="row_0_7_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1padded__string__builder.html" target="_self">padded_string_builder</a></td><td class="desc">Builder for constructing <a class="el" href="structsimdjson_1_1padded__string.html" title="String with extra allocation for ease of use with parser::parse()">padded_string</a> incrementally </td></tr>
<tr id="row_0_8_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classsimdjson_1_1padded__string__view.html" target="_self">padded_string_view</a></td><td class="desc">User-provided string that promises it has extra padded bytes at the end for use with parser::parse() </td></tr>
<tr id="row_0_9_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__error.html" target="_self">simdjson_error</a></td><td class="desc">Exception thrown when an exception-supporting simdjson method is called </td></tr>
<tr id="row_0_10_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result.html" target="_self">simdjson_result</a></td><td class="desc">The result of a simdjson operation that could fail </td></tr>
<tr id="row_0_11_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4.html" target="_self">simdjson_result&lt; dom::array &gt;</a></td><td class="desc">The result of a JSON conversion that may fail </td></tr>
<tr id="row_0_12_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4.html" target="_self">simdjson_result&lt; dom::document_stream &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_13_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4.html" target="_self">simdjson_result&lt; dom::element &gt;</a></td><td class="desc">The result of a JSON navigation that may fail </td></tr>
<tr id="row_0_14_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html" target="_self">simdjson_result&lt; dom::object &gt;</a></td><td class="desc">The result of a JSON conversion that may fail </td></tr>
<tr id="row_0_15_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array_01_4.html" target="_self">simdjson_result&lt; SIMDJSON_IMPLEMENTATION::ondemand::array &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_16_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html" target="_self">simdjson_result&lt; SIMDJSON_IMPLEMENTATION::ondemand::document_reference &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_17_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html" target="_self">simdjson_result&lt; SIMDJSON_IMPLEMENTATION::ondemand::field &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_18_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html" target="_self">simdjson_result&lt; SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_19_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html" target="_self">simdjson_result&lt; SIMDJSON_IMPLEMENTATION::ondemand::json_type &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_20_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html" target="_self">simdjson_result&lt; SIMDJSON_IMPLEMENTATION::ondemand::object &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_21_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1token__iterator_01_4.html" target="_self">simdjson_result&lt; SIMDJSON_IMPLEMENTATION::ondemand::token_iterator &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_22_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html" target="_self">simdjson_result&lt; SIMDJSON_IMPLEMENTATION::ondemand::value &gt;</a></td><td class="desc"></td></tr>
<tr id="row_0_23_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value__iterator_01_4.html" target="_self">simdjson_result&lt; SIMDJSON_IMPLEMENTATION::ondemand::value_iterator &gt;</a></td><td class="desc"></td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+58
View File
@@ -0,0 +1,58 @@
var annotated_dup =
[
[ "simdjson", "namespacesimdjson.html", [
[ "dom", "namespacesimdjson_1_1dom.html", [
[ "array", "classsimdjson_1_1dom_1_1array.html", "classsimdjson_1_1dom_1_1array" ],
[ "document", "classsimdjson_1_1dom_1_1document.html", "classsimdjson_1_1dom_1_1document" ],
[ "document_stream", "classsimdjson_1_1dom_1_1document__stream.html", "classsimdjson_1_1dom_1_1document__stream" ],
[ "element", "classsimdjson_1_1dom_1_1element.html", "classsimdjson_1_1dom_1_1element" ],
[ "key_value_pair", "classsimdjson_1_1dom_1_1key__value__pair.html", "classsimdjson_1_1dom_1_1key__value__pair" ],
[ "object", "classsimdjson_1_1dom_1_1object.html", "classsimdjson_1_1dom_1_1object" ],
[ "parser", "classsimdjson_1_1dom_1_1parser.html", "classsimdjson_1_1dom_1_1parser" ]
] ],
[ "SIMDJSON_IMPLEMENTATION", null, [
[ "builder", null, [
[ "string_builder", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1builder_1_1string__builder.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1builder_1_1string__builder" ]
] ],
[ "ondemand", "namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html", [
[ "array", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array" ],
[ "array_iterator", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator" ],
[ "document", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document" ],
[ "document_reference", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference" ],
[ "document_stream", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream" ],
[ "field", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field" ],
[ "number", "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html", "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number" ],
[ "object", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object" ],
[ "object_iterator", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator" ],
[ "parser", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser" ],
[ "raw_json_string", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string" ],
[ "value", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value" ]
] ],
[ "dom_parser_implementation", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation" ],
[ "implementation_simdjson_result_base", "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html", "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base" ],
[ "open_container", "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container.html", null ]
] ],
[ "fractured_json_options", "structsimdjson_1_1fractured__json__options.html", "structsimdjson_1_1fractured__json__options" ],
[ "has_custom_serialization", "structsimdjson_1_1has__custom__serialization.html", null ],
[ "implementation", "classsimdjson_1_1implementation.html", "classsimdjson_1_1implementation" ],
[ "padded_memory_map", "classsimdjson_1_1padded__memory__map.html", "classsimdjson_1_1padded__memory__map" ],
[ "padded_string", "structsimdjson_1_1padded__string.html", "structsimdjson_1_1padded__string" ],
[ "padded_string_builder", "classsimdjson_1_1padded__string__builder.html", "classsimdjson_1_1padded__string__builder" ],
[ "padded_string_view", "classsimdjson_1_1padded__string__view.html", "classsimdjson_1_1padded__string__view" ],
[ "simdjson_error", "structsimdjson_1_1simdjson__error.html", "structsimdjson_1_1simdjson__error" ],
[ "simdjson_result", "structsimdjson_1_1simdjson__result.html", "structsimdjson_1_1simdjson__result" ],
[ "simdjson_result< dom::array >", "structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4.html", null ],
[ "simdjson_result< dom::document_stream >", "structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4.html", null ],
[ "simdjson_result< dom::element >", "structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4.html", null ],
[ "simdjson_result< dom::object >", "structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html", null ],
[ "simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::array >", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array_01_4.html", null ],
[ "simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4" ],
[ "simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::field >", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html", null ],
[ "simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::json_iterator >", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html", null ],
[ "simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::json_type >", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html", null ],
[ "simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::object >", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html", null ],
[ "simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::token_iterator >", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1token__iterator_01_4.html", null ],
[ "simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4" ],
[ "simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value_iterator >", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value__iterator_01_4.html", null ]
] ]
];
+143
View File
@@ -0,0 +1,143 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/base.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2base_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">base.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_ARM64_BASE_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_ARM64_BASE_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/base.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
<div class="foldopen" id="foldopen00008" data-start="{" data-end="}">
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"><a class="line" href="namespacesimdjson.html"> 8</a></span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="foldopen" id="foldopen00012" data-start="{" data-end="}">
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"><a class="line" href="namespacesimdjson_1_1arm64.html"> 12</a></span><span class="keyword">namespace </span>arm64 {</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">class </span>implementation;</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="keyword">namespace </span>{</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="keyword">namespace </span>simd {</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <span class="keyword">struct </span>simd8;</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <span class="keyword">struct </span>simd8x64;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span>} <span class="comment">// namespace simd</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span>} <span class="comment">// unnamed namespace</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>} <span class="comment">// namespace arm64</span></div>
</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span>} <span class="comment">// namespace simdjson</span></div>
</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_ARM64_BASE_H</span></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>base.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+125
View File
@@ -0,0 +1,125 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/begin.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2begin_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">begin.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#define SIMDJSON_IMPLEMENTATION arm64</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include &quot;simdjson/arm64/base.h&quot;</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include &quot;simdjson/arm64/intrinsics.h&quot;</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &quot;simdjson/arm64/bitmanipulation.h&quot;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/arm64/bitmask.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/arm64/numberparsing_defs.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;simdjson/arm64/simd.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &quot;simdjson/arm64/stringparsing_defs.h&quot;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#define SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT 1</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>begin.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+216
View File
@@ -0,0 +1,216 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/bitmanipulation.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2bitmanipulation_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">bitmanipulation.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_ARM64_BITMANIPULATION_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_ARM64_BITMANIPULATION_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/arm64/base.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/arm64/intrinsics.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">namespace </span>arm64 {</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">namespace </span>{</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">// We sometimes call trailing_zero on inputs that are zero,</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// but the algorithms do not end up using the returned value.</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// Sadly, sanitizers are not smart enough to figure it out.</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span>SIMDJSON_NO_SANITIZE_UNDEFINED</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">// This function can be used safely even if not all bytes have been</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// initialized.</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// See issue https://github.com/simdjson/simdjson/issues/1965</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span>SIMDJSON_NO_SANITIZE_MEMORY</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span>simdjson_inline <span class="keywordtype">int</span> trailing_zeroes(uint64_t input_num) {</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ret;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="comment">// Search the mask data from least significant bit (LSB)</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="comment">// to the most significant bit (MSB) for a set bit (1).</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> _BitScanForward64(&amp;ret, input_num);</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)ret;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#else </span><span class="comment">// SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">return</span> __builtin_ctzll(input_num);</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span>}</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="comment">/* result might be undefined when input_num is zero */</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span>simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">return</span> input_num &amp; (input_num-1);</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span>}</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="comment">// We sometimes call leading_zeroes on inputs that are zero,</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment">// but the algorithms do not end up using the returned value.</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment">// Sadly, sanitizers are not smart enough to figure it out.</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="comment">// Applies only when SIMDJSON_PREFER_REVERSE_BITS is defined and true.</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="comment">// (See below.)</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>SIMDJSON_NO_SANITIZE_UNDEFINED</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment">/* result might be undefined when input_num is zero */</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span>simdjson_inline <span class="keywordtype">int</span> leading_zeroes(uint64_t input_num) {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> leading_zero = 0;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="comment">// Search the mask data from most significant bit (MSB)</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="comment">// to least significant bit (LSB) for a set bit (1).</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">if</span> (_BitScanReverse64(&amp;leading_zero, input_num))</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)(63 - leading_zero);</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">else</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">return</span> 64;</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">return</span> __builtin_clzll(input_num);</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="preprocessor">#endif</span><span class="comment">// SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>}</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment">/* result might be undefined when input_num is zero */</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>simdjson_inline <span class="keywordtype">int</span> count_ones(uint64_t input_num) {</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">return</span> vaddv_u8(vcnt_u8(vcreate_u8(input_num)));</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span>}</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="preprocessor">#if defined(__GNUC__) </span><span class="comment">// catches clang and gcc</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment">/*</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment"> * We use SIMDJSON_PREFER_REVERSE_BITS as a hint that algorithms that</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment"> * work well with bit reversal may use it.</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment"> */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="preprocessor">#define SIMDJSON_PREFER_REVERSE_BITS 1</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="comment">/* reverse the bits */</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span>simdjson_inline uint64_t reverse_bits(uint64_t input_num) {</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> uint64_t rev_bits;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> __asm(<span class="stringliteral">&quot;rbit %0, %1&quot;</span> : <span class="stringliteral">&quot;=r&quot;</span>(rev_bits) : <span class="stringliteral">&quot;r&quot;</span>(input_num));</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">return</span> rev_bits;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>}</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span>SIMDJSON_NO_SANITIZE_UNDEFINED</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span>simdjson_inline uint64_t zero_leading_bit(uint64_t rev_bits, <span class="keywordtype">int</span> leading_zeroes) {</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">return</span> rev_bits ^ (uint64_t(0x8000000000000000) &gt;&gt; leading_zeroes);</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span>}</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span>simdjson_inline <span class="keywordtype">bool</span> add_overflow(uint64_t value1, uint64_t value2, uint64_t *result) {</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> *result = value1 + value2;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">return</span> *result &lt; value1;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">return</span> __builtin_uaddll_overflow(value1, value2,</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> *<span class="keyword">&gt;</span>(result));</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span>}</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span>} <span class="comment">// unnamed namespace</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span>} <span class="comment">// namespace arm64</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_ARM64_BITMANIPULATION_H</span></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>bitmanipulation.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+158
View File
@@ -0,0 +1,158 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/bitmask.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2bitmask_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">bitmask.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_ARM64_BITMASK_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_ARM64_BITMASK_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/arm64/base.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">namespace </span>arm64 {</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">namespace </span>{</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">//</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">// Perform a &quot;cumulative bitwise xor,&quot; flipping bits each time a 1 is encountered.</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">//</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// For example, prefix_xor(00100100) == 00011100</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">//</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>simdjson_inline uint64_t prefix_xor(uint64_t bitmask) {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// We could do this with PMULL, but it is apparently slow.</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="comment">//</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="comment">//#ifdef __ARM_FEATURE_CRYPTO // some ARM processors lack this extension</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="comment">//return vmull_p64(-1ULL, bitmask);</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="comment">//#else</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="comment">// Analysis by @sebpop:</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="comment">// When diffing the assembly for src/stage1_find_marks.cpp I see that the eors are all spread out</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="comment">// in between other vector code, so effectively the extra cycles of the sequence do not matter</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="comment">// because the GPR units are idle otherwise and the critical path is on the FP side.</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="comment">// Also the PMULL requires two extra fmovs: GPR-&gt;FP (3 cycles in N1, 5 cycles in A72 )</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="comment">// and FP-&gt;GPR (2 cycles on N1 and 5 cycles on A72.)</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> bitmask ^= bitmask &lt;&lt; 1;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> bitmask ^= bitmask &lt;&lt; 2;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> bitmask ^= bitmask &lt;&lt; 4;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> bitmask ^= bitmask &lt;&lt; 8;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> bitmask ^= bitmask &lt;&lt; 16;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> bitmask ^= bitmask &lt;&lt; 32;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordflow">return</span> bitmask;</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span>}</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span>} <span class="comment">// unnamed namespace</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span>} <span class="comment">// namespace arm64</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>bitmask.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+123
View File
@@ -0,0 +1,123 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/builder.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2builder_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">builder.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_ARM64_BUILDER_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_ARM64_BUILDER_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &quot;simdjson/arm64/begin.h&quot;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/generic/builder/amalgamated.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/arm64/end.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_ARM64_BUILDER_H</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>builder.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+121
View File
@@ -0,0 +1,121 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/end.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2end_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">end.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include &quot;simdjson/arm64/base.h&quot;</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#undef SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#undef SIMDJSON_IMPLEMENTATION</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>end.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+148
View File
@@ -0,0 +1,148 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/implementation.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2implementation_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">implementation.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_ARM64_IMPLEMENTATION_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_ARM64_IMPLEMENTATION_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/base.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/implementation.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;simdjson/internal/instruction_set.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">namespace </span>arm64 {</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="keyword">class </span>implementation final : <span class="keyword">public</span> <a class="code hl_class" href="classsimdjson_1_1implementation.html">simdjson::implementation</a> {</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> simdjson_inline implementation() : <a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a>::implementation(<span class="stringliteral">&quot;arm64&quot;</span>, <span class="stringliteral">&quot;ARM NEON&quot;</span>, internal::instruction_set::NEON) {}</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> simdjson_warn_unused <a class="code hl_enumeration" href="namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9">error_code</a> create_dom_parser_implementation(</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordtype">size_t</span> capacity,</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordtype">size_t</span> max_length,</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> std::unique_ptr&lt;internal::dom_parser_implementation&gt;&amp; dst</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> ) <span class="keyword">const</span> <span class="keyword">noexcept</span> <span class="keyword">final</span>;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> simdjson_warn_unused <a class="code hl_enumeration" href="namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9">error_code</a> <a class="code hl_function" href="namespacesimdjson.html#aeb4ef5cab43d52da3fdd99cb689aff2c">minify</a>(<span class="keyword">const</span> uint8_t *buf, <span class="keywordtype">size_t</span> len, uint8_t *dst, <span class="keywordtype">size_t</span> &amp;dst_len) <span class="keyword">const</span> <span class="keyword">noexcept</span> <span class="keyword">final</span>;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> simdjson_warn_unused <span class="keywordtype">bool</span> <a class="code hl_function" href="namespacesimdjson.html#a53546f3af0ed6840ffbeefcbefd305a1">validate_utf8</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">size_t</span> len) <span class="keyword">const</span> <span class="keyword">noexcept</span> <span class="keyword">final</span>;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>};</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>} <span class="comment">// namespace arm64</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_ARM64_IMPLEMENTATION_H</span></div>
<div class="ttc" id="aclasssimdjson_1_1implementation_html"><div class="ttname"><a href="classsimdjson_1_1implementation.html">simdjson::implementation</a></div><div class="ttdoc">An implementation of simdjson for a particular CPU architecture.</div><div class="ttdef"><b>Definition</b> <a href="implementation_8h_source.html#l00045">implementation.h:45</a></div></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
<div class="ttc" id="anamespacesimdjson_html_a53546f3af0ed6840ffbeefcbefd305a1"><div class="ttname"><a href="namespacesimdjson.html#a53546f3af0ed6840ffbeefcbefd305a1">simdjson::validate_utf8</a></div><div class="ttdeci">simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept</div><div class="ttdoc">Validate the UTF-8 string.</div></div>
<div class="ttc" id="anamespacesimdjson_html_a7b735a3a50ba79e3f7f14df5f77d8da9"><div class="ttname"><a href="namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9">simdjson::error_code</a></div><div class="ttdeci">error_code</div><div class="ttdoc">All possible errors returned by simdjson.</div><div class="ttdef"><b>Definition</b> <a href="error_8h_source.html#l00019">error.h:19</a></div></div>
<div class="ttc" id="anamespacesimdjson_html_aeb4ef5cab43d52da3fdd99cb689aff2c"><div class="ttname"><a href="namespacesimdjson.html#aeb4ef5cab43d52da3fdd99cb689aff2c">simdjson::minify</a></div><div class="ttdeci">std::string minify(T x)</div><div class="ttdoc">Minifies a JSON element or document, printing the smallest possible valid JSON.</div><div class="ttdef"><b>Definition</b> <a href="dom_2serialization_8h_source.html#l00274">serialization.h:274</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>implementation.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+130
View File
@@ -0,0 +1,130 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/intrinsics.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2intrinsics_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">intrinsics.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_ARM64_INTRINSICS_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_ARM64_INTRINSICS_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/arm64/base.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// This should be the correct header whether</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">// you use visual studio or other compilers.</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &lt;arm_neon.h&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">static_assert</span>(<span class="keyword">sizeof</span>(uint8x16_t) &lt;= <a class="code hl_variable" href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf">simdjson::SIMDJSON_PADDING</a>, <span class="stringliteral">&quot;insufficient padding for arm64&quot;</span>);</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_ARM64_INTRINSICS_H</span></div>
<div class="ttc" id="anamespacesimdjson_html_aecdd750132f0eb123a6d61113b4197bf"><div class="ttname"><a href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf">simdjson::SIMDJSON_PADDING</a></div><div class="ttdeci">constexpr size_t SIMDJSON_PADDING</div><div class="ttdoc">The amount of padding needed in a buffer to parse JSON.</div><div class="ttdef"><b>Definition</b> <a href="base_8h_source.html#l00033">base.h:33</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>intrinsics.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+177
View File
@@ -0,0 +1,177 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/numberparsing_defs.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2numberparsing__defs_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">numberparsing_defs.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_ARM64_NUMBERPARSING_DEFS_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_ARM64_NUMBERPARSING_DEFS_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/arm64/base.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/arm64/intrinsics.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;simdjson/internal/numberparsing_tables.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &lt;cstring&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO &amp;&amp; SIMDJSON_IS_ARM64</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">// __umulh requires intrin.h</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &lt;intrin.h&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_REGULAR_VISUAL_STUDIO &amp;&amp; SIMDJSON_IS_ARM64</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="keyword">namespace </span>arm64 {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="keyword">namespace </span>numberparsing {</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// we don&#39;t have SSE, so let us use a scalar function</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">static</span> simdjson_inline uint32_t parse_eight_digits_unrolled(<span class="keyword">const</span> uint8_t *chars) {</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> uint64_t val;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> std::memcpy(&amp;val, chars, <span class="keyword">sizeof</span>(uint64_t));</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> val = (val &amp; 0x0F0F0F0F0F0F0F0F) * 2561 &gt;&gt; 8;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> val = (val &amp; 0x00FF00FF00FF00FF) * 6553601 &gt;&gt; 16;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">return</span> uint32_t((val &amp; 0x0000FFFF0000FFFF) * 42949672960001 &gt;&gt; 32);</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span>}</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> internal::value128 answer;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#if SIMDJSON_IS_ARM64</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// ARM64 has native support for 64-bit multiplications, no need to emultate</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> answer.high = __umulh(value1, value2);</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> answer.low = value1 * value2;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> answer.low = _umul128(value1, value2, &amp;answer.high); <span class="comment">// _umul128 not available on ARM64</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_IS_ARM64</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="preprocessor">#else </span><span class="comment">// SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> __uint128_t r = (<span class="keyword">static_cast&lt;</span>__uint128_t<span class="keyword">&gt;</span>(value1)) * value2;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> answer.low = uint64_t(r);</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> answer.high = uint64_t(r &gt;&gt; 64);</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">return</span> answer;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>}</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span>} <span class="comment">// namespace numberparsing</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span>} <span class="comment">// namespace arm64</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="preprocessor">#ifndef SIMDJSON_SWAR_NUMBER_PARSING</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="preprocessor">#if SIMDJSON_IS_BIG_ENDIAN</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="preprocessor">#define SIMDJSON_SWAR_NUMBER_PARSING 0</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="preprocessor">#define SIMDJSON_SWAR_NUMBER_PARSING 1</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_ARM64_NUMBERPARSING_DEFS_H</span></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>numberparsing_defs.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+123
View File
@@ -0,0 +1,123 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/ondemand.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2ondemand_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">ondemand.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_ARM64_ONDEMAND_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_ARM64_ONDEMAND_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &quot;simdjson/arm64/begin.h&quot;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/generic/ondemand/amalgamated.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/arm64/end.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_ARM64_ONDEMAND_H</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>ondemand.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+626
View File
@@ -0,0 +1,626 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/simd.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2simd_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">simd.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_ARM64_SIMD_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_ARM64_SIMD_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/arm64/base.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/arm64/bitmanipulation.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;simdjson/internal/simdprune_tables.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">namespace </span>arm64 {</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">namespace </span>{</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">namespace </span>simd {</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="keyword">namespace </span>{</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">// Start of private section with Visual Studio workaround</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#ifndef simdjson_make_uint8x16_t</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#define simdjson_make_uint8x16_t(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, \</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor"> x13, x14, x15, x16) \</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor"> ([=]() { \</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor"> uint8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8, \</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="preprocessor"> x9, x10, x11, x12, x13, x14, x15, x16}; \</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor"> return vld1q_u8(array); \</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor"> }())</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#ifndef simdjson_make_int8x16_t</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#define simdjson_make_int8x16_t(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, \</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor"> x13, x14, x15, x16) \</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor"> ([=]() { \</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor"> int8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8, \</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor"> x9, x10, x11, x12, x13, x14, x15, x16}; \</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor"> return vld1q_s8(array); \</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor"> }())</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="preprocessor">#ifndef simdjson_make_uint8x8_t</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="preprocessor">#define simdjson_make_uint8x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="preprocessor"> ([=]() { \</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="preprocessor"> uint8_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="preprocessor"> return vld1_u8(array); \</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="preprocessor"> }())</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="preprocessor">#ifndef simdjson_make_int8x8_t</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="preprocessor">#define simdjson_make_int8x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="preprocessor"> ([=]() { \</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="preprocessor"> int8_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="preprocessor"> return vld1_s8(array); \</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="preprocessor"> }())</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="preprocessor">#ifndef simdjson_make_uint16x8_t</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="preprocessor">#define simdjson_make_uint16x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="preprocessor"> ([=]() { \</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="preprocessor"> uint16_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="preprocessor"> return vld1q_u16(array); \</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="preprocessor"> }())</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="preprocessor">#ifndef simdjson_make_int16x8_t</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="preprocessor">#define simdjson_make_int16x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="preprocessor"> ([=]() { \</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="preprocessor"> int16_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="preprocessor"> return vld1q_s16(array); \</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="preprocessor"> }())</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment">// End of private section with Visual Studio workaround</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span>} <span class="comment">// namespace</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keyword">struct </span>simd8;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="comment">//</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="comment">// Base class of simd8&lt;uint8_t&gt; and simd8&lt;bool&gt;, both of which use uint8x16_t internally.</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="comment">//</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> Mask=simd8&lt;<span class="keywordtype">bool</span>&gt;&gt;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">struct </span>base_u8 {</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> uint8x16_t value;</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> SIZE = <span class="keyword">sizeof</span>(value);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="comment">// Conversion from/to SIMD register</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> simdjson_inline base_u8(<span class="keyword">const</span> uint8x16_t _value) : value(_value) {}</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> simdjson_inline <span class="keyword">operator</span> <span class="keyword">const</span> uint8x16_t&amp;() <span class="keyword">const</span> { <span class="keywordflow">return</span> this-&gt;value; }</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> simdjson_inline <span class="keyword">operator</span> uint8x16_t&amp;() { <span class="keywordflow">return</span> this-&gt;value; }</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> </div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="comment">// Bit operations</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> simdjson_inline simd8&lt;T&gt; operator|(<span class="keyword">const</span> simd8&lt;T&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vorrq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> simdjson_inline simd8&lt;T&gt; operator&amp;(<span class="keyword">const</span> simd8&lt;T&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vandq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> simdjson_inline simd8&lt;T&gt; operator^(<span class="keyword">const</span> simd8&lt;T&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> veorq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> simdjson_inline simd8&lt;T&gt; bit_andnot(<span class="keyword">const</span> simd8&lt;T&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vbicq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> simdjson_inline simd8&lt;T&gt; operator~()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *<span class="keyword">this</span> ^ 0xFFu; }</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> simdjson_inline simd8&lt;T&gt;&amp; operator|=(<span class="keyword">const</span> simd8&lt;T&gt; other) { <span class="keyword">auto</span> this_cast = <span class="keyword">static_cast&lt;</span>simd8&lt;T&gt;*<span class="keyword">&gt;</span>(<span class="keyword">this</span>); *this_cast = *this_cast | other; <span class="keywordflow">return</span> *this_cast; }</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> simdjson_inline simd8&lt;T&gt;&amp; operator&amp;=(<span class="keyword">const</span> simd8&lt;T&gt; other) { <span class="keyword">auto</span> this_cast = <span class="keyword">static_cast&lt;</span>simd8&lt;T&gt;*<span class="keyword">&gt;</span>(<span class="keyword">this</span>); *this_cast = *this_cast &amp; other; <span class="keywordflow">return</span> *this_cast; }</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> simdjson_inline simd8&lt;T&gt;&amp; operator^=(<span class="keyword">const</span> simd8&lt;T&gt; other) { <span class="keyword">auto</span> this_cast = <span class="keyword">static_cast&lt;</span>simd8&lt;T&gt;*<span class="keyword">&gt;</span>(<span class="keyword">this</span>); *this_cast = *this_cast ^ other; <span class="keywordflow">return</span> *this_cast; }</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keyword">friend</span> simdjson_inline Mask <a class="code hl_function" href="namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#aab771b17058b0c93bdd0a8679c2c4d84">operator==</a>(<span class="keyword">const</span> simd8&lt;T&gt; lhs, <span class="keyword">const</span> simd8&lt;T&gt; rhs) { <span class="keywordflow">return</span> vceqq_u8(lhs, rhs); }</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> N=1&gt;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> simdjson_inline simd8&lt;T&gt; prev(<span class="keyword">const</span> simd8&lt;T&gt; prev_chunk)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">return</span> vextq_u8(prev_chunk, *<span class="keyword">this</span>, 16 - N);</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> }</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> };</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> </div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="comment">// SIMD byte mask type (returned by things like eq and gt)</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keyword">struct </span>simd8&lt;bool&gt;: base_u8&lt;bool&gt; {</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keyword">typedef</span> uint16_t bitmask_t;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keyword">typedef</span> uint32_t bitmask2_t;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> </div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keyword">static</span> simdjson_inline simd8&lt;bool&gt; splat(<span class="keywordtype">bool</span> _value) { <span class="keywordflow">return</span> vmovq_n_u8(uint8_t(-(!!_value))); }</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> simdjson_inline simd8(<span class="keyword">const</span> uint8x16_t _value) : base_u8&lt;bool&gt;(_value) {}</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="comment">// False constructor</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> simdjson_inline simd8() : simd8(vdupq_n_u8(0)) {}</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="comment">// Splat constructor</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> simdjson_inline simd8(<span class="keywordtype">bool</span> _value) : simd8(splat(_value)) {}</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="comment">// We return uint32_t instead of uint16_t because that seems to be more efficient for most</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="comment">// purposes (cutting it down to uint16_t costs performance in some compilers).</span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> simdjson_inline uint32_t to_bitmask()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keyword">const</span> uint8x16_t bit_mask = simdjson_make_uint8x16_t(0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80);</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keyword">const</span> uint8x16_t bit_mask = {0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80};</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keyword">auto</span> minput = *<span class="keyword">this</span> &amp; bit_mask;</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> uint8x16_t tmp = vpaddq_u8(minput, minput);</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> tmp = vpaddq_u8(tmp, tmp);</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> tmp = vpaddq_u8(tmp, tmp);</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordflow">return</span> vgetq_lane_u16(vreinterpretq_u16_u8(tmp), 0);</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> }</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="comment">// Returns 4-bit out of each byte, alternating between the high 4 bits and low</span></div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="comment">// bits result it is 64 bit.</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> simdjson_inline uint64_t to_bitmask64()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keywordflow">return</span> vget_lane_u64(</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> vreinterpret_u64_u8(vshrn_n_u16(vreinterpretq_u16_u8(*<span class="keyword">this</span>), 4)), 0);</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> }</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> simdjson_inline <span class="keywordtype">bool</span> any()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vmaxvq_u32(vreinterpretq_u32_u8(*<span class="keyword">this</span>)) != 0; }</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> };</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="comment">// Unsigned bytes</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keyword">struct </span>simd8&lt;uint8_t&gt;: base_u8&lt;uint8_t&gt; {</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keyword">static</span> simdjson_inline uint8x16_t splat(uint8_t _value) { <span class="keywordflow">return</span> vmovq_n_u8(_value); }</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keyword">static</span> simdjson_inline uint8x16_t zero() { <span class="keywordflow">return</span> vdupq_n_u8(0); }</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keyword">static</span> simdjson_inline uint8x16_t load(<span class="keyword">const</span> uint8_t* values) { <span class="keywordflow">return</span> vld1q_u8(values); }</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> </div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> simdjson_inline simd8(<span class="keyword">const</span> uint8x16_t _value) : base_u8&lt;uint8_t&gt;(_value) {}</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="comment">// Zero constructor</span></div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> simdjson_inline simd8() : simd8(zero()) {}</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="comment">// Array constructor</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> simdjson_inline simd8(<span class="keyword">const</span> uint8_t values[16]) : simd8(load(values)) {}</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="comment">// Splat constructor</span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="comment">// Member-by-member initialization</span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> simdjson_inline simd8(</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> ) : simd8(simdjson_make_uint8x16_t(</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> v0, v1, v2, v3, v4, v5, v6, v7,</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> v8, v9, v10,v11,v12,v13,v14,v15</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> )) {}</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> simdjson_inline simd8(</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> ) : simd8(uint8x16_t{</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> v0, v1, v2, v3, v4, v5, v6, v7,</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> v8, v9, v10,v11,v12,v13,v14,v15</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> }) {}</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> </div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="comment">// Repeat 16 values as many times as necessary (usually for lookup tables)</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> simdjson_inline <span class="keyword">static</span> simd8&lt;uint8_t&gt; repeat_16(</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> ) {</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keywordflow">return</span> simd8&lt;uint8_t&gt;(</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> v0, v1, v2, v3, v4, v5, v6, v7,</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> v8, v9, v10,v11,v12,v13,v14,v15</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> );</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> }</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> </div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="comment">// Store to array</span></div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> simdjson_inline <span class="keywordtype">void</span> store(uint8_t dst[16])<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vst1q_u8(dst, *<span class="keyword">this</span>); }</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> </div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="comment">// Saturated math</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> simdjson_inline simd8&lt;uint8_t&gt; saturating_add(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vqaddq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> simdjson_inline simd8&lt;uint8_t&gt; saturating_sub(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vqsubq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> </div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="comment">// Addition/subtraction are the same for signed and unsigned</span></div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> simdjson_inline simd8&lt;uint8_t&gt; operator+(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vaddq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> simdjson_inline simd8&lt;uint8_t&gt; operator-(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vsubq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> simdjson_inline simd8&lt;uint8_t&gt;&amp; operator+=(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other) { *<span class="keyword">this</span> = *<span class="keyword">this</span> + other; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> simdjson_inline simd8&lt;uint8_t&gt;&amp; operator-=(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other) { *<span class="keyword">this</span> = *<span class="keyword">this</span> - other; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> </div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="comment">// Order-specific operations</span></div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> simdjson_inline uint8_t max_val()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vmaxvq_u8(*<span class="keyword">this</span>); }</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> simdjson_inline uint8_t min_val()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vminvq_u8(*<span class="keyword">this</span>); }</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> simdjson_inline simd8&lt;uint8_t&gt; max_val(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vmaxq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> simdjson_inline simd8&lt;uint8_t&gt; min_val(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vminq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> simdjson_inline simd8&lt;bool&gt; operator&lt;=(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vcleq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> simdjson_inline simd8&lt;bool&gt; operator&gt;=(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vcgeq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> simdjson_inline simd8&lt;bool&gt; operator&lt;(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vcltq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> simdjson_inline simd8&lt;bool&gt; operator&gt;(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vcgtq_u8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <span class="comment">// Same as &gt;, but instead of guaranteeing all 1&#39;s == true, false = 0 and true = nonzero. For ARM, returns all 1&#39;s.</span></div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> simdjson_inline simd8&lt;uint8_t&gt; gt_bits(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> simd8&lt;uint8_t&gt;(*<span class="keyword">this</span> &gt; other); }</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="comment">// Same as &lt;, but instead of guaranteeing all 1&#39;s == true, false = 0 and true = nonzero. For ARM, returns all 1&#39;s.</span></div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> simdjson_inline simd8&lt;uint8_t&gt; lt_bits(<span class="keyword">const</span> simd8&lt;uint8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> simd8&lt;uint8_t&gt;(*<span class="keyword">this</span> &lt; other); }</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> </div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="comment">// Bit-specific operations</span></div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> simdjson_inline simd8&lt;bool&gt; any_bits_set(simd8&lt;uint8_t&gt; bits)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vtstq_u8(*<span class="keyword">this</span>, bits); }</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> simdjson_inline <span class="keywordtype">bool</span> any_bits_set_anywhere()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vmaxvq_u32(vreinterpretq_u32_u8(*<span class="keyword">this</span>)) != 0; }</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> simdjson_inline <span class="keywordtype">bool</span> any_bits_set_anywhere(simd8&lt;uint8_t&gt; bits)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (*<span class="keyword">this</span> &amp; bits).any_bits_set_anywhere(); }</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> N&gt;</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> simdjson_inline simd8&lt;uint8_t&gt; shr()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vshrq_n_u8(*<span class="keyword">this</span>, N); }</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> N&gt;</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> simdjson_inline simd8&lt;uint8_t&gt; shl()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vshlq_n_u8(*<span class="keyword">this</span>, N); }</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> </div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> <span class="comment">// Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values)</span></div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> L&gt;</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> simdjson_inline simd8&lt;L&gt; lookup_16(simd8&lt;L&gt; lookup_table)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keywordflow">return</span> lookup_table.apply_lookup_16_to(*<span class="keyword">this</span>);</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> }</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> </div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> <span class="comment">// Returns 4-bit out of each byte, alternating between the high 4 bits and low</span></div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <span class="comment">// bits result it is 64 bit.</span></div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> simdjson_inline uint64_t to_bitmask64()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <span class="keywordflow">return</span> vget_lane_u64(</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> vreinterpret_u64_u8(vshrn_n_u16(vreinterpretq_u16_u8(*<span class="keyword">this</span>), 4)), 0);</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> }</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> <span class="comment">// Copies to &#39;output&quot; all bytes corresponding to a 0 in the mask (interpreted as a bitset).</span></div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> <span class="comment">// Passing a 0 value for mask would be equivalent to writing out every byte to output.</span></div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> <span class="comment">// Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes</span></div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> <span class="comment">// get written.</span></div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> <span class="comment">// Design consideration: it seems like a function with the</span></div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> <span class="comment">// signature simd8&lt;L&gt; compress(uint16_t mask) would be</span></div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> <span class="comment">// sensible, but the AVX ISA makes this kind of approach difficult.</span></div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> L&gt;</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> simdjson_inline <span class="keywordtype">void</span> compress(uint16_t mask, L * output)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> <span class="keyword">using </span>internal::thintable_epi8;</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <span class="keyword">using </span>internal::BitsSetTable256mul2;</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keyword">using </span>internal::pshufb_combine_table;</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <span class="comment">// this particular implementation was inspired by work done by @animetosho</span></div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> <span class="comment">// we do it in two steps, first 8 bytes and then second 8 bytes</span></div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> uint8_t mask1 = uint8_t(mask); <span class="comment">// least significant 8 bits</span></div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> uint8_t mask2 = uint8_t(mask &gt;&gt; 8); <span class="comment">// most significant 8 bits</span></div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> <span class="comment">// next line just loads the 64-bit values thintable_epi8[mask1] and</span></div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> <span class="comment">// thintable_epi8[mask2] into a 128-bit register, using only</span></div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> <span class="comment">// two instructions on most compilers.</span></div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> uint64x2_t shufmask64 = {thintable_epi8[mask1], thintable_epi8[mask2]};</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> uint8x16_t shufmask = vreinterpretq_u8_u64(shufmask64);</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> <span class="comment">// we increment by 0x08 the second half of the mask</span></div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> uint8x16_t inc = simdjson_make_uint8x16_t(0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08);</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span> uint8x16_t inc = {0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08};</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno"> 265</span> shufmask = vaddq_u8(shufmask, inc);</div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"> 266</span> <span class="comment">// this is the version &quot;nearly pruned&quot;</span></div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno"> 267</span> uint8x16_t pruned = vqtbl1q_u8(*<span class="keyword">this</span>, shufmask);</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span> <span class="comment">// we still need to put the two halves together.</span></div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <span class="comment">// we compute the popcount of the first half:</span></div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="keywordtype">int</span> pop1 = BitsSetTable256mul2[mask1];</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> <span class="comment">// then load the corresponding mask, what it does is to write</span></div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> <span class="comment">// only the first pop1 bytes from the first 8 bytes, and then</span></div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> <span class="comment">// it fills in with the bytes from the second 8 bytes + some filling</span></div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <span class="comment">// at the end.</span></div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> uint8x16_t compactmask = vld1q_u8(<span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span>uint8_t *<span class="keyword">&gt;</span>(pshufb_combine_table + pop1 * 8));</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> uint8x16_t answer = vqtbl1q_u8(pruned, compactmask);</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> vst1q_u8(<span class="keyword">reinterpret_cast&lt;</span>uint8_t*<span class="keyword">&gt;</span>(output), answer);</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> }</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> </div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> <span class="comment">// Copies all bytes corresponding to a 0 in the low half of the mask (interpreted as a</span></div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> <span class="comment">// bitset) to output1, then those corresponding to a 0 in the high half to output2.</span></div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> L&gt;</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> simdjson_inline <span class="keywordtype">void</span> compress_halves(uint16_t mask, L *output1, L *output2)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <span class="keyword">using </span>internal::thintable_epi8;</div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> uint8_t mask1 = uint8_t(mask); <span class="comment">// least significant 8 bits</span></div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> uint8_t mask2 = uint8_t(mask &gt;&gt; 8); <span class="comment">// most significant 8 bits</span></div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> uint8x8_t compactmask1 = vcreate_u8(thintable_epi8[mask1]);</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> uint8x8_t compactmask2 = vcreate_u8(thintable_epi8[mask2]);</div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> <span class="comment">// we increment by 0x08 the second half of the mask</span></div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> uint8x8_t inc = simdjson_make_uint8x8_t(0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08);</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> uint8x8_t inc = {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08};</div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> compactmask2 = vadd_u8(compactmask2, inc);</div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> <span class="comment">// store each result (with the second store possibly overlapping the first)</span></div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> vst1_u8((uint8_t*)output1, vqtbl1_u8(*<span class="keyword">this</span>, compactmask1));</div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> vst1_u8((uint8_t*)output2, vqtbl1_u8(*<span class="keyword">this</span>, compactmask2));</div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> }</div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> </div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> L&gt;</div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> simdjson_inline simd8&lt;L&gt; lookup_16(</div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> L replace0, L replace1, L replace2, L replace3,</div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> L replace4, L replace5, L replace6, L replace7,</div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> L replace8, L replace9, L replace10, L replace11,</div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> L replace12, L replace13, L replace14, L replace15)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> <span class="keywordflow">return</span> lookup_16(simd8&lt;L&gt;::repeat_16(</div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> replace0, replace1, replace2, replace3,</div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> replace4, replace5, replace6, replace7,</div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> replace8, replace9, replace10, replace11,</div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> replace12, replace13, replace14, replace15</div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> ));</div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> }</div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> </div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> simdjson_inline simd8&lt;uint8_t&gt; apply_lookup_16_to(<span class="keyword">const</span> simd8&lt;T&gt; original) {</div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span> <span class="keywordflow">return</span> vqtbl1q_u8(*<span class="keyword">this</span>, simd8&lt;uint8_t&gt;(original));</div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> }</div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> };</div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> </div>
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> <span class="comment">// Signed bytes</span></div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> <span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> <span class="keyword">struct </span>simd8&lt;int8_t&gt; {</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> int8x16_t value;</div>
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> </div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> <span class="keyword">static</span> simdjson_inline simd8&lt;int8_t&gt; splat(int8_t _value) { <span class="keywordflow">return</span> vmovq_n_s8(_value); }</div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span> <span class="keyword">static</span> simdjson_inline simd8&lt;int8_t&gt; zero() { <span class="keywordflow">return</span> vdupq_n_s8(0); }</div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> <span class="keyword">static</span> simdjson_inline simd8&lt;int8_t&gt; load(<span class="keyword">const</span> int8_t values[16]) { <span class="keywordflow">return</span> vld1q_s8(values); }</div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> </div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> <span class="comment">// Conversion from/to SIMD register</span></div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> simdjson_inline simd8(<span class="keyword">const</span> int8x16_t _value) : value{_value} {}</div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span> simdjson_inline <span class="keyword">operator</span> <span class="keyword">const</span> int8x16_t&amp;() <span class="keyword">const</span> { <span class="keywordflow">return</span> this-&gt;value; }</div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"> 333</span> simdjson_inline <span class="keyword">operator</span> int8x16_t&amp;() { <span class="keywordflow">return</span> this-&gt;value; }</div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> </div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span> <span class="comment">// Zero constructor</span></div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"> 336</span> simdjson_inline simd8() : simd8(zero()) {}</div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"> 337</span> <span class="comment">// Splat constructor</span></div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}</div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> <span class="comment">// Array constructor</span></div>
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> simdjson_inline simd8(<span class="keyword">const</span> int8_t* values) : simd8(load(values)) {}</div>
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> <span class="comment">// Member-by-member initialization</span></div>
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> simdjson_inline simd8(</div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,</div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15</div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> ) : simd8(simdjson_make_int8x16_t(</div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> v0, v1, v2, v3, v4, v5, v6, v7,</div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> v8, v9, v10,v11,v12,v13,v14,v15</div>
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> )) {}</div>
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> simdjson_inline simd8(</div>
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,</div>
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15</div>
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span> ) : simd8(int8x16_t{</div>
<div class="line"><a id="l00355" name="l00355"></a><span class="lineno"> 355</span> v0, v1, v2, v3, v4, v5, v6, v7,</div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno"> 356</span> v8, v9, v10,v11,v12,v13,v14,v15</div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno"> 357</span> }) {}</div>
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> <span class="comment">// Repeat 16 values as many times as necessary (usually for lookup tables)</span></div>
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span> simdjson_inline <span class="keyword">static</span> simd8&lt;int8_t&gt; repeat_16(</div>
<div class="line"><a id="l00361" name="l00361"></a><span class="lineno"> 361</span> int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,</div>
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"> 362</span> int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15</div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> ) {</div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno"> 364</span> <span class="keywordflow">return</span> simd8&lt;int8_t&gt;(</div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> v0, v1, v2, v3, v4, v5, v6, v7,</div>
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> v8, v9, v10,v11,v12,v13,v14,v15</div>
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> );</div>
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> }</div>
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> </div>
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> <span class="comment">// Store to array</span></div>
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"> 371</span> simdjson_inline <span class="keywordtype">void</span> store(int8_t dst[16])<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vst1q_s8(dst, *<span class="keyword">this</span>); }</div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> </div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span> <span class="comment">// Explicit conversion to/from unsigned</span></div>
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span> <span class="comment">//</span></div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> <span class="comment">// Under Visual Studio/ARM64 uint8x16_t and int8x16_t are apparently the same type.</span></div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span> <span class="comment">// In theory, we could check this occurrence with std::same_as and std::enabled_if but it is C++14</span></div>
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"> 377</span> <span class="comment">// and relatively ugly and hard to read.</span></div>
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span><span class="preprocessor">#ifndef SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> simdjson_inline <span class="keyword">explicit</span> simd8(<span class="keyword">const</span> uint8x16_t other): simd8(vreinterpretq_s8_u8(other)) {}</div>
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"> 380</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span> simdjson_inline <span class="keyword">explicit</span> <span class="keyword">operator</span> simd8&lt;uint8_t&gt;()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vreinterpretq_u8_s8(this-&gt;value); }</div>
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno"> 382</span> </div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"> 383</span> <span class="comment">// Math</span></div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span> simdjson_inline simd8&lt;int8_t&gt; operator+(<span class="keyword">const</span> simd8&lt;int8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vaddq_s8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"> 385</span> simdjson_inline simd8&lt;int8_t&gt; operator-(<span class="keyword">const</span> simd8&lt;int8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vsubq_s8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"> 386</span> simdjson_inline simd8&lt;int8_t&gt;&amp; operator+=(<span class="keyword">const</span> simd8&lt;int8_t&gt; other) { *<span class="keyword">this</span> = *<span class="keyword">this</span> + other; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> simdjson_inline simd8&lt;int8_t&gt;&amp; operator-=(<span class="keyword">const</span> simd8&lt;int8_t&gt; other) { *<span class="keyword">this</span> = *<span class="keyword">this</span> - other; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"> 388</span> </div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"> 389</span> <span class="comment">// Order-sensitive comparisons</span></div>
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> simdjson_inline simd8&lt;int8_t&gt; max_val(<span class="keyword">const</span> simd8&lt;int8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vmaxq_s8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"> 391</span> simdjson_inline simd8&lt;int8_t&gt; min_val(<span class="keyword">const</span> simd8&lt;int8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vminq_s8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> simdjson_inline simd8&lt;bool&gt; operator&gt;(<span class="keyword">const</span> simd8&lt;int8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vcgtq_s8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span> simdjson_inline simd8&lt;bool&gt; operator&lt;(<span class="keyword">const</span> simd8&lt;int8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vcltq_s8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> simdjson_inline simd8&lt;bool&gt; <a class="code hl_function" href="namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#aab771b17058b0c93bdd0a8679c2c4d84">operator==</a>(<span class="keyword">const</span> simd8&lt;int8_t&gt; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vceqq_s8(*<span class="keyword">this</span>, other); }</div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> </div>
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> N=1&gt;</div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> simdjson_inline simd8&lt;int8_t&gt; prev(<span class="keyword">const</span> simd8&lt;int8_t&gt; prev_chunk)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"> 398</span> <span class="keywordflow">return</span> vextq_s8(prev_chunk, *<span class="keyword">this</span>, 16 - N);</div>
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span> }</div>
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno"> 400</span> </div>
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"> 401</span> <span class="comment">// Perform a lookup assuming no value is larger than 16</span></div>
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> L&gt;</div>
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> simdjson_inline simd8&lt;L&gt; lookup_16(simd8&lt;L&gt; lookup_table)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> <span class="keywordflow">return</span> lookup_table.apply_lookup_16_to(*<span class="keyword">this</span>);</div>
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> }</div>
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> L&gt;</div>
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> simdjson_inline simd8&lt;L&gt; lookup_16(</div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> L replace0, L replace1, L replace2, L replace3,</div>
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"> 409</span> L replace4, L replace5, L replace6, L replace7,</div>
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> L replace8, L replace9, L replace10, L replace11,</div>
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> L replace12, L replace13, L replace14, L replace15)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> <span class="keywordflow">return</span> lookup_16(simd8&lt;L&gt;::repeat_16(</div>
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> replace0, replace1, replace2, replace3,</div>
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> replace4, replace5, replace6, replace7,</div>
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span> replace8, replace9, replace10, replace11,</div>
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> replace12, replace13, replace14, replace15</div>
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span> ));</div>
<div class="line"><a id="l00418" name="l00418"></a><span class="lineno"> 418</span> }</div>
<div class="line"><a id="l00419" name="l00419"></a><span class="lineno"> 419</span> </div>
<div class="line"><a id="l00420" name="l00420"></a><span class="lineno"> 420</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span> simdjson_inline simd8&lt;int8_t&gt; apply_lookup_16_to(<span class="keyword">const</span> simd8&lt;T&gt; original) {</div>
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> <span class="keywordflow">return</span> vqtbl1q_s8(*<span class="keyword">this</span>, simd8&lt;uint8_t&gt;(original));</div>
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"> 423</span> }</div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"> 424</span> };</div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> </div>
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"> 426</span> <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span> <span class="keyword">struct </span>simd8x64 {</div>
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"> 428</span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">int</span> NUM_CHUNKS = 64 / <span class="keyword">sizeof</span>(simd8&lt;T&gt;);</div>
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno"> 429</span> <span class="keyword">static_assert</span>(NUM_CHUNKS == 4, <span class="stringliteral">&quot;ARM kernel should use four registers per 64-byte block.&quot;</span>);</div>
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno"> 430</span> <span class="keyword">const</span> simd8&lt;T&gt; chunks[NUM_CHUNKS];</div>
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span> <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> <span class="keywordtype">id</span>x&gt; simd8&lt;uint8_t&gt; get()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> idx &lt; NUM_CHUNKS ? chunks[idx] : simd8&lt;T&gt;(); }</div>
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> </div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span> simd8x64(<span class="keyword">const</span> simd8x64&lt;T&gt;&amp; o) = <span class="keyword">delete</span>; <span class="comment">// no copy allowed</span></div>
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno"> 434</span> simd8x64&lt;T&gt;&amp; operator=(<span class="keyword">const</span> simd8&lt;T&gt;&amp; other) = <span class="keyword">delete</span>; <span class="comment">// no assignment allowed</span></div>
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"> 435</span> simd8x64() = <span class="keyword">delete</span>; <span class="comment">// no default constructor allowed</span></div>
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span> </div>
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"> 437</span> simdjson_inline simd8x64(<span class="keyword">const</span> simd8&lt;T&gt; chunk0, <span class="keyword">const</span> simd8&lt;T&gt; chunk1, <span class="keyword">const</span> simd8&lt;T&gt; chunk2, <span class="keyword">const</span> simd8&lt;T&gt; chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {}</div>
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span> simdjson_inline simd8x64(<span class="keyword">const</span> T ptr[64]) : chunks{simd8&lt;T&gt;::load(ptr), simd8&lt;T&gt;::load(ptr+16), simd8&lt;T&gt;::load(ptr+32), simd8&lt;T&gt;::load(ptr+48)} {}</div>
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> </div>
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> simdjson_inline <span class="keywordtype">void</span> store(T ptr[64])<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> this-&gt;chunks[0].store(ptr+<span class="keyword">sizeof</span>(simd8&lt;T&gt;)*0);</div>
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> this-&gt;chunks[1].store(ptr+<span class="keyword">sizeof</span>(simd8&lt;T&gt;)*1);</div>
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span> this-&gt;chunks[2].store(ptr+<span class="keyword">sizeof</span>(simd8&lt;T&gt;)*2);</div>
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span> this-&gt;chunks[3].store(ptr+<span class="keyword">sizeof</span>(simd8&lt;T&gt;)*3);</div>
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span> }</div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"> 446</span> </div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"> 447</span> simdjson_inline simd8&lt;T&gt; reduce_or()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno"> 448</span> <span class="keywordflow">return</span> (this-&gt;chunks[0] | this-&gt;chunks[1]) | (this-&gt;chunks[2] | this-&gt;chunks[3]);</div>
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno"> 449</span> }</div>
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"> 450</span> </div>
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span> </div>
<div class="line"><a id="l00452" name="l00452"></a><span class="lineno"> 452</span> simdjson_inline uint64_t compress(uint64_t mask, T * output)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00453" name="l00453"></a><span class="lineno"> 453</span> uint64_t popcounts = vget_lane_u64(vreinterpret_u64_u8(vcnt_u8(vcreate_u8(~mask))), 0);</div>
<div class="line"><a id="l00454" name="l00454"></a><span class="lineno"> 454</span> <span class="comment">// compute the prefix sum of the popcounts of each byte</span></div>
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> uint64_t offsets = popcounts * 0x0101010101010101;</div>
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> this-&gt;chunks[0].compress_halves(uint16_t(mask), output, &amp;output[popcounts &amp; 0xFF]);</div>
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> this-&gt;chunks[1].compress_halves(uint16_t(mask &gt;&gt; 16), &amp;output[(offsets &gt;&gt; 8) &amp; 0xFF], &amp;output[(offsets &gt;&gt; 16) &amp; 0xFF]);</div>
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> this-&gt;chunks[2].compress_halves(uint16_t(mask &gt;&gt; 32), &amp;output[(offsets &gt;&gt; 24) &amp; 0xFF], &amp;output[(offsets &gt;&gt; 32) &amp; 0xFF]);</div>
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> this-&gt;chunks[3].compress_halves(uint16_t(mask &gt;&gt; 48), &amp;output[(offsets &gt;&gt; 40) &amp; 0xFF], &amp;output[(offsets &gt;&gt; 48) &amp; 0xFF]);</div>
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> <span class="keywordflow">return</span> offsets &gt;&gt; 56;</div>
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> }</div>
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> </div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span> simdjson_inline uint64_t to_bitmask()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span><span class="preprocessor">#if SIMDJSON_REGULAR_VISUAL_STUDIO</span></div>
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno"> 465</span> <span class="keyword">const</span> uint8x16_t bit_mask = simdjson_make_uint8x16_t(</div>
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno"> 466</span> 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,</div>
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"> 467</span> 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80</div>
<div class="line"><a id="l00468" name="l00468"></a><span class="lineno"> 468</span> );</div>
<div class="line"><a id="l00469" name="l00469"></a><span class="lineno"> 469</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00470" name="l00470"></a><span class="lineno"> 470</span> <span class="keyword">const</span> uint8x16_t bit_mask = {</div>
<div class="line"><a id="l00471" name="l00471"></a><span class="lineno"> 471</span> 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,</div>
<div class="line"><a id="l00472" name="l00472"></a><span class="lineno"> 472</span> 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80</div>
<div class="line"><a id="l00473" name="l00473"></a><span class="lineno"> 473</span> };</div>
<div class="line"><a id="l00474" name="l00474"></a><span class="lineno"> 474</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span> <span class="comment">// Add each of the elements next to each other, successively, to stuff each 8 byte mask into one.</span></div>
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"> 476</span> uint8x16_t sum0 = vpaddq_u8(this-&gt;chunks[0] &amp; bit_mask, this-&gt;chunks[1] &amp; bit_mask);</div>
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> uint8x16_t sum1 = vpaddq_u8(this-&gt;chunks[2] &amp; bit_mask, this-&gt;chunks[3] &amp; bit_mask);</div>
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> sum0 = vpaddq_u8(sum0, sum1);</div>
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"> 479</span> sum0 = vpaddq_u8(sum0, sum0);</div>
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"> 480</span> <span class="keywordflow">return</span> vgetq_lane_u64(vreinterpretq_u64_u8(sum0), 0);</div>
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span> }</div>
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"> 482</span> </div>
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"> 483</span> simdjson_inline uint64_t eq(<span class="keyword">const</span> T m)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"> 484</span> <span class="keyword">const</span> simd8&lt;T&gt; mask = simd8&lt;T&gt;::splat(m);</div>
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> <span class="keywordflow">return</span> simd8x64&lt;bool&gt;(</div>
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> this-&gt;chunks[0] == mask,</div>
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"> 487</span> this-&gt;chunks[1] == mask,</div>
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> this-&gt;chunks[2] == mask,</div>
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"> 489</span> this-&gt;chunks[3] == mask</div>
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"> 490</span> ).to_bitmask();</div>
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"> 491</span> }</div>
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"> 492</span> </div>
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno"> 493</span> simdjson_inline uint64_t lteq(<span class="keyword">const</span> T m)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"> 494</span> <span class="keyword">const</span> simd8&lt;T&gt; mask = simd8&lt;T&gt;::splat(m);</div>
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> <span class="keywordflow">return</span> simd8x64&lt;bool&gt;(</div>
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> this-&gt;chunks[0] &lt;= mask,</div>
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> this-&gt;chunks[1] &lt;= mask,</div>
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> this-&gt;chunks[2] &lt;= mask,</div>
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span> this-&gt;chunks[3] &lt;= mask</div>
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> ).to_bitmask();</div>
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno"> 501</span> }</div>
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"> 502</span> }; <span class="comment">// struct simd8x64&lt;T&gt;</span></div>
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"> 503</span> </div>
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno"> 504</span>} <span class="comment">// namespace simd</span></div>
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"> 505</span>} <span class="comment">// unnamed namespace</span></div>
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span>} <span class="comment">// namespace arm64</span></div>
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"> 507</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"> 508</span> </div>
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_ARM64_SIMD_H</span></div>
<div class="ttc" id="anamespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_html_aab771b17058b0c93bdd0a8679c2c4d84"><div class="ttname"><a href="namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#aab771b17058b0c93bdd0a8679c2c4d84">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator==</a></div><div class="ttdeci">simdjson_unused simdjson_inline bool operator==(const raw_json_string &amp;a, std::string_view c) noexcept</div><div class="ttdoc">Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...</div><div class="ttdef"><b>Definition</b> <a href="raw__json__string-inl_8h_source.html#l00147">raw_json_string-inl.h:147</a></div></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>simd.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+196
View File
@@ -0,0 +1,196 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64/stringparsing_defs.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_2stringparsing__defs_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">stringparsing_defs.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_ARM64_STRINGPARSING_DEFS_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_ARM64_STRINGPARSING_DEFS_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/arm64/base.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/arm64/simd.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;simdjson/arm64/bitmanipulation.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">namespace </span>arm64 {</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">namespace </span>{</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">using namespace </span>simd;</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// Holds backslashes and quotes locations.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="keyword">struct </span>backslash_and_quote {</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keyword">static</span> <span class="keyword">constexpr</span> uint32_t BYTES_PROCESSED = 32;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> simdjson_inline backslash_and_quote copy_and_find(<span class="keyword">const</span> uint8_t *src, uint8_t *dst);</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> simdjson_inline <span class="keywordtype">bool</span> has_quote_first() { <span class="keywordflow">return</span> ((bs_bits - 1) &amp; quote_bits) != 0; }</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> simdjson_inline <span class="keywordtype">bool</span> has_backslash() { <span class="keywordflow">return</span> bs_bits != 0; }</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> simdjson_inline <span class="keywordtype">int</span> quote_index() { <span class="keywordflow">return</span> trailing_zeroes(quote_bits); }</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> simdjson_inline <span class="keywordtype">int</span> backslash_index() { <span class="keywordflow">return</span> trailing_zeroes(bs_bits); }</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> uint32_t bs_bits;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> uint32_t quote_bits;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>}; <span class="comment">// struct backslash_and_quote</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span>simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(<span class="keyword">const</span> uint8_t *src, uint8_t *dst) {</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// this can read up to 31 bytes beyond the buffer size, but we require</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="comment">// SIMDJSON_PADDING of padding</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">static_assert</span>(<a class="code hl_variable" href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf">SIMDJSON_PADDING</a> &gt;= (BYTES_PROCESSED - 1), <span class="stringliteral">&quot;backslash and quote finder must process fewer than SIMDJSON_PADDING bytes&quot;</span>);</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> simd8&lt;uint8_t&gt; v0(src);</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> simd8&lt;uint8_t&gt; v1(src + <span class="keyword">sizeof</span>(v0));</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> v0.store(dst);</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> v1.store(dst + <span class="keyword">sizeof</span>(v0));</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="comment">// Getting a 64-bit bitmask is much cheaper than multiple 16-bit bitmasks on ARM; therefore, we</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="comment">// smash them together into a 64-byte mask and get the bitmask from there.</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> uint64_t bs_and_quote = simd8x64&lt;bool&gt;(v0 == <span class="charliteral">&#39;\\&#39;</span>, v1 == <span class="charliteral">&#39;\\&#39;</span>, v0 == <span class="charliteral">&#39;&quot;&#39;</span>, v1 == <span class="charliteral">&#39;&quot;&#39;</span>).to_bitmask();</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">return</span> {</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> uint32_t(bs_and_quote), <span class="comment">// bs_bits</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> uint32_t(bs_and_quote &gt;&gt; 32) <span class="comment">// quote_bits</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> };</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>}</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="keyword">struct </span>escaping {</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">static</span> <span class="keyword">constexpr</span> uint32_t BYTES_PROCESSED = 16;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> simdjson_inline <span class="keyword">static</span> escaping copy_and_find(<span class="keyword">const</span> uint8_t *src, uint8_t *dst);</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> simdjson_inline <span class="keywordtype">bool</span> has_escape() { <span class="keywordflow">return</span> escape_bits != 0; }</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> simdjson_inline <span class="keywordtype">int</span> escape_index() { <span class="keywordflow">return</span> trailing_zeroes(escape_bits) / 4; }</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> uint64_t escape_bits;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>}; <span class="comment">// struct escaping</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>simdjson_inline escaping escaping::copy_and_find(<span class="keyword">const</span> uint8_t *src, uint8_t *dst) {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keyword">static_assert</span>(<a class="code hl_variable" href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf">SIMDJSON_PADDING</a> &gt;= (BYTES_PROCESSED - 1), <span class="stringliteral">&quot;escaping finder must process fewer than SIMDJSON_PADDING bytes&quot;</span>);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> simd8&lt;uint8_t&gt; v(src);</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> v.store(dst);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> simd8&lt;bool&gt; is_quote = (v == <span class="charliteral">&#39;&quot;&#39;</span>);</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> simd8&lt;bool&gt; is_backslash = (v == <span class="charliteral">&#39;\\&#39;</span>);</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> simd8&lt;bool&gt; is_control = (v &lt; 32);</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">return</span> {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> (is_backslash | is_quote | is_control).to_bitmask64()</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> };</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>}</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>} <span class="comment">// unnamed namespace</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span>} <span class="comment">// namespace arm64</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_ARM64_STRINGPARSING_DEFS_H</span></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
<div class="ttc" id="anamespacesimdjson_html_aecdd750132f0eb123a6d61113b4197bf"><div class="ttname"><a href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf">simdjson::SIMDJSON_PADDING</a></div><div class="ttdeci">constexpr size_t SIMDJSON_PADDING</div><div class="ttdoc">The amount of padding needed in a buffer to parse JSON.</div><div class="ttdef"><b>Definition</b> <a href="base_8h_source.html#l00033">base.h:33</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_76d8247d4498211a7d04a3794a38eb71.html">arm64</a></li><li class="navelem"><b>stringparsing_defs.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+123
View File
@@ -0,0 +1,123 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/arm64.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('arm64_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">arm64.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_ARM64_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_ARM64_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &quot;simdjson/arm64/begin.h&quot;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/generic/amalgamated.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/arm64/end.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_ARM64_H</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><b>arm64.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+227
View File
@@ -0,0 +1,227 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/generic/ondemand/array_iterator-inl.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('array__iterator-inl_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">array_iterator-inl.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/generic/ondemand/base.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/generic/ondemand/array_iterator.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;simdjson/generic/ondemand/value-inl.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &quot;simdjson/generic/ondemand/value_iterator-inl.h&quot;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">namespace </span>SIMDJSON_IMPLEMENTATION {</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">namespace </span>ondemand {</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span>simdjson_inline <a class="code hl_function" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#aa330b23feb572f33d77516431572b643">array_iterator::array_iterator</a>(<span class="keyword">const</span> value_iterator &amp;_iter) noexcept</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> : iter{_iter}</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>{}</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
<div class="foldopen" id="foldopen00019" data-start="{" data-end="}">
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a1577fb5a95f92a4a1aaa8eee6440d572"> 19</a></span>simdjson_inline <a class="code hl_struct" href="structsimdjson_1_1simdjson__result.html">simdjson_result&lt;value&gt;</a> <a class="code hl_function" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a1577fb5a95f92a4a1aaa8eee6440d572">array_iterator::operator*</a>() noexcept {</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#if SIMDJSON_DEVELOPMENT_CHECKS</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> SIMDJSON_ASSUME(!has_been_referenced);</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> has_been_referenced = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordflow">if</span> (iter.error()) { iter.abandon(); <span class="keywordflow">return</span> iter.error(); }</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keywordflow">return</span> <a class="code hl_class" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html">value</a>(iter.child());</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>}</div>
</div>
<div class="foldopen" id="foldopen00027" data-start="{" data-end="}">
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a20cd55e63cf5bdc1561f771b4db1ac1b"> 27</a></span>simdjson_inline <span class="keywordtype">bool</span> <a class="code hl_function" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a20cd55e63cf5bdc1561f771b4db1ac1b">array_iterator::operator==</a>(<span class="keyword">const</span> <a class="code hl_class" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html">array_iterator</a> &amp;other) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordflow">return</span> !(*<span class="keyword">this</span> != other);</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>}</div>
</div>
<div class="foldopen" id="foldopen00030" data-start="{" data-end="}">
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#abbca17b48bd6c2b045b659076f1f64ce"> 30</a></span>simdjson_inline <span class="keywordtype">bool</span> <a class="code hl_function" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#abbca17b48bd6c2b045b659076f1f64ce">array_iterator::operator!=</a>(<span class="keyword">const</span> <a class="code hl_class" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html">array_iterator</a> &amp;) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">return</span> iter.is_open();</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>}</div>
</div>
<div class="foldopen" id="foldopen00033" data-start="{" data-end="}">
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a55e0ae33e5e5835c841fd082edab5937"> 33</a></span>simdjson_inline <a class="code hl_class" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html">array_iterator</a> &amp;<a class="code hl_function" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a55e0ae33e5e5835c841fd082edab5937">array_iterator::operator++</a>() noexcept {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#if SIMDJSON_DEVELOPMENT_CHECKS</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> has_been_referenced = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <a class="code hl_enumeration" href="namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9">error_code</a> error;</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="comment">// PERF NOTE this is a safety rail ... users should exit loops as soon as they receive an error, so we&#39;ll never get here.</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// However, it does not seem to make a perf difference, so we add it out of an abundance of caution.</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">if</span> (( error = iter.error() )) { <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">if</span> (( error = iter.skip_child() )) { <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">if</span> (( error = iter.has_next_element().error() )) { <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>}</div>
</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="foldopen" id="foldopen00046" data-start="{" data-end="}">
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#ae7629ba7c3cec3be3bc61d5d79c154c1"> 46</a></span>simdjson_inline <span class="keywordtype">bool</span> <a class="code hl_function" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#ae7629ba7c3cec3be3bc61d5d79c154c1">array_iterator::at_end</a>() const noexcept {</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">return</span> iter.at_end();</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>}</div>
</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span>} <span class="comment">// namespace ondemand</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span>} <span class="comment">// namespace SIMDJSON_IMPLEMENTATION</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span>simdjson_inline simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt;::simdjson_result(</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> SIMDJSON_IMPLEMENTATION::ondemand::array_iterator &amp;&amp;value</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>) noexcept</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> : SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt;(std::forward&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt;(value))</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span>{</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> first.iter.assert_is_valid();</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>}</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span>simdjson_inline simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt;::simdjson_result(<a class="code hl_enumeration" href="namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9">error_code</a> error) noexcept</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> : SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt;({}, error)</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span>{</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span>}</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>simdjson_inline simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::value&gt; simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt;::operator*() noexcept {</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">if</span> (error()) { <span class="keywordflow">return</span> error(); }</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">return</span> *first;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>}</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>simdjson_inline <span class="keywordtype">bool</span> simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt;::operator==(<span class="keyword">const</span> simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt; &amp;other) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">if</span> (!first.iter.is_valid()) { <span class="keywordflow">return</span> !error(); }</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">return</span> first == other.first;</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span>}</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>simdjson_inline <span class="keywordtype">bool</span> simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt;::operator!=(<span class="keyword">const</span> simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt; &amp;other) <span class="keyword">const</span> <span class="keyword">noexcept</span> {</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">if</span> (!first.iter.is_valid()) { <span class="keywordflow">return</span> error(); }</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">return</span> first != other.first;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>}</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span>simdjson_inline simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt; &amp;simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt;::operator++() noexcept {</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="comment">// Clear the error if there is one, so we don&#39;t yield it twice</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordflow">if</span> (error()) { second = <a class="code hl_enumvalue" href="namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa4ffc800804829a88c5b52ac3c4c6681">SUCCESS</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> ++(first);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span>}</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span>simdjson_inline <span class="keywordtype">bool</span> simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt;::at_end() const noexcept {</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">return</span> !first.iter.is_valid() || first.at_end();</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span>}</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H</span></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_html"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator</a></div><div class="ttdoc">A forward-only JSON array.</div><div class="ttdef"><b>Definition</b> <a href="array__iterator_8h_source.html#l00024">array_iterator.h:24</a></div></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_html_a1577fb5a95f92a4a1aaa8eee6440d572"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a1577fb5a95f92a4a1aaa8eee6440d572">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator*</a></div><div class="ttdeci">simdjson_inline simdjson_result&lt; value &gt; operator*() noexcept</div><div class="ttdoc">Get the current element.</div><div class="ttdef"><b>Definition</b> <a href="array__iterator-inl_8h_source.html#l00019">array_iterator-inl.h:19</a></div></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_html_a20cd55e63cf5bdc1561f771b4db1ac1b"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a20cd55e63cf5bdc1561f771b4db1ac1b">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator==</a></div><div class="ttdeci">simdjson_inline bool operator==(const array_iterator &amp;) const noexcept</div><div class="ttdoc">Check if we are at the end of the JSON.</div><div class="ttdef"><b>Definition</b> <a href="array__iterator-inl_8h_source.html#l00027">array_iterator-inl.h:27</a></div></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_html_a55e0ae33e5e5835c841fd082edab5937"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a55e0ae33e5e5835c841fd082edab5937">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator++</a></div><div class="ttdeci">simdjson_inline array_iterator &amp; operator++() noexcept</div><div class="ttdoc">Move to the next element.</div><div class="ttdef"><b>Definition</b> <a href="array__iterator-inl_8h_source.html#l00033">array_iterator-inl.h:33</a></div></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_html_aa330b23feb572f33d77516431572b643"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#aa330b23feb572f33d77516431572b643">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::array_iterator</a></div><div class="ttdeci">simdjson_inline array_iterator() noexcept=default</div><div class="ttdoc">Create a new, invalid array iterator.</div></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_html_abbca17b48bd6c2b045b659076f1f64ce"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#abbca17b48bd6c2b045b659076f1f64ce">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator!=</a></div><div class="ttdeci">simdjson_inline bool operator!=(const array_iterator &amp;) const noexcept</div><div class="ttdoc">Check if there are more elements in the JSON array.</div><div class="ttdef"><b>Definition</b> <a href="array__iterator-inl_8h_source.html#l00030">array_iterator-inl.h:30</a></div></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_html_ae7629ba7c3cec3be3bc61d5d79c154c1"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#ae7629ba7c3cec3be3bc61d5d79c154c1">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::at_end</a></div><div class="ttdeci">simdjson_warn_unused simdjson_inline bool at_end() const noexcept</div><div class="ttdoc">Check if the array is at the end.</div><div class="ttdef"><b>Definition</b> <a href="array__iterator-inl_8h_source.html#l00046">array_iterator-inl.h:46</a></div></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_html"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value</a></div><div class="ttdoc">An ephemeral JSON value returned during iteration.</div><div class="ttdef"><b>Definition</b> <a href="value_8h_source.html#l00022">value.h:22</a></div></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
<div class="ttc" id="anamespacesimdjson_html_a7b735a3a50ba79e3f7f14df5f77d8da9"><div class="ttname"><a href="namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9">simdjson::error_code</a></div><div class="ttdeci">error_code</div><div class="ttdoc">All possible errors returned by simdjson.</div><div class="ttdef"><b>Definition</b> <a href="error_8h_source.html#l00019">error.h:19</a></div></div>
<div class="ttc" id="anamespacesimdjson_html_a7b735a3a50ba79e3f7f14df5f77d8da9aa4ffc800804829a88c5b52ac3c4c6681"><div class="ttname"><a href="namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa4ffc800804829a88c5b52ac3c4c6681">simdjson::SUCCESS</a></div><div class="ttdeci">@ SUCCESS</div><div class="ttdoc">No error.</div><div class="ttdef"><b>Definition</b> <a href="error_8h_source.html#l00020">error.h:20</a></div></div>
<div class="ttc" id="astructsimdjson_1_1simdjson__result_html"><div class="ttname"><a href="structsimdjson_1_1simdjson__result.html">simdjson::simdjson_result</a></div><div class="ttdoc">The result of a simdjson operation that could fail.</div><div class="ttdef"><b>Definition</b> <a href="error_8h_source.html#l00280">error.h:280</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_53368a02099cf3699f2996a5d88d70b6.html">generic</a></li><li class="navelem"><a class="el" href="dir_7796bb4b727f918c96faee1bdd50e49a.html">ondemand</a></li><li class="navelem"><b>array_iterator-inl.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+208
View File
@@ -0,0 +1,208 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/generic/ondemand/array_iterator.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('array__iterator_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">array_iterator.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &lt;iterator&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/generic/implementation_simdjson_result_base.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;simdjson/generic/ondemand/base.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &quot;simdjson/generic/ondemand/value_iterator.h&quot;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">namespace </span>SIMDJSON_IMPLEMENTATION {</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">namespace </span>ondemand {</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="foldopen" id="foldopen00024" data-start="{" data-end="};">
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html"> 24</a></span><span class="keyword">class </span><a class="code hl_class" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html">array_iterator</a> {</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">using </span>iterator_category = std::input_iterator_tag;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">using </span><a class="code hl_struct" href="structsimdjson_1_1simdjson__result.html">value_type</a> = <a class="code hl_struct" href="structsimdjson_1_1simdjson__result.html">simdjson_result&lt;value&gt;</a>;</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">using </span>difference_type = std::ptrdiff_t;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">using </span>pointer = void;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">using </span><a class="code hl_struct" href="structsimdjson_1_1simdjson__result.html">reference</a> = <a class="code hl_struct" href="structsimdjson_1_1simdjson__result.html">value_type</a>;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#aa330b23feb572f33d77516431572b643"> 33</a></span> simdjson_inline <a class="code hl_function" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#aa330b23feb572f33d77516431572b643">array_iterator</a>() noexcept = default;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="comment">//</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// Iterator interface</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="comment">//</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> simdjson_inline <a class="code hl_struct" href="structsimdjson_1_1simdjson__result.html">simdjson_result</a>&lt;<a class="code hl_class" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html">value</a>&gt;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> operator*() noexcept; <span class="comment">// MUST ONLY BE CALLED ONCE PER ITERATION.</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> simdjson_inline <span class="keywordtype">bool</span> operator==(const <a class="code hl_class" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html">array_iterator</a> &amp;) const noexcept;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> simdjson_inline <span class="keywordtype">bool</span> operator!=(const <a class="code hl_class" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html">array_iterator</a> &amp;) const noexcept;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> simdjson_inline <a class="code hl_class" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html">array_iterator</a> &amp;operator++() noexcept;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> simdjson_warn_unused simdjson_inline <span class="keywordtype">bool</span> <a class="code hl_function" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#ae7629ba7c3cec3be3bc61d5d79c154c1">at_end</a>() const noexcept;</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span>private:</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="preprocessor">#if SIMDJSON_DEVELOPMENT_CHECKS</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">bool</span> has_been_referenced{<span class="keyword">false</span>};</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> value_iterator iter{};</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> simdjson_inline <a class="code hl_function" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#aa330b23feb572f33d77516431572b643">array_iterator</a>(<span class="keyword">const</span> value_iterator &amp;iter) <span class="keyword">noexcept</span>;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keyword">friend</span> <span class="keyword">class </span>array;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keyword">friend</span> <span class="keyword">class </span>value;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keyword">friend</span> <span class="keyword">struct </span><a class="code hl_struct" href="structsimdjson_1_1simdjson__result.html">simdjson_result</a>&lt;<a class="code hl_function" href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#aa330b23feb572f33d77516431572b643">array_iterator</a>&gt;;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span>};</div>
</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span>} <span class="comment">// namespace ondemand</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span>} <span class="comment">// namespace SIMDJSON_IMPLEMENTATION</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span><span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="keyword">struct </span>simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt; : <span class="keyword">public</span> SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt; {</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keyword">using </span>iterator_category = std::input_iterator_tag;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keyword">using </span>value_type = simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::value&gt;;</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keyword">using </span>difference_type = std::ptrdiff_t;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keyword">using </span>pointer = void;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keyword">using </span>reference = value_type;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> simdjson_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::array_iterator &amp;&amp;value) <span class="keyword">noexcept</span>; </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> simdjson_inline simdjson_result(<a class="code hl_enumeration" href="namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9">error_code</a> <a class="code hl_function" href="structsimdjson_1_1simdjson__result.html#a23470fcc7f01262019e96d3f3010b4a1">error</a>) <span class="keyword">noexcept</span>; </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> simdjson_inline simdjson_result() noexcept = default;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="comment">//</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="comment">// Iterator interface</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="comment">//</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> simdjson_inline simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::value&gt; operator*() noexcept; <span class="comment">// MUST ONLY BE CALLED ONCE PER ITERATION.</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> simdjson_inline <span class="keywordtype">bool</span> operator==(const simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt; &amp;) const noexcept;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> simdjson_inline <span class="keywordtype">bool</span> operator!=(const simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt; &amp;) const noexcept;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> simdjson_inline simdjson_result&lt;SIMDJSON_IMPLEMENTATION::ondemand::array_iterator&gt; &amp;operator++() noexcept;</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> simdjson_warn_unused simdjson_inline <span class="keywordtype">bool</span> at_end() const noexcept;</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span>};</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H</span></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_html"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator</a></div><div class="ttdoc">A forward-only JSON array.</div><div class="ttdef"><b>Definition</b> <a href="array__iterator_8h_source.html#l00024">array_iterator.h:24</a></div></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_html_aa330b23feb572f33d77516431572b643"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#aa330b23feb572f33d77516431572b643">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::array_iterator</a></div><div class="ttdeci">simdjson_inline array_iterator() noexcept=default</div><div class="ttdoc">Create a new, invalid array iterator.</div></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_html_ae7629ba7c3cec3be3bc61d5d79c154c1"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#ae7629ba7c3cec3be3bc61d5d79c154c1">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::at_end</a></div><div class="ttdeci">simdjson_warn_unused simdjson_inline bool at_end() const noexcept</div><div class="ttdoc">Check if the array is at the end.</div><div class="ttdef"><b>Definition</b> <a href="array__iterator-inl_8h_source.html#l00046">array_iterator-inl.h:46</a></div></div>
<div class="ttc" id="aclasssimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_html"><div class="ttname"><a href="classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html">simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value</a></div><div class="ttdoc">An ephemeral JSON value returned during iteration.</div><div class="ttdef"><b>Definition</b> <a href="value_8h_source.html#l00022">value.h:22</a></div></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
<div class="ttc" id="anamespacesimdjson_html_a7b735a3a50ba79e3f7f14df5f77d8da9"><div class="ttname"><a href="namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9">simdjson::error_code</a></div><div class="ttdeci">error_code</div><div class="ttdoc">All possible errors returned by simdjson.</div><div class="ttdef"><b>Definition</b> <a href="error_8h_source.html#l00019">error.h:19</a></div></div>
<div class="ttc" id="astructsimdjson_1_1simdjson__result_html"><div class="ttname"><a href="structsimdjson_1_1simdjson__result.html">simdjson::simdjson_result</a></div><div class="ttdoc">The result of a simdjson operation that could fail.</div><div class="ttdef"><b>Definition</b> <a href="error_8h_source.html#l00280">error.h:280</a></div></div>
<div class="ttc" id="astructsimdjson_1_1simdjson__result_html_a23470fcc7f01262019e96d3f3010b4a1"><div class="ttname"><a href="structsimdjson_1_1simdjson__result.html#a23470fcc7f01262019e96d3f3010b4a1">simdjson::simdjson_result::error</a></div><div class="ttdeci">simdjson_inline error_code error() const noexcept</div><div class="ttdoc">The error.</div><div class="ttdef"><b>Definition</b> <a href="error-inl_8h_source.html#l00168">error-inl.h:168</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_53368a02099cf3699f2996a5d88d70b6.html">generic</a></li><li class="navelem"><a class="el" href="dir_7796bb4b727f918c96faee1bdd50e49a.html">ondemand</a></li><li class="navelem"><b>array_iterator.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+147
View File
@@ -0,0 +1,147 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/internal/atomic_ptr.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('atomic__ptr_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">atomic_ptr.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_INTERNAL_ATOMIC_PTR_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SIMDJSON_INTERNAL_ATOMIC_PTR_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &quot;simdjson/base.h&quot;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &lt;atomic&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="keyword">namespace </span>internal {</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">class </span>atomic_ptr {</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> atomic_ptr(T *_ptr) : ptr{_ptr} {}</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">operator</span> <span class="keyword">const</span> T*() <span class="keyword">const</span> { <span class="keywordflow">return</span> ptr.load(); }</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">const</span> T&amp; operator*()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *ptr; }</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keyword">const</span> T* operator-&gt;()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ptr.load(); }</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <span class="keyword">operator</span> T*() { <span class="keywordflow">return</span> ptr.load(); }</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> T&amp; operator*() { <span class="keywordflow">return</span> *ptr; }</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> T* operator-&gt;() { <span class="keywordflow">return</span> ptr.load(); }</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> atomic_ptr&amp; operator=(T *_ptr) { ptr = _ptr; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> std::atomic&lt;T*&gt; ptr;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>};</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>} <span class="comment">// namespace internal</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_INTERNAL_ATOMIC_PTR_H</span></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_0fee190c3bc9a7d22e6d44901a62fa54.html">internal</a></li><li class="navelem"><b>atomic_ptr.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+193
View File
@@ -0,0 +1,193 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/generic/atomparsing.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('atomparsing_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">atomparsing.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef SIMDJSON_GENERIC_ATOMPARSING_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#ifndef SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#define SIMDJSON_GENERIC_ATOMPARSING_H</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include &quot;simdjson/generic/base.h&quot;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;simdjson/generic/jsoncharutils.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_CONDITIONAL_INCLUDE</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include &lt;cstring&gt;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">namespace </span>SIMDJSON_IMPLEMENTATION {</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">namespace </span>{</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">namespace </span>atomparsing {</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">// The string_to_uint32 is exclusively used to map literal strings to 32-bit values.</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// be certain that the character pointer will be properly aligned.</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// You might think that using memcpy makes this function expensive, but you&#39;d be wrong.</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32(&quot;false&quot;);</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// to the compile-time constant 1936482662.</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>simdjson_inline uint32_t string_to_uint32(<span class="keyword">const</span> <span class="keywordtype">char</span>* str) { uint32_t val; std::memcpy(&amp;val, str, <span class="keyword">sizeof</span>(uint32_t)); <span class="keywordflow">return</span> val; }</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive.</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about.</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>simdjson_warn_unused</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>simdjson_inline uint32_t str4ncmp(<span class="keyword">const</span> uint8_t *src, <span class="keyword">const</span> <span class="keywordtype">char</span>* atom) {</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> uint32_t srcval; <span class="comment">// we want to avoid unaligned 32-bit loads (undefined in C/C++)</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">static_assert</span>(<span class="keyword">sizeof</span>(uint32_t) &lt;= <a class="code hl_variable" href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf">SIMDJSON_PADDING</a>, <span class="stringliteral">&quot;SIMDJSON_PADDING must be larger than 4 bytes&quot;</span>);</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> std::memcpy(&amp;srcval, src, <span class="keyword">sizeof</span>(uint32_t));</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">return</span> srcval ^ string_to_uint32(atom);</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span>}</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span>simdjson_warn_unused</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span>simdjson_inline <span class="keywordtype">bool</span> is_valid_true_atom(<span class="keyword">const</span> uint8_t *src) {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">return</span> (str4ncmp(src, <span class="stringliteral">&quot;true&quot;</span>) | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span>}</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span>simdjson_warn_unused</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span>simdjson_inline <span class="keywordtype">bool</span> is_valid_true_atom(<span class="keyword">const</span> uint8_t *src, <span class="keywordtype">size_t</span> len) {</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">if</span> (len &gt; 4) { <span class="keywordflow">return</span> is_valid_true_atom(src); }</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (len == 4) { <span class="keywordflow">return</span> !str4ncmp(src, <span class="stringliteral">&quot;true&quot;</span>); }</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">else</span> { <span class="keywordflow">return</span> <span class="keyword">false</span>; }</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span>}</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>simdjson_warn_unused</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span>simdjson_inline <span class="keywordtype">bool</span> is_valid_false_atom(<span class="keyword">const</span> uint8_t *src) {</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">return</span> (str4ncmp(src+1, <span class="stringliteral">&quot;alse&quot;</span>) | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span>}</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span>simdjson_warn_unused</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span>simdjson_inline <span class="keywordtype">bool</span> is_valid_false_atom(<span class="keyword">const</span> uint8_t *src, <span class="keywordtype">size_t</span> len) {</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">if</span> (len &gt; 5) { <span class="keywordflow">return</span> is_valid_false_atom(src); }</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (len == 5) { <span class="keywordflow">return</span> !str4ncmp(src+1, <span class="stringliteral">&quot;alse&quot;</span>); }</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordflow">else</span> { <span class="keywordflow">return</span> <span class="keyword">false</span>; }</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span>}</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>simdjson_warn_unused</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>simdjson_inline <span class="keywordtype">bool</span> is_valid_null_atom(<span class="keyword">const</span> uint8_t *src) {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">return</span> (str4ncmp(src, <span class="stringliteral">&quot;null&quot;</span>) | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span>}</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span>simdjson_warn_unused</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span>simdjson_inline <span class="keywordtype">bool</span> is_valid_null_atom(<span class="keyword">const</span> uint8_t *src, <span class="keywordtype">size_t</span> len) {</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">if</span> (len &gt; 4) { <span class="keywordflow">return</span> is_valid_null_atom(src); }</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (len == 4) { <span class="keywordflow">return</span> !str4ncmp(src, <span class="stringliteral">&quot;null&quot;</span>); }</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">else</span> { <span class="keywordflow">return</span> <span class="keyword">false</span>; }</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>}</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>} <span class="comment">// namespace atomparsing</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span>} <span class="comment">// unnamed namespace</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span>} <span class="comment">// namespace SIMDJSON_IMPLEMENTATION</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_GENERIC_ATOMPARSING_H</span></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
<div class="ttc" id="anamespacesimdjson_html_aecdd750132f0eb123a6d61113b4197bf"><div class="ttname"><a href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf">simdjson::SIMDJSON_PADDING</a></div><div class="ttdeci">constexpr size_t SIMDJSON_PADDING</div><div class="ttdoc">The amount of padding needed in a buffer to parse JSON.</div><div class="ttdef"><b>Definition</b> <a href="base_8h_source.html#l00033">base.h:33</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><a class="el" href="dir_53368a02099cf3699f2996a5d88d70b6.html">generic</a></li><li class="navelem"><b>atomparsing.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
+165
View File
@@ -0,0 +1,165 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: include/simdjson/base.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('base_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">base.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#ifndef SIMDJSON_BASE_H</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#define SIMDJSON_BASE_H</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &quot;simdjson/common_defs.h&quot;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include &quot;simdjson/compiler_check.h&quot;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &quot;simdjson/error.h&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include &quot;simdjson/portability.h&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include &quot;simdjson/concepts.h&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &quot;simdjson/constevalutil.h&quot;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacesimdjson.html">simdjson</a> {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span>SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="namespacesimdjson.html#ad0bad3783275be4012bd5cfd0327875a"> 23</a></span><span class="keyword">constexpr</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="namespacesimdjson.html#ad0bad3783275be4012bd5cfd0327875a">SIMDJSON_MAXSIZE_BYTES</a> = 0xFFFFFFFF;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf"> 33</a></span><span class="keyword">constexpr</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf">SIMDJSON_PADDING</a> = 64;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="namespacesimdjson.html#a6df2598eb1d4e1ea669c41831cc7325d"> 40</a></span><span class="keyword">constexpr</span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="namespacesimdjson.html#a6df2598eb1d4e1ea669c41831cc7325d">DEFAULT_MAX_DEPTH</a> = 1024;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span>SIMDJSON_POP_DISABLE_UNUSED_WARNINGS</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="keyword">class </span><a class="code hl_class" href="classsimdjson_1_1implementation.html">implementation</a>;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="keyword">struct </span><a class="code hl_struct" href="structsimdjson_1_1padded__string.html">padded_string</a>;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="keyword">class </span><a class="code hl_class" href="classsimdjson_1_1padded__string__view.html">padded_string_view</a>;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="keyword">enum class</span> <a class="code hl_enumeration" href="namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811">stage1_mode</a>;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="keyword">namespace </span>internal {</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="keyword">class </span>atomic_ptr;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="keyword">class </span>dom_parser_implementation;</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="keyword">class </span>escape_json_string;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="keyword">class </span>tape_ref;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="keyword">struct </span>value128;</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="keyword">enum class</span> tape_type;</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span>} <span class="comment">// namespace internal</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>} <span class="comment">// namespace simdjson</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="preprocessor">#endif </span><span class="comment">// SIMDJSON_BASE_H</span></div>
<div class="ttc" id="aclasssimdjson_1_1implementation_html"><div class="ttname"><a href="classsimdjson_1_1implementation.html">simdjson::implementation</a></div><div class="ttdoc">An implementation of simdjson for a particular CPU architecture.</div><div class="ttdef"><b>Definition</b> <a href="implementation_8h_source.html#l00045">implementation.h:45</a></div></div>
<div class="ttc" id="aclasssimdjson_1_1padded__string__view_html"><div class="ttname"><a href="classsimdjson_1_1padded__string__view.html">simdjson::padded_string_view</a></div><div class="ttdoc">User-provided string that promises it has extra padded bytes at the end for use with parser::parse().</div><div class="ttdef"><b>Definition</b> <a href="padded__string__view_8h_source.html#l00018">padded_string_view.h:18</a></div></div>
<div class="ttc" id="anamespacesimdjson_html"><div class="ttname"><a href="namespacesimdjson.html">simdjson</a></div><div class="ttdoc">The top level simdjson namespace, containing everything the library provides.</div><div class="ttdef"><b>Definition</b> <a href="arm64_2base_8h_source.html#l00008">base.h:8</a></div></div>
<div class="ttc" id="anamespacesimdjson_html_a6df2598eb1d4e1ea669c41831cc7325d"><div class="ttname"><a href="namespacesimdjson.html#a6df2598eb1d4e1ea669c41831cc7325d">simdjson::DEFAULT_MAX_DEPTH</a></div><div class="ttdeci">constexpr size_t DEFAULT_MAX_DEPTH</div><div class="ttdoc">By default, simdjson supports this many nested objects and arrays.</div><div class="ttdef"><b>Definition</b> <a href="base_8h_source.html#l00040">base.h:40</a></div></div>
<div class="ttc" id="anamespacesimdjson_html_ad0bad3783275be4012bd5cfd0327875a"><div class="ttname"><a href="namespacesimdjson.html#ad0bad3783275be4012bd5cfd0327875a">simdjson::SIMDJSON_MAXSIZE_BYTES</a></div><div class="ttdeci">SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS constexpr size_t SIMDJSON_MAXSIZE_BYTES</div><div class="ttdoc">The maximum document size supported by simdjson.</div><div class="ttdef"><b>Definition</b> <a href="base_8h_source.html#l00023">base.h:23</a></div></div>
<div class="ttc" id="anamespacesimdjson_html_ae6ec9f0ce23fc51d87116b64fdbeb811"><div class="ttname"><a href="namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811">simdjson::stage1_mode</a></div><div class="ttdeci">stage1_mode</div><div class="ttdoc">This enum is used with the dom_parser_implementation::stage1 function.</div><div class="ttdef"><b>Definition</b> <a href="internal_2dom__parser__implementation_8h_source.html#l00022">dom_parser_implementation.h:22</a></div></div>
<div class="ttc" id="anamespacesimdjson_html_aecdd750132f0eb123a6d61113b4197bf"><div class="ttname"><a href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf">simdjson::SIMDJSON_PADDING</a></div><div class="ttdeci">constexpr size_t SIMDJSON_PADDING</div><div class="ttdoc">The amount of padding needed in a buffer to parse JSON.</div><div class="ttdef"><b>Definition</b> <a href="base_8h_source.html#l00033">base.h:33</a></div></div>
<div class="ttc" id="astructsimdjson_1_1padded__string_html"><div class="ttname"><a href="structsimdjson_1_1padded__string.html">simdjson::padded_string</a></div><div class="ttdoc">String with extra allocation for ease of use with parser::parse()</div><div class="ttdef"><b>Definition</b> <a href="padded__string_8h_source.html#l00023">padded_string.h:23</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_49a0b2767ded4a45005c5d6720a18cd1.html">simdjson</a></li><li class="navelem"><b>base.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

-50
View File
@@ -1,50 +0,0 @@
add_subdirectory(dom)
include_directories( . linux )
link_libraries(simdjson-windows-headers test-data)
link_libraries(simdjson)
if(SIMDJSON_STATIC_REFLECTION)
add_compile_definitions(SIMDJSON_STATIC_REFLECTION=1)
endif(SIMDJSON_STATIC_REFLECTION)
add_executable(benchfeatures benchfeatures.cpp)
add_executable(get_corpus_benchmark get_corpus_benchmark.cpp)
if (TARGET benchmark::benchmark)
link_libraries(benchmark::benchmark)
add_executable(bench_parse_call bench_parse_call.cpp)
add_executable(bench_dom_api bench_dom_api.cpp)
if(SIMDJSON_EXCEPTIONS)
add_executable(bench_ondemand bench_ondemand.cpp)
if(TARGET yyjson)
target_link_libraries(bench_ondemand PRIVATE yyjson)
endif()
if(TARGET rapidjson)
target_link_libraries(bench_ondemand PRIVATE rapidjson)
endif()
if(TARGET sajson)
target_link_libraries(bench_ondemand PRIVATE sajson)
endif()
if(TARGET nlohmann_json)
target_link_libraries(bench_ondemand PRIVATE nlohmann_json)
endif()
if(TARGET boostjson)
target_link_libraries(bench_ondemand PRIVATE boostjson)
endif()
endif()
endif()
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++20" SIMDJSON_COMPILER_SUPPORTS_CXX20)
if(SIMDJSON_STATIC_REFLECTION)
add_subdirectory(static_reflect)
else()
if(SIMDJSON_EXCEPTIONS AND SIMDJSON_COMPILER_SUPPORTS_CXX20)
add_subdirectory(from)
add_subdirectory(car_builder)
endif()
endif(SIMDJSON_STATIC_REFLECTION)
-46
View File
@@ -1,46 +0,0 @@
# Accessor Performance Benchmarks (C++26)
These benchmarks compare the performance of runtime vs compile-time JSON accessors.
For the comparison to be meaningful, you must build simdjson with support for
C++26 reflexion. See the `p2996` repository in the main project directory.
## Files
- `accessor_benchmark.h` - Common benchmark framework and test data
- `runtime_accessors.h` - Runtime `at_path()` benchmarks
- `compile_time_accessors.h` - Compile-time `at_path_compiled()` benchmarks (requires C++26 reflection)
## Benchmarks
Each benchmark measures parsing + single field access:
1. **accessor_simple** - Simple field: `.name`
2. **accessor_nested** - Nested field: `.address.city`
3. **accessor_deep** - Deep nested field: `.address.coordinates.lat`
## Building (Linux/macOS)
```bash
cmake -B build -D SIMDJSON_STATIC_REFLECTION=ON -DSIMDJSON_DEVELOPER_MODE=ON
cmake --build build --target=bench_ondemand
```
The `SIMDJSON_STATIC_REFLECTION` will be made unnecessary once mainstream compilers
begin supporting C++26 sufficiently well.
## Running (Linux/macOS)
```bash
# Run all accessor benchmarks
./build/bench_ondemand --benchmark_filter="accessor"
```
## Results
We find that compile-time accessors show performance improvements that scale with path depth:
- Simple fields: ~1.2x faster
- Nested fields: ~1.5x faster
- Deep nested fields: ~1.8x faster
The speedup comes from eliminating runtime path parsing and conversion overhead.
@@ -1,132 +0,0 @@
#pragma once
#include "json_benchmark/file_runner.h"
#include <string>
namespace accessor_performance {
using namespace json_benchmark;
// Test JSON for accessor benchmarks
static const char* TEST_JSON = R"({
"name": "Alice",
"age": 30,
"email": "alice@example.com",
"address": {
"street": "123 Main St",
"city": "Boston",
"state": "MA",
"zip": 12345,
"coordinates": {
"lat": 42.3601,
"lon": -71.0589
}
},
"scores": [95, 87, 92, 88, 91],
"preferences": {
"theme": "dark",
"notifications": {
"email": true,
"push": false,
"sms": true
}
}
})";
// Struct definitions for compile-time validation
#if SIMDJSON_STATIC_REFLECTION
struct Coordinates {
double lat;
double lon;
};
struct Address {
std::string street;
std::string city;
std::string state;
int64_t zip;
Coordinates coordinates;
};
struct Notifications {
bool email;
bool push;
bool sms;
};
struct Preferences {
std::string theme;
Notifications notifications;
};
struct TestData {
std::string name;
int64_t age;
std::string email;
Address address;
std::vector<int64_t> scores;
Preferences preferences;
};
#endif // SIMDJSON_STATIC_REFLECTION
// Single-access benchmark runner: measures ONE field access per iteration
template<typename I>
struct single_access_runner : public file_runner<I> {
std::string result_string;
int64_t result_int{};
double result_double{};
bool result_bool{};
bool setup(benchmark::State &state) {
this->json = simdjson::padded_string(TEST_JSON, strlen(TEST_JSON));
state.SetBytesProcessed(int64_t(state.iterations()) * int64_t(this->json.size()));
return true;
}
bool before_run(benchmark::State &state) {
if (!file_runner<I>::before_run(state)) { return false; }
result_string.clear();
result_int = 0;
result_double = 0.0;
result_bool = false;
return true;
}
bool run(benchmark::State &) {
return this->implementation.run(this->json, result_string, result_int, result_double, result_bool);
}
template<typename R>
bool diff(benchmark::State &state, single_access_runner<R> &reference) {
if (result_string != reference.result_string ||
result_int != reference.result_int ||
result_double != reference.result_double ||
result_bool != reference.result_bool) {
std::cerr << "Accessor benchmark results differ!" << std::endl;
return false;
}
return true;
}
size_t items_per_iteration() {
return 1;
}
};
// Benchmark template definitions
struct runtime_at_path_simple;
template<typename I> simdjson_inline static void accessor_simple(benchmark::State &state) {
run_json_benchmark<single_access_runner<I>, single_access_runner<runtime_at_path_simple>>(state);
}
struct runtime_at_path_nested;
template<typename I> simdjson_inline static void accessor_nested(benchmark::State &state) {
run_json_benchmark<single_access_runner<I>, single_access_runner<runtime_at_path_nested>>(state);
}
struct runtime_at_path_deep;
template<typename I> simdjson_inline static void accessor_deep(benchmark::State &state) {
run_json_benchmark<single_access_runner<I>, single_access_runner<runtime_at_path_deep>>(state);
}
} // namespace accessor_performance
@@ -1,56 +0,0 @@
#pragma once
#if SIMDJSON_EXCEPTIONS && SIMDJSON_STATIC_REFLECTION
#include "accessor_benchmark.h"
namespace accessor_performance {
using namespace simdjson;
struct compile_time_at_path_simple {
ondemand::parser parser{};
bool run(simdjson::padded_string &json, std::string &result_str, int64_t&, double&, bool&) {
auto doc = parser.iterate(json);
std::string_view name;
auto r = ondemand::json_path::at_path_compiled<TestData, ".name">(doc);
if (r.get(name) != SUCCESS) return false;
result_str = name;
return true;
}
};
struct compile_time_at_path_nested {
ondemand::parser parser{};
bool run(simdjson::padded_string &json, std::string &result_str, int64_t&, double&, bool&) {
auto doc = parser.iterate(json);
std::string_view city;
auto r = ondemand::json_path::at_path_compiled<TestData, ".address.city">(doc);
if (r.get(city) != SUCCESS) return false;
result_str = city;
return true;
}
};
struct compile_time_at_path_deep {
ondemand::parser parser{};
bool run(simdjson::padded_string &json, std::string&, int64_t&, double &result_dbl, bool&) {
auto doc = parser.iterate(json);
double lat;
auto r = ondemand::json_path::at_path_compiled<TestData, ".address.coordinates.lat">(doc);
if (r.get(lat) != SUCCESS) return false;
result_dbl = lat;
return true;
}
};
BENCHMARK_TEMPLATE(accessor_simple, compile_time_at_path_simple)->UseManualTime();
BENCHMARK_TEMPLATE(accessor_nested, compile_time_at_path_nested)->UseManualTime();
BENCHMARK_TEMPLATE(accessor_deep, compile_time_at_path_deep)->UseManualTime();
} // namespace accessor_performance
#endif // SIMDJSON_EXCEPTIONS && SIMDJSON_STATIC_REFLECTION
@@ -1,53 +0,0 @@
#pragma once
#if SIMDJSON_EXCEPTIONS
#include "accessor_benchmark.h"
namespace accessor_performance {
using namespace simdjson;
struct runtime_at_path_simple {
ondemand::parser parser{};
bool run(simdjson::padded_string &json, std::string &result_str, int64_t&, double&, bool&) {
auto doc = parser.iterate(json);
std::string_view name;
if (doc.at_path(".name").get(name) != SUCCESS) return false;
result_str = name;
return true;
}
};
struct runtime_at_path_nested {
ondemand::parser parser{};
bool run(simdjson::padded_string &json, std::string &result_str, int64_t&, double&, bool&) {
auto doc = parser.iterate(json);
std::string_view city;
if (doc.at_path(".address.city").get(city) != SUCCESS) return false;
result_str = city;
return true;
}
};
struct runtime_at_path_deep {
ondemand::parser parser{};
bool run(simdjson::padded_string &json, std::string&, int64_t&, double &result_dbl, bool&) {
auto doc = parser.iterate(json);
double lat;
if (doc.at_path(".address.coordinates.lat").get(lat) != SUCCESS) return false;
result_dbl = lat;
return true;
}
};
BENCHMARK_TEMPLATE(accessor_simple, runtime_at_path_simple)->UseManualTime();
BENCHMARK_TEMPLATE(accessor_nested, runtime_at_path_nested)->UseManualTime();
BENCHMARK_TEMPLATE(accessor_deep, runtime_at_path_deep)->UseManualTime();
} // namespace accessor_performance
#endif // SIMDJSON_EXCEPTIONS
@@ -1,73 +0,0 @@
#pragma once
#include "json_benchmark/file_runner.h"
#include <map>
#include <string>
namespace amazon_cellphones {
const bool UNTHREADED = false;
const bool THREADED = true;
using namespace json_benchmark;
struct brand {
double cumulative_rating;
uint64_t reviews_count;
simdjson_inline bool operator==(const brand &other) const {
return cumulative_rating == other.cumulative_rating &&
reviews_count == other.reviews_count;
}
simdjson_inline bool operator!=(const brand &other) const { return !(*this == other); }
};
simdjson_unused static std::ostream &operator<<(std::ostream &o, const brand &b) {
o << "cumulative_rating: " << b.cumulative_rating << std::endl;
o << "reviews_count: " << b.reviews_count << std::endl;
return o;
}
template<typename StringType>
simdjson_unused static std::ostream &operator<<(std::ostream &o, const std::pair<const StringType, brand> &p) {
o << "brand: " << p.first << std::endl;
o << p.second;
return o;
}
template<typename I>
struct runner : public file_runner<I> {
std::map<typename I::StringType, brand> result{};
bool setup(benchmark::State &state) {
return this->load_json(state, AMAZON_CELLPHONES_NDJSON);
}
bool before_run(benchmark::State &state) {
if (!file_runner<I>::before_run(state)) { return false; }
result.clear();
return true;
}
bool run(benchmark::State &) {
return this->implementation.run(this->json, result);
}
template<typename R>
bool diff(benchmark::State &state, runner<R> &reference) {
return diff_results(state, result, reference.result, diff_flags::NONE);
}
size_t items_per_iteration() {
return result.size();
}
};
template<bool threaded>
struct simdjson_dom;
template<typename I> simdjson_inline static void amazon_cellphones(benchmark::State &state) {
run_json_benchmark<runner<I>, runner<simdjson_dom<UNTHREADED>>>(state);
}
} // namespace amazon_cellphones
@@ -1,51 +0,0 @@
#pragma once
#if SIMDJSON_EXCEPTIONS
#include "amazon_cellphones.h"
namespace amazon_cellphones {
using namespace simdjson;
template<bool threaded>
struct simdjson_dom {
using StringType = std::string;
dom::parser parser{};
bool run(simdjson::padded_string &json, std::map<StringType, brand> &result) {
#ifdef SIMDJSON_THREADS_ENABLED
parser.threaded = threaded;
#endif
auto stream = parser.parse_many(json);
auto i = stream.begin();
++i; // Skip first line
for (;i != stream.end(); ++i) {
auto doc = *i;
StringType copy(std::string_view(doc.at(1)));
auto x = result.find(copy);
if (x == result.end()) { // If key not found, add new key
result.emplace(copy, amazon_cellphones::brand{
double(doc.at(5)) * uint64_t(doc.at(7)),
uint64_t(doc.at(7))
});
} else { // Otherwise, update key data
x->second.cumulative_rating += double(doc.at(5)) * uint64_t(doc.at(7));
x->second.reviews_count += uint64_t(doc.at(7));
}
}
return true;
}
};
BENCHMARK_TEMPLATE(amazon_cellphones, simdjson_dom<UNTHREADED>)->UseManualTime();
#ifdef SIMDJSON_THREADS_ENABLED
BENCHMARK_TEMPLATE(amazon_cellphones, simdjson_dom<THREADED>)->UseManualTime();
#endif
} // namespace amazon_cellphones
#endif // SIMDJSON_EXCEPTIONS

Some files were not shown because too many files have changed in this diff Show More