mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Compare commits
2844 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b4242d3b4f | |||
| cbfe2d4a21 | |||
| 79126ca323 | |||
| 3f87f958d7 | |||
| cab383e1de | |||
| 9b314922a1 | |||
| 587beae307 | |||
| f53981d945 | |||
| 41b4ffd6aa | |||
| 6cd8a6d776 | |||
| 3c0d032ded | |||
| 36f5dbcb75 | |||
| 49901fb254 | |||
| c066b5421b | |||
| ec7550a70e | |||
| 3ef3078e51 | |||
| fd06782c97 | |||
| 9303efbd0c | |||
| 6c979f15cc | |||
| 09ccabbe6c | |||
| e00cc8c6dc | |||
| c10b32d463 | |||
| 025a44348a | |||
| 70a68da941 | |||
| e341c8b438 | |||
| 0ac0a80e28 | |||
| 6b9117c029 | |||
| dd92151971 | |||
| 0679c247f4 | |||
| 615218a3ad | |||
| 4c1b0a41d8 | |||
| ef563a4b09 | |||
| 7a9ff93388 | |||
| fc61d7c7ba | |||
| d506af0a79 | |||
| ccf8694510 | |||
| 9b67497ed0 | |||
| 0336684df7 | |||
| c19320dd6e | |||
| 412a5680e8 | |||
| a05a56856d | |||
| 58173a6a1f | |||
| 1721032cfd | |||
| b73877f95e | |||
| 09723897e9 | |||
| 49e231b634 | |||
| acdbbab916 | |||
| 5090247c34 | |||
| 4180e05730 | |||
| feea2bce2c | |||
| 692f43cd84 | |||
| 3240d55bcc | |||
| 66fd28fc00 | |||
| 5f638951c6 | |||
| 3e94eea939 | |||
| 0e8311f812 | |||
| 3620e9d151 | |||
| d017cd7ca4 | |||
| d9d1ff5856 | |||
| eb8f2bce14 | |||
| 2a4ff73468 | |||
| 77fc2b8447 | |||
| ba8b66a633 | |||
| 66eec5feaf | |||
| 3964f3e5d2 | |||
| ee8515122d | |||
| 5d35e7ca1f | |||
| deefc88b9c | |||
| c80dda7c58 | |||
| d2954ef68b | |||
| ac719827ff | |||
| 6ea77392a7 | |||
| e2f879751c | |||
| bf7834179c | |||
| 69ab8848bf | |||
| 7288323e36 | |||
| 3f381cf3ee | |||
| 52406402ed | |||
| 799d8e3fc9 | |||
| 6c647d9f3b | |||
| 8519e24f12 | |||
| fffb62743c | |||
| c888075f8d | |||
| 9b8aac5f22 | |||
| 40b414d184 | |||
| c85e8a7db1 | |||
| 83f390f8e7 | |||
| 82563dcf70 | |||
| 646bd3f2c3 | |||
| 4b0a908bb2 | |||
| 4c98e51c53 | |||
| 58e3d5d9cc | |||
| a22a92dc72 | |||
| c4654553dd | |||
| 5997f82c37 | |||
| bee410b315 | |||
| b115e3ef61 | |||
| 669229df5d | |||
| b6a2286e62 | |||
| 3a97c57773 | |||
| e1c6a778f8 | |||
| d413dd5b0e | |||
| a33fdc2770 | |||
| 87f5f7a250 | |||
| 9923d27994 | |||
| 876be23545 | |||
| 2028bdaeac | |||
| 1ac3a00ca9 | |||
| 6d7cc2c7c1 | |||
| 61a52287fc | |||
| 37a9aaad48 | |||
| 78325888ea | |||
| a90cb5d900 | |||
| 34a01ec3af | |||
| e510ed2774 | |||
| dabac13dde | |||
| aef7111c05 | |||
| 0c08894a54 | |||
| 2fe3a1467d | |||
| 167a46a0e7 | |||
| 2b532489cc | |||
| 85163df88c | |||
| 6a5be0f0db | |||
| 710a3c7241 | |||
| c93e02e172 | |||
| 517143aec4 | |||
| 9feda5e703 | |||
| cda198b7b9 | |||
| aad17a6a8d | |||
| 32d072a208 | |||
| 5eab555053 | |||
| 6430fbd39a | |||
| 4d2fc31b27 | |||
| 33610b59eb | |||
| 23290ae48d | |||
| eb3a085e0f | |||
| 4c8ec35a48 | |||
| 88bf5cb6d9 | |||
| 9b0435d864 | |||
| ddecadde86 | |||
| 02bee7d1b9 | |||
| 6ef555e6fb | |||
| 6952f8dfce | |||
| 03d0a4731a | |||
| 185ff4e8fe | |||
| 5bf6d9f3f0 | |||
| 2fa729922e | |||
| ebd09cb2a3 | |||
| 3978b9f159 | |||
| edc36a87ab | |||
| 6060be2fdf | |||
| 3251f61c9d | |||
| 561ffcd519 | |||
| 5541e78402 | |||
| 9a9ed0e2da | |||
| bca8d3e277 | |||
| 97196fa969 | |||
| 23fab307ca | |||
| 0a14e05ec7 | |||
| b88f831dbd | |||
| 71a73c2c47 | |||
| 07603aa7f7 | |||
| b8a6b889c7 | |||
| 7898234bb3 | |||
| f52533538a | |||
| 3bb2f0a186 | |||
| d6551bf278 | |||
| 0173eaaad7 | |||
| 5459dbd6c6 | |||
| 9c45f1f292 | |||
| 665cbba159 | |||
| a26f664907 | |||
| 17cb457ffd | |||
| 8b2af0473a | |||
| f1bfa43385 | |||
| 29fbbee852 | |||
| baa7d961ce | |||
| 6412b27c7e | |||
| 503da5ec83 | |||
| 9dd6e9c959 | |||
| 6db330c1a2 | |||
| 993ac4b87c | |||
| 35e87896f0 | |||
| f7e281cadc | |||
| 13405afd4b | |||
| 24b44309fb | |||
| e11ad58aad | |||
| 1875ed6550 | |||
| 80d26298a0 | |||
| 25b5015c09 | |||
| 26f8c566c7 | |||
| ff77ac801e | |||
| e0699994ef | |||
| 68ba9a1b2a | |||
| 6fed6bd29b | |||
| cc24bb4114 | |||
| 14ec0ca8f4 | |||
| 8dabd02c3a | |||
| c9692005fd | |||
| 2e0a9397c9 | |||
| f7922075c3 | |||
| b2e20e04c9 | |||
| adc9d18efd | |||
| bf849e3619 | |||
| c09e8dc225 | |||
| 5bf585ef02 | |||
| caff09cafc | |||
| f043db4dca | |||
| e3bd0828d1 | |||
| 9408298e0e | |||
| 573bbac2d2 | |||
| ac78c625df | |||
| 390a66c6e8 | |||
| 210e0a56a1 | |||
| 084f662f32 | |||
| c878ff2500 | |||
| 06afe9ecb3 | |||
| e658502adb | |||
| 6e7d415040 | |||
| 2ccd5b9c97 | |||
| 1cdcbf79b3 | |||
| 7013ed98cc | |||
| b383c717d7 | |||
| b8743bced0 | |||
| ae9ba2bed2 | |||
| 939844d79f | |||
| 4f4e81668e | |||
| bb54946b78 | |||
| 4dec6ed5a7 | |||
| 1dfd48195d | |||
| 23afc6b695 | |||
| e3cac71afe | |||
| cbe562c1d5 | |||
| 30437d0ff6 | |||
| 1e97af7dfb | |||
| 80bc9e5051 | |||
| a74e87df17 | |||
| 3274299647 | |||
| 22ca25faa6 | |||
| 37399fd41b | |||
| a170145d5b | |||
| 7d1d635883 | |||
| ddfa8ae928 | |||
| 25dfb078c7 | |||
| 9f0710e3ad | |||
| 19b9cd9b05 | |||
| 7540248396 | |||
| ab09e96de9 | |||
| 66252e4925 | |||
| 944778c186 | |||
| 62868a2f53 | |||
| 3c446c551b | |||
| efe3d4b7d7 | |||
| 28db262b47 | |||
| bf076bfb5f | |||
| 7bf1ecff9e | |||
| e25a40facf | |||
| a442842f0d | |||
| 421ed4f390 | |||
| 7dff5fa37c | |||
| 9a0527c380 | |||
| b160cf0610 | |||
| 553ee69b7c | |||
| bf70cd0ebf | |||
| cf0551edf5 | |||
| ddb094d550 | |||
| 975fdda03c | |||
| c5c43e9c7f | |||
| 031ee32969 | |||
| b613326d69 | |||
| 53dad74d8e | |||
| e4da19f5cf | |||
| 342b58986a | |||
| 7edc475886 | |||
| d2f8e84fc1 | |||
| 08000518cb | |||
| 90040d96a5 | |||
| 2934892c0b | |||
| 92174c927d | |||
| b399c0165e | |||
| 445ae024ba | |||
| 65f9822542 | |||
| 74bb7b2533 | |||
| fd97288561 | |||
| 1da0d8ac65 | |||
| 85661a2901 | |||
| 3fcdb65d88 | |||
| 8b00d91a2c | |||
| 7db3f97ba8 | |||
| 412a8f7c4d | |||
| d4b31c9feb | |||
| ecdcf276b2 | |||
| 6d92563280 | |||
| 0998233d58 | |||
| cb735818ec | |||
| 41ee548e3f | |||
| e9d5d5088a | |||
| 78151e80e5 | |||
| 083a5d7351 | |||
| 25fcc8b432 | |||
| a9c120f779 | |||
| b1487e34c3 | |||
| 2a68a32012 | |||
| 21a2ccaeb8 | |||
| 6cbb6ac89b | |||
| e9f0f1bb9b | |||
| 7ef1ebd4fb | |||
| 8de540e267 | |||
| ebc51fbd1a | |||
| 84a31c1615 | |||
| f77ac963f4 | |||
| ae3d912f8d | |||
| abf3d7d440 | |||
| 3c313b8530 | |||
| f435fddda1 | |||
| 14d927128b | |||
| 48152a0326 | |||
| b5cf53232c | |||
| b3d0b732e6 | |||
| 3c29f40f2f | |||
| 4a89d79984 | |||
| 9cb639dcd7 | |||
| 4699dd0ce2 | |||
| cfd337bb50 | |||
| 9bef628982 | |||
| 59025bc8b1 | |||
| ffe96dde19 | |||
| f9664cf184 | |||
| 830323f383 | |||
| eb8e15d9c0 | |||
| 3571f3a8d0 | |||
| 4b13020d65 | |||
| 75c6c950e5 | |||
| 5ad7698af1 | |||
| f6f359d3eb | |||
| 185e157e0c | |||
| 3f3f6cde7c | |||
| 005054916d | |||
| 338224849d | |||
| ada52641b4 | |||
| ede9d57f22 | |||
| 7bf33f6c8a | |||
| d62b789cb3 | |||
| 33dbd44098 | |||
| e0dcf8adc9 | |||
| 34dcd33a88 | |||
| 17a1a8e187 | |||
| 77ad00b63c | |||
| 25e7f1765a | |||
| 8d01255ceb | |||
| 8ec016b093 | |||
| 9e726b9856 | |||
| 312f1f26d3 | |||
| ba50571d66 | |||
| 4a587cb898 | |||
| bdf9123c92 | |||
| 6e4c29b7c5 | |||
| ec0b48b772 | |||
| d65acbd47b | |||
| 75240ad8e1 | |||
| 3efb44dc0f | |||
| 5c5cd5b42d | |||
| 12a1b6db53 | |||
| 37e87f6f99 | |||
| cd13b02bf0 | |||
| 624174d916 | |||
| 8a247f1321 | |||
| 7aa35bffd3 | |||
| d6c910686b | |||
| 22cc523fd4 | |||
| 3177cd1b5d | |||
| 63d9ce3c58 | |||
| 8e8180560d | |||
| 1594af5d5d | |||
| b207338365 | |||
| 68be9c2170 | |||
| 5347771091 | |||
| 8bf8315651 | |||
| 269ae7ad6b | |||
| 2aa91f741f | |||
| 5430544bbb | |||
| 7b55f16682 | |||
| d8fec59e85 | |||
| 57b6034a0c | |||
| 7500d7bb4f | |||
| 82c9876aec | |||
| b9234be80f | |||
| 0a2563e13e | |||
| 727ec73c33 | |||
| 9a55a830ec | |||
| 8c89ae0cd9 | |||
| 8c71ca1b1d | |||
| c72b4bc0f4 | |||
| 8a26cb3c8e | |||
| bf2ba5c675 | |||
| f151300a76 | |||
| 9aa3563d99 | |||
| 9444c1a04f | |||
| 883901a81b | |||
| a2c96c9cca | |||
| c63da0ef2c | |||
| c61cefda85 | |||
| bffcbb444d | |||
| 0b2891aaab | |||
| 983fb41802 | |||
| 0d2455029d | |||
| e94f027310 | |||
| 2b766e4c09 | |||
| a5db75e1a6 | |||
| 4bd66cb891 | |||
| 960a7ebba1 | |||
| d520062f8e | |||
| db08d78ed0 | |||
| 46292b8d4b | |||
| 46241287c6 | |||
| 137cb14bcc | |||
| 5e6be3ed7a | |||
| c6ab52eebb | |||
| a1aab1fafe | |||
| b92cbbe280 | |||
| 6d2a09f8e5 | |||
| 00564bf7d5 | |||
| 5809e51ae4 | |||
| d27e7cce71 | |||
| f7dc03f93d | |||
| d4ac1b51d0 | |||
| 6a4222da71 | |||
| bba88eb5e5 | |||
| 16b3816455 | |||
| e5a408386b | |||
| e65f28e61a | |||
| fbb46b99e2 | |||
| 933c2ebeac | |||
| db3e813aa6 | |||
| 9c95a48fe6 | |||
| cb20f7e7df | |||
| 18b9168eec | |||
| 241ce7304c | |||
| 5dbe96da96 | |||
| 40b397a3d4 | |||
| 5510089d45 | |||
| 62a57907a7 | |||
| becbe99e81 | |||
| bd3d67e889 | |||
| a89d57d0d4 | |||
| e04d400c64 | |||
| 1075e8609c | |||
| 3fde8a4eac | |||
| 62bdb9a2f7 | |||
| 2fbacb0058 | |||
| 509066f06a | |||
| 070f0b26a3 | |||
| 1a195623a5 | |||
| 5f7a56e7f1 | |||
| 5e60f0482d | |||
| e6c90b8efb | |||
| 7c450fbb70 | |||
| 4e1e002cb0 | |||
| de196dd7a3 | |||
| 08cb8dd81c | |||
| 57d54792ba | |||
| 79879802f9 | |||
| fbe955e9a4 | |||
| a49ac04046 | |||
| 49c7654a70 | |||
| 3e777c1759 | |||
| a410c723c8 | |||
| f91a1ae07e | |||
| c3954b1fb8 | |||
| ce74ece545 | |||
| dd4dce848e | |||
| e8f370b085 | |||
| 645033a8c8 | |||
| 3b5ceeb80d | |||
| 82433a67f9 | |||
| 8c1bfe782b | |||
| 730939f01c | |||
| b169dc2ea7 | |||
| 1aa1d537fe | |||
| c122462278 | |||
| b6b338bea9 | |||
| f72636b5b0 | |||
| f6a2bac11b | |||
| e4ddc5446b | |||
| e0e0aa9e7b | |||
| 9f0a2e0e86 | |||
| 203c03e90b | |||
| 6698eb96b9 | |||
| 30f7de387c | |||
| e0788507fe | |||
| e4740c87fb | |||
| 5beef701e7 | |||
| c6f9c93c33 | |||
| 3a93e45dd1 | |||
| 6db8ceb46c | |||
| 23651f0d41 | |||
| 7e1893db42 | |||
| b4b1927b0f | |||
| e275589832 | |||
| 69ee84973a | |||
| 76bed68ec3 | |||
| 003d970cd2 | |||
| 4aaf3f030c | |||
| 2763f7e719 | |||
| 39035c39be | |||
| ac179ff40f | |||
| b41bece32c | |||
| 9cb0c5f92d | |||
| 1dec7b04fe | |||
| c6eb6f98b8 | |||
| 1b01969bda | |||
| 17f3148ac7 | |||
| 35b4a48e99 | |||
| c0d18452fc | |||
| e5c9a310cf | |||
| 6d308a08c5 | |||
| 9e477ddb00 | |||
| b7c4d1eeef | |||
| 4a2f10ebcf | |||
| 41cb909604 | |||
| 91908ade4d | |||
| 9a32c48098 | |||
| d996ffc494 | |||
| d56fdc3d04 | |||
| 1dce4fed6e | |||
| cae5e5342f | |||
| 4e609aa955 | |||
| d28e5534d9 | |||
| 3bd8b0b575 | |||
| af4ff7cc33 | |||
| c9179ad81d | |||
| d6b5124c88 | |||
| 64b62fd3b3 | |||
| cebe3fb299 | |||
| ed7343f7f2 | |||
| 35158257c6 | |||
| b935ce2e06 | |||
| 4afe7565b4 | |||
| 6bed34ad61 | |||
| 0ad52a7e22 | |||
| aa52cf6868 | |||
| cd11838e5f | |||
| c31157bafe | |||
| 419b7b2ce8 | |||
| ca3f3cc49d | |||
| d3f0e2afb3 | |||
| eac3832ec0 | |||
| db19c7675f | |||
| d036fdf919 | |||
| fc0934755a | |||
| de4deb8c4e | |||
| ba46616cbc | |||
| a552638373 | |||
| e30123d58f | |||
| b7dee3e9c8 | |||
| 717d0c24a6 | |||
| 40813752f4 | |||
| 19902abaf8 | |||
| 06643fc9f5 | |||
| 0fa68d8930 | |||
| cc98358453 | |||
| 5f0b35b2c5 | |||
| bd0f5e9322 | |||
| cb0e4b23c7 | |||
| d83e69d977 | |||
| f657516a7e | |||
| 8d29c5f931 | |||
| eeac91579c | |||
| e5a4b8b81b | |||
| 7b8f775893 | |||
| c6ef2105ab | |||
| e681234e45 | |||
| eb93b98d6a | |||
| 7d887fdc1e | |||
| 9d405a5df4 | |||
| 18c003e8bf | |||
| ec4316aa84 | |||
| b79261eebc | |||
| 47a62db559 | |||
| 01645cbd69 | |||
| 3dbecab494 | |||
| 5c590b8434 | |||
| 2dac3705d2 | |||
| 774999ee95 | |||
| c906f864d7 | |||
| 68e3c4f984 | |||
| b08818fab9 | |||
| 33f73b577c | |||
| 30422cfdd3 | |||
| b085b56e32 | |||
| ea3d4e7ce5 | |||
| bea1483cde | |||
| 90efd79055 | |||
| 7e646efd0f | |||
| eb849662c0 | |||
| f146294a85 | |||
| 374de826ab | |||
| 1fd3e32051 | |||
| e607958a7b | |||
| 0f068fb7c4 | |||
| b991a4c7f3 | |||
| 5b99a75ae1 | |||
| 1ba73b9e6b | |||
| cfe3adb599 | |||
| be6052bcdc | |||
| ca8e21583c | |||
| 1c01fc35eb | |||
| ce38fe7bea | |||
| 6cd04aa858 | |||
| 03f7396d50 | |||
| a4803d50c5 | |||
| 40cba172ed | |||
| 3ba221eb8e | |||
| 8bc12fe7cb | |||
| 34bb2079e7 | |||
| 7ca016652e | |||
| 13ab123daf | |||
| f54bd69b5b | |||
| 16e8db1f17 | |||
| eb0ae041e3 | |||
| 893e613faa | |||
| 714f0ba222 | |||
| 19c3b1315a | |||
| f44a53271d | |||
| d90714e8df | |||
| c7fd7353a8 | |||
| 05f15d88b6 | |||
| d7d81c7152 | |||
| 73b510225f | |||
| 5d2eca2363 | |||
| 939b6b854a | |||
| 4f8bdf517a | |||
| 369f66be35 | |||
| 8a75dbf719 | |||
| 1032f70ddf | |||
| 16e2323153 | |||
| 2ec23bdf37 | |||
| 4fb09824bf | |||
| ad1cd6a2ce | |||
| a27367210a | |||
| efe9761f80 | |||
| 0b75de12ef | |||
| af5c8175b4 | |||
| 8df32cea33 | |||
| e4150443ca | |||
| d539781cf3 | |||
| 2bbab7d892 | |||
| 729c35c0f8 | |||
| 2abcc35031 | |||
| 85b910814e | |||
| c1dffac28c | |||
| 911b06186b | |||
| be9d5d4e31 | |||
| b32d66e7b6 | |||
| 939bfc701a | |||
| 9c470822a1 | |||
| 59195bd5dc | |||
| ef8c2c434e | |||
| 5ec85197f8 | |||
| 8eed8f5155 | |||
| 48f5e8b6c3 | |||
| 0a2da45794 | |||
| a79bbd63a3 | |||
| c667b0cfdf | |||
| b3a22bea56 | |||
| 6ca6ee5a6f | |||
| 78cff7518b | |||
| d0821adf0e | |||
| 461bc4c47e | |||
| 99406266b1 | |||
| a6576f1d09 | |||
| 95b4870e20 | |||
| 5607253be5 | |||
| 94563328c4 | |||
| ddf610125f | |||
| b6cce3d744 | |||
| 8a3b2f20e4 | |||
| 62cd5f7984 | |||
| 2db4592571 | |||
| e35088d6ff | |||
| 156b1b20e3 | |||
| 9294e8b098 | |||
| 6dc98561a9 | |||
| 4cfad7adf2 | |||
| 3ab0d3ed94 | |||
| 430f230940 | |||
| 727644c13a | |||
| 3ab8eca09b | |||
| 0dc07b34a7 | |||
| 221c55b620 | |||
| 02f9b83353 | |||
| cfc965ff9a | |||
| 033df0ebfb | |||
| ac34640224 | |||
| a987192040 | |||
| 751696d7eb | |||
| 50aa1566ae | |||
| 0a5bba7235 | |||
| 8b8af6aee5 | |||
| 8e8fbc4cff | |||
| 985dfab2c4 | |||
| 633161fe86 | |||
| f51d50399c | |||
| cf4e538536 | |||
| ec5ba79447 | |||
| 0948573e63 | |||
| bad582c2d3 | |||
| f55893807a | |||
| dc2f767171 | |||
| f0e92e3bdd | |||
| 3db1a214ce | |||
| 79e94227c2 | |||
| 665514692a | |||
| 9944db6d73 | |||
| 2ed24666b5 | |||
| 0c199cffc3 | |||
| 29fe1866ef | |||
| 4811c8036b | |||
| 036151c1e3 | |||
| 9d22372cc9 | |||
| a3d3e347a2 | |||
| 9577c54999 | |||
| 72c40be553 | |||
| 6aa8877bf6 | |||
| ef1e256fa7 | |||
| ad37651726 | |||
| 92caeb039f | |||
| cdb607f202 | |||
| bcab8d3abf | |||
| 9d747642fe | |||
| a755203aee | |||
| 814726e5d4 | |||
| c4a312e6c3 | |||
| 81609393f1 | |||
| 0634958329 | |||
| b352b903e7 | |||
| 74d6658f39 | |||
| 3076de0405 | |||
| 4a0a0ed4c6 | |||
| c5def8f706 | |||
| 610b3ad302 | |||
| 4c63a929bc | |||
| 0f72ff3a57 | |||
| 67afcd4edd | |||
| 6e9ada2d6c | |||
| 9651efe626 | |||
| df7201ba42 | |||
| 14315ec5cd | |||
| 0f10fc9ad9 | |||
| ce678fd986 | |||
| 9d693da852 | |||
| 22742b6bd6 | |||
| a33bf40a7d | |||
| 3801ea7777 | |||
| c7935ceed1 | |||
| ea119a5679 | |||
| 7a324da548 | |||
| 0d1c99a6ad | |||
| e4626d233c | |||
| 9934f65987 | |||
| b2de2dfd1b | |||
| 3f2639a655 | |||
| 26b5b19f88 | |||
| 5449365658 | |||
| 96536239c2 | |||
| 0e18453e34 | |||
| 777202e1f1 | |||
| 6f61ed1477 | |||
| a509e04f9b | |||
| 152eb983ff | |||
| d6f33e4830 | |||
| 5613d30e97 | |||
| 1bfbb6448a | |||
| c5b44f44f9 | |||
| 22b3ea93a8 | |||
| fe726b0f80 | |||
| 18ecc0032d | |||
| 1a1532c8cc | |||
| e6d2b7759a | |||
| c96ff018fe | |||
| 1005c62e90 | |||
| 2a714f4e37 | |||
| 73063e2dab | |||
| 6e5d232ccc | |||
| 8e96e38099 | |||
| 7517b9b122 | |||
| 55faf4c5bc | |||
| 92372412d9 | |||
| 990da22249 | |||
| 3849cc400e | |||
| 84b0e84447 | |||
| 3b8486665a | |||
| 451c393ef1 | |||
| 095691160b | |||
| 7597cb354c | |||
| bd2a31a0fe | |||
| be61650102 | |||
| 3279c2f15b | |||
| 38da15b501 | |||
| 0f515785c6 | |||
| 66db102c70 | |||
| ab859f7952 | |||
| 6367e55a5f | |||
| b61f2799a8 | |||
| 1b4d3bcbb6 | |||
| 45479558ba | |||
| 6fed8d2a26 | |||
| 7dbe4caf3f | |||
| ce1756425f | |||
| 920f535500 | |||
| f29b70c63e | |||
| 1e690e505b | |||
| cd27bf0745 | |||
| 62ded15cd8 | |||
| bc6907d280 | |||
| dcd2e13aec | |||
| cfff8a5ed5 | |||
| 2d760e75dc | |||
| f071a15591 | |||
| 6a595231b0 | |||
| 065ea00066 | |||
| 680cd6df34 | |||
| 22846f7577 | |||
| 5583a3c89b | |||
| 25d1c7e622 | |||
| 5add8ac255 | |||
| 3af54a9978 | |||
| 1dc4e9a84c | |||
| 9af41dd988 | |||
| 0039c5b981 | |||
| 17f4f82827 | |||
| 0314889c6d | |||
| 7387e9f9a8 | |||
| 158a3c53d8 | |||
| 98666e84ea | |||
| d91491bf13 | |||
| 92443772d2 | |||
| 041d59cc17 | |||
| a405173d59 | |||
| 93807bf230 | |||
| 0b67847b56 | |||
| a72cb8a37a | |||
| ad4f718e0c | |||
| 5f92cd2b00 | |||
| a1cf588d5f | |||
| dfc510f009 | |||
| e7e09e444c | |||
| 195acc3e45 | |||
| b8426584fc | |||
| 6a2435ab32 | |||
| 85001c55fb | |||
| 8c4cf7757f | |||
| f785f76d98 | |||
| c90ee57203 | |||
| d670906ff3 | |||
| c578f63f34 | |||
| 9a404bdcdc | |||
| 91b07ba075 | |||
| f9c6dedca1 | |||
| 73c7b7db3d | |||
| 6b02b06581 | |||
| 5f7b2bac12 | |||
| 806cb39103 | |||
| 2eaeac53e4 | |||
| 3baba73cf5 | |||
| db6bf15361 | |||
| 3aa3175378 | |||
| 4c63956624 | |||
| c89647af9e | |||
| 1303a88769 | |||
| aa1eabbb56 | |||
| cbacec0760 | |||
| 82fcf141f7 | |||
| aaa12c8fb6 | |||
| 9b5150daef | |||
| 9304d88920 | |||
| 725ca010e7 | |||
| 59c857e969 | |||
| 45c9136443 | |||
| bc4087ac96 | |||
| d9c4191e8a | |||
| 3fa40b8dc2 | |||
| dc69bc28ae | |||
| 53577f11e1 | |||
| 1abb64f6f6 | |||
| b442b29ccf | |||
| 5609851747 | |||
| 68a8004518 | |||
| 0b39e3a6cf | |||
| 924ad2d592 | |||
| 5202d07a77 | |||
| b632107a7a | |||
| f62ca21dd1 | |||
| 553befa012 | |||
| def624a50c | |||
| 268f26a84f | |||
| d9456b3030 | |||
| f195f849d0 | |||
| 669e5b91b4 | |||
| a06e0958ca | |||
| a56149e79a | |||
| c805fc28a4 | |||
| 218c274090 | |||
| 921c79f26f | |||
| af4db55e66 | |||
| 9f78559cc8 | |||
| 23b4bc93aa | |||
| 6321df078a | |||
| e6258377d9 | |||
| b3a26fd0cc | |||
| 47669566da | |||
| 03a1bb0a5b | |||
| 54ffbbe7db | |||
| 0b82f07115 | |||
| 265db2e533 | |||
| 2b2abf4895 | |||
| f93fb21c95 | |||
| b7fe764e6c | |||
| 500e4c3572 | |||
| 55281c01fb | |||
| a8bf10ea5a | |||
| 9f60093b41 | |||
| 562d4f4f58 | |||
| ac87437588 | |||
| b1444b4dfb | |||
| ed21875083 | |||
| 0249b5b311 | |||
| f46a0f64f2 | |||
| 1fd0447dbb | |||
| 9856201f5c | |||
| a75c07065f | |||
| 6a86ef5a7d | |||
| 500e5d6759 | |||
| e3f2c9f29a | |||
| 3458e6248b | |||
| 14039d05a9 | |||
| c592da4937 | |||
| 61fb4244f2 | |||
| a503e022d8 | |||
| 0942dc0764 | |||
| 0d6919dd99 | |||
| 3e8e797bc2 | |||
| 0a907ec694 | |||
| f1b4a54991 | |||
| 58e7106df1 | |||
| 7bf391c54a | |||
| 07a6e098c8 | |||
| e4897d6b54 | |||
| 23026d966b | |||
| 3cd98df30d | |||
| 001be23258 | |||
| c85b6682e0 | |||
| bb2bc98a22 | |||
| 43da4f7ccc | |||
| 37e6d1e9c7 | |||
| 1d9926698e | |||
| b04f64e02c | |||
| c6d710b14b | |||
| 2e07850622 | |||
| 1b6888281e | |||
| ce94411dff | |||
| 58a3098cd8 | |||
| 8a68163905 | |||
| 1f98e64b71 | |||
| a9480a768b | |||
| ed94514fc2 | |||
| 1f41cc2030 | |||
| 6455ec36ec | |||
| 676a3d068c | |||
| 5533f8d87b | |||
| 93af7b61ce | |||
| 364ad5529d | |||
| 1974a46fe0 | |||
| 5327ab9903 | |||
| 235d191bae | |||
| 4eb80ec75a | |||
| 2900459222 | |||
| 9088792b0e | |||
| b41fe7beab | |||
| 00f9bb8a07 | |||
| a90e1637cb | |||
| 4bad5c0241 | |||
| ce09d82fc7 | |||
| 5b926b8196 | |||
| c719ccdb48 | |||
| 9f1786aeb1 | |||
| 0bb83e06bc | |||
| 2ba67c2bc2 | |||
| cae91983ec | |||
| 3190ef0c1f | |||
| c7c1372833 | |||
| ba02cda55f | |||
| 512a94afaa | |||
| 6d978c383a | |||
| 938678f87f | |||
| 9dcf5fca5b | |||
| 88f0dc4726 | |||
| 8ae7910aba | |||
| b70e85fd10 | |||
| 99bc591366 | |||
| f4963cd1c5 | |||
| 4859cb8528 | |||
| c42b91980b | |||
| 8b3c8820e0 | |||
| 29bc78a486 | |||
| 30fe86ed32 | |||
| 85cefd5a00 | |||
| b5a328e0ca | |||
| 209a2e8fc3 | |||
| 8b978e6aea | |||
| b4df0e7c9e | |||
| 76aeda6b00 | |||
| 1a0ad6d9c3 | |||
| 6b219e3e25 | |||
| 1e90691013 | |||
| 3577c87c88 | |||
| baf6607e74 | |||
| a700848bae | |||
| 9bbfd5804e | |||
| b234d74f43 | |||
| cd49ff330d | |||
| 49faf7af1a | |||
| c892b83c93 | |||
| 985b52331a | |||
| 021dded9dd | |||
| 8fd0cdc732 | |||
| fe7a4d42d3 | |||
| e89d6353af | |||
| c5bb74d184 | |||
| 874349c928 | |||
| 157604b3a5 | |||
| b935544d65 | |||
| 03271df579 | |||
| 0633d3a07d | |||
| 045377a594 | |||
| b5c8030f19 | |||
| 7c2072789c | |||
| f75e856d2b | |||
| 44d689bc6e | |||
| 9e433c2f19 | |||
| 21b6279b74 | |||
| 4d89076bdc | |||
| 71e4ff7e03 | |||
| d2dfda6583 | |||
| 6a855f528b | |||
| fb93109c2d | |||
| bd190af7a3 | |||
| 44268b0c6b | |||
| 6451e5e7d1 | |||
| 2b3c4c68e4 | |||
| 7030cf2433 | |||
| 26d7881b80 | |||
| 21fe42b28c | |||
| d5ecf68d26 | |||
| 0ddff4ec7d | |||
| 283ac3191f | |||
| 4dd0c80dad | |||
| 3b53c6ca47 | |||
| 4e3b4809ea | |||
| a90b8fb449 | |||
| 1da509027e | |||
| 5b96e4761e | |||
| 311ea79238 | |||
| 98be2c91df | |||
| 2657e5e226 | |||
| cfcb0d4fb7 | |||
| 97d03f3215 | |||
| 4065529bdf | |||
| 0a6260b1d8 | |||
| 12caf2510e | |||
| a58d2f710d | |||
| 6be2db8c42 | |||
| 5cf68416d8 | |||
| ebcb3c6b3b | |||
| 04267e0f6b | |||
| a540e6afc5 | |||
| f1841e48b3 | |||
| 9865bb6904 | |||
| e06ddea784 | |||
| 8b5a89c136 | |||
| da093c1982 | |||
| 048fb6278a | |||
| f1b0778f79 | |||
| 0e584fa4a5 | |||
| f44386008c | |||
| 60c139a844 | |||
| f410213003 | |||
| 19cb5d57db | |||
| 30b912fc81 | |||
| 7fc07e2d5e | |||
| 72c83d9430 | |||
| bfbac12f76 | |||
| 461f7dc9f9 | |||
| 3e5497e2f9 | |||
| 6ecbcc7c19 | |||
| 8cef02e8e8 | |||
| caabfd14b3 | |||
| 2ffbaa9578 | |||
| c40aeaec3a | |||
| 80e84a3ad0 | |||
| 0552335ec1 | |||
| 7aea774b21 | |||
| 4d4ed92055 | |||
| f0ec26992a | |||
| 62e8332b34 | |||
| 0925f71987 | |||
| 4c11652808 | |||
| 5b10c38e43 | |||
| 3316df9195 | |||
| 5d355f1a8b | |||
| 2ff91103ca | |||
| a954d50ad4 | |||
| 5be4d37aff | |||
| 1e6c9dbcfa | |||
| 708a56872d | |||
| 0a2bca3f73 | |||
| 1ec710c985 | |||
| d5a44f9ad4 | |||
| e64dca7144 | |||
| b2779c35df | |||
| 9b11e119d4 | |||
| 988c62baed | |||
| eb3e640003 | |||
| 9475b947f5 | |||
| 18564f1ae2 | |||
| 638f1deb62 | |||
| 7e74d30f45 | |||
| ce8d0f8135 | |||
| 872127b722 | |||
| e180dc44bc | |||
| 268b8845a9 | |||
| 74c47995a3 | |||
| 24f5936cbf | |||
| bdfa8aca28 | |||
| 15eb1ad922 | |||
| 6ec98ee8b1 | |||
| c5862d6de9 | |||
| 57eb55446f | |||
| abd1399a7f | |||
| 57eba21ee5 | |||
| 1b56211a70 | |||
| d8974d53b2 | |||
| 5ecd17f49e | |||
| 6bb99aec3c | |||
| a67e83e24e | |||
| 5a3c3134ec | |||
| ce8b9ee8c4 | |||
| 970dfc9f67 | |||
| 04d39c0961 | |||
| d6339aa015 | |||
| 11076bf337 | |||
| 8a8eea53a2 | |||
| 09bd7e8ef8 | |||
| 9356619380 | |||
| fc15147cf5 | |||
| ab6b7a8044 | |||
| 07c2fe726e | |||
| fa355603fb | |||
| 109bb505d8 | |||
| 4a6eebc0e4 | |||
| 78ce2b473e | |||
| 6beb5f5587 | |||
| 501fed6c4f | |||
| b1bd8e9ee2 | |||
| daeca1bb18 | |||
| 17f6d5208f | |||
| bee4d7a12b | |||
| f32e3e0c7c | |||
| 1b69612246 | |||
| 9e93509a56 | |||
| ef45cd3342 | |||
| 46fe2e6b44 | |||
| 1133c2cc1d | |||
| fde10553e0 | |||
| 83615ff351 | |||
| 352eb4cb6d | |||
| 75c75ac00c | |||
| d9bcf52db2 | |||
| 43f0362e6d | |||
| ed5e313c73 | |||
| c0010f60e6 | |||
| 75301e4cf5 | |||
| 875c8fdcbe | |||
| a0b1642dc0 | |||
| 1d7e54f8c9 | |||
| 77c8581bc0 | |||
| 5dd625916b | |||
| e3d7718cf3 | |||
| 9eccd7b1fb | |||
| 5b05d126b4 | |||
| 03aaf189c1 | |||
| 6ef9395419 | |||
| 3a56e13b78 | |||
| ec28acba3d | |||
| ee6647ce40 | |||
| 03d54f8f6e | |||
| 553e6d7549 | |||
| e6896ee71e | |||
| e6762f9b48 | |||
| 099bb1afef | |||
| 9c33093c91 | |||
| 634d8038b9 | |||
| ad46154f2f | |||
| c7fbb4615c | |||
| fa81068ea8 | |||
| 70c2a1c9f9 | |||
| 164fcb49d9 | |||
| 64cf18aa1e | |||
| 66a68ce264 | |||
| 86162aaddb | |||
| 9cc7a94a94 | |||
| 6bca1225e6 | |||
| 379a4e6a01 | |||
| 460cfcaf3e | |||
| 8e69103822 | |||
| 2f67dab2b6 | |||
| bb65ebd8be | |||
| c46ea0390c | |||
| bc8a6dd2e3 | |||
| b1478c37f6 | |||
| 4e944a9f3c | |||
| c7fa9b5fe8 | |||
| 65148b123b | |||
| 2f92a34bb7 | |||
| 54ed24f481 | |||
| 268df9f67a | |||
| 84dc398d32 | |||
| f6a3205d10 | |||
| 522cb66582 | |||
| f873a140ce | |||
| 36dfc5bbd1 | |||
| f80668e87f | |||
| dcb5d47ee6 | |||
| e95c22eb21 | |||
| 9fb83e61ea | |||
| 1513cdf7bc | |||
| e33af1a3f8 | |||
| 857d77a10a | |||
| 0e431a0250 | |||
| 3acfc0b630 | |||
| 2ce5f69def | |||
| 7d347be902 | |||
| a456d78fe0 | |||
| bf67c967d6 | |||
| 44b7a7145c | |||
| 3867ee71ed | |||
| 464f4813e3 | |||
| af8b52e7e8 | |||
| 796588900c | |||
| 4beb2ed507 | |||
| 0ff6833e96 | |||
| e2cfcc52b3 | |||
| fc8a46025e | |||
| d2bea0c228 | |||
| f016c2b72f | |||
| be62058696 | |||
| af18d5ed81 | |||
| e9c91a1ce2 | |||
| 29767b2886 | |||
| 96a31c69c5 | |||
| 534632dc52 | |||
| 8bf5f3d869 | |||
| c4f92322f5 | |||
| 1e4aa116e5 | |||
| 90cc1411da | |||
| d13ce6768c | |||
| fd4a7f2150 | |||
| 6bd64c6873 | |||
| ba58d868e5 | |||
| c50799ba3b | |||
| 039d82ff1b | |||
| a2f0933d01 | |||
| 77e1e3cc18 | |||
| 7bdd41350a | |||
| 6797a6ab56 | |||
| 86b5928f5e | |||
| 6dbd15aa71 | |||
| 22e5b081c4 | |||
| d848f33c48 | |||
| c64367536d | |||
| fc0102b079 | |||
| 62a39639c2 | |||
| 158aaff384 | |||
| fd836145fe | |||
| 697bafdd0a | |||
| 9675dcac44 | |||
| 48849d7866 | |||
| d0ce2f0b5a | |||
| a19f635a6a | |||
| 676ed59342 | |||
| 4015f46b7d | |||
| 770cee7139 | |||
| a4619a54a7 | |||
| f7d99f97a3 | |||
| 8b7df0c12e | |||
| bd780817f7 | |||
| 82fb45aa2a | |||
| 74870a8189 | |||
| 7a9f6b48f4 | |||
| d3c089130d | |||
| e0f3060527 | |||
| 4c1256acc4 | |||
| 85f6f5bd29 | |||
| 4d9eac663a | |||
| 0ef4d90ad0 | |||
| 1a1e7edb02 | |||
| 51b835f71b | |||
| e38fe3d361 | |||
| cc042c9936 | |||
| 599e3bc937 | |||
| 1fa0d940bc | |||
| 7dc4a9525b | |||
| b6f1f4ef64 | |||
| 3faae67663 | |||
| ccc94c9b05 | |||
| 1fd30db726 | |||
| 0ba76ac066 | |||
| 8b661fe556 | |||
| 077907b7c3 | |||
| 172d669780 | |||
| 6b85b9a416 | |||
| 5d3001279c | |||
| 4582a13360 | |||
| 3a064535ae | |||
| 444ec4ad27 | |||
| 94e910586d | |||
| bb5ce007e6 | |||
| deaa74d378 | |||
| 13e1794e91 | |||
| 67b3595008 | |||
| 6c33f518a8 | |||
| 88da62ba09 | |||
| b6997a56df | |||
| 74178fd1c2 | |||
| 34c59bfa90 | |||
| 2956bce047 | |||
| 41f33ecbb9 | |||
| 86241e2871 | |||
| 1e32897d3e | |||
| 1b63a9a9b5 | |||
| 4c9f11b78a | |||
| 32348c2b0b | |||
| 5e690c5d04 | |||
| 4ec56484a1 | |||
| 8f2a5649fe | |||
| c3b25e12a5 | |||
| 6d3e33d440 | |||
| c11f7ce54f | |||
| 84806cc174 | |||
| 16f12f7d59 | |||
| 8609b8e589 | |||
| 29e744fdbb | |||
| 515b87bcbe | |||
| 5fa9faca20 | |||
| a4ebdfd47c | |||
| 188d8d4b64 | |||
| ce5581d428 | |||
| 5b4acf14ea | |||
| 5fc6cb15b8 | |||
| f6e9a8eee4 | |||
| 6c0950cb2e | |||
| cb8a9ef2c0 | |||
| 470cbbe9ff | |||
| e01f1434fb | |||
| 187084ce46 | |||
| b6f9382b5b | |||
| 57f68381ed | |||
| 3e35729eb6 | |||
| 544fa57641 | |||
| 7e94309046 | |||
| 21eff5b825 | |||
| b408d7c95e | |||
| d9929edbc1 | |||
| 843b73dedb | |||
| 02a8145b18 | |||
| cfcb315b14 | |||
| c8a70a0a73 | |||
| b84a3a0230 | |||
| 49d70232f8 | |||
| 8cc9f496ee | |||
| 1547f2ec80 | |||
| 42a8b40de0 | |||
| b4b968ff44 | |||
| 52e3c063c5 | |||
| 257089884f | |||
| c650ea9765 | |||
| e369d45b9c | |||
| 2d84b6f6d9 | |||
| eef1171944 | |||
| 12ccdcf858 | |||
| f1a03bfb04 | |||
| 696b0e29e4 | |||
| 5eb748ae17 | |||
| aa4340ef5c | |||
| 0062e54e93 | |||
| dada5090b0 | |||
| 1c4593c648 | |||
| e7004cef76 | |||
| 2bb101bd19 | |||
| 26baf70912 | |||
| 89c2582376 | |||
| 33e003616d | |||
| bf03d77ab9 | |||
| a6cbf1f922 | |||
| d6f056f266 | |||
| 69a247d500 | |||
| a76c67c19f | |||
| b836164a38 | |||
| 058507badf | |||
| ad40e90790 | |||
| 0c9dc11550 | |||
| 1ff55c2729 | |||
| 066269153e | |||
| 38bb08778a | |||
| 5dbcdf1484 | |||
| f03a6ab5a4 | |||
| 6fa5abcd7e | |||
| 5dc07ed295 | |||
| 064d4255d5 | |||
| 04139eb82e | |||
| 1b1a122b1f | |||
| ccb132320c | |||
| c0e7f824df | |||
| 05bba71eaf | |||
| 7ebe5c4bcf | |||
| ae1bd891e7 | |||
| 9899e5021d | |||
| 94440e0170 | |||
| c25928e44f | |||
| a7fc7d4ffb | |||
| f336103f63 | |||
| 56e2b38048 | |||
| a5ccff720a | |||
| 1d8c2d6c22 | |||
| 0b8c357eff | |||
| efc168f473 | |||
| d8428f98d9 | |||
| 60f17d26a3 | |||
| 05bc664c11 | |||
| 2cc84b6e51 | |||
| 5ccdbef7d5 | |||
| c13c2650a2 | |||
| ec6c998a3a | |||
| 2f6091419f | |||
| 2022dd7d74 | |||
| b8202dab3b | |||
| ef688a74fe | |||
| f632e7c043 | |||
| 04a19f9813 | |||
| 2cbc591c9d | |||
| 3f00e79bcb | |||
| 3586fc4910 | |||
| c9a6bbeb64 | |||
| 0655a135e6 | |||
| d3e8bb1889 | |||
| 14ceacac73 | |||
| e4f33b5970 | |||
| 4474f8ef18 | |||
| 76c9f4f5a6 | |||
| 942ef3b7f2 | |||
| 0b9df6d8c4 | |||
| b5ea504ad2 | |||
| 803b0c4bdb | |||
| 6537d0dc76 | |||
| f8f36c085c | |||
| 7339f67dd7 | |||
| 0d4e501239 | |||
| 8d609607e2 | |||
| 71a889ed73 | |||
| 27a75a9085 | |||
| 954d6c326d | |||
| 7ea05d038e | |||
| 33930ff046 | |||
| 16f41ea059 | |||
| 0a7270fc29 | |||
| 23fbd9d004 | |||
| 610c79fbf3 | |||
| fd44c2a2ff | |||
| a86a82b39c | |||
| 89b059b1ea | |||
| bd2d0f769f | |||
| d830422489 | |||
| d1a54249e7 | |||
| 4dfbf98e4e | |||
| 1b6258ec8c | |||
| be707dbb6f | |||
| 664b03bb13 | |||
| 7c6723d912 | |||
| 1febf2ec83 | |||
| fe69928764 | |||
| bbd61eb13f | |||
| e15e1e253d | |||
| 45e2178ada | |||
| a6e4933d93 | |||
| 98599e0972 | |||
| b4837f2e2f | |||
| ea08e7d192 | |||
| d178e089a6 | |||
| 5f00b37e21 | |||
| 8a8792d47f | |||
| 59d9bc9e48 | |||
| 8793dd3ceb | |||
| 48062380fa | |||
| 3636aa5522 | |||
| a1aea4588f | |||
| 1d4fffb799 | |||
| 6f90f5dc5f | |||
| 9dd6972d26 | |||
| d731a7d52c | |||
| 059468b74e | |||
| 5e69fb782a | |||
| a5beffda78 | |||
| 7de7ce5fdc | |||
| 383e8c7f68 | |||
| 0dbda65e44 | |||
| fe01da077e | |||
| d43a4e9df9 | |||
| 3e226795f0 | |||
| c4a0fe1606 | |||
| ef63a84a3e | |||
| 8c16ba372e | |||
| 9be4a17687 | |||
| 89332e1696 | |||
| 8a56129def | |||
| ed0c815735 | |||
| 7a69da16e4 | |||
| 351717414d | |||
| 52f44de257 | |||
| ae6dddfff4 | |||
| 539f555e23 | |||
| b75fa26dc1 | |||
| 3d22a2d845 | |||
| 1aab4752e2 | |||
| 86f8a4a9d2 | |||
| db2cb061cb | |||
| 6a71b24495 | |||
| 84712a8bbc | |||
| b86fb95306 | |||
| a3a9bde83e | |||
| 2fe2dd170b | |||
| f772bf4fbc | |||
| ac0c3093f4 | |||
| 12150baa5e | |||
| 219b02c1e5 | |||
| 4551e60f8b | |||
| ea842e78af | |||
| 5651fbedc4 | |||
| 2f87dfd4a9 | |||
| 332dd76867 | |||
| d2c9ea8a9a | |||
| 40d57da83c | |||
| 561813eb2a | |||
| e6c9dfbd91 | |||
| 603b6596af | |||
| 64abc3e86c | |||
| fac42fa3e8 | |||
| 7ad4020829 | |||
| 72ab0d11ff | |||
| 4ea866f050 | |||
| a476531524 | |||
| e7e6ac5bb3 | |||
| f346362b00 | |||
| d9ba455695 | |||
| 8927a0561f | |||
| e03c5e9f23 | |||
| 1f79200db8 | |||
| c009e4a57d | |||
| c615d52cf4 | |||
| dbb3316511 | |||
| cd6f204c77 | |||
| 269131ed21 | |||
| 65d784e88e | |||
| 35afb6cae0 | |||
| 27bce09be8 | |||
| 4f25b6ac0c | |||
| 3d5ed1a7e3 | |||
| a03115a4a6 | |||
| 7219d28a31 | |||
| 0875bce68f | |||
| 54fe302907 | |||
| edaa8f811f | |||
| 2c8fd109de | |||
| 07fe7ad1a2 | |||
| 16d88cc095 | |||
| 2a6e6b3dbd | |||
| 0c19848230 | |||
| 3c3a4db54e | |||
| 0e6bd2224f | |||
| a64d2f4673 | |||
| 1e8a54af0b | |||
| aa53d8708e | |||
| 8c600ca553 | |||
| 25fe6d7dde | |||
| afb369950c | |||
| d7f133c24c | |||
| 5312fd30e5 | |||
| 23dd0bdaa1 | |||
| 1d06624d38 | |||
| d40069a018 | |||
| 73e27bdd48 | |||
| 064eb0b24f | |||
| af968c5b44 | |||
| f93dbe51e2 | |||
| 1c34707925 | |||
| deaca58504 | |||
| 1d519aa9cb | |||
| 191faeae70 | |||
| 1153aaf55b | |||
| 292cb5a5af | |||
| 1e9488d4a6 | |||
| ff1d77ead9 | |||
| 977e1a94b2 | |||
| 60ee5fc844 | |||
| 940c8fcb5e | |||
| 71e0148eb4 | |||
| 293c104cc4 | |||
| 5a3035bb72 | |||
| e04cbd71d0 | |||
| fa4ce6a8bc | |||
| 9863f62321 | |||
| 7cd1f7dbd5 | |||
| 8c45a18524 | |||
| 8cb383ed45 | |||
| 7d1305b169 | |||
| 24ab1f32e4 | |||
| 073ad0dada | |||
| f43b6a0675 | |||
| fc1ddcd2f8 | |||
| e7f774f964 | |||
| cb49af1ea5 | |||
| 73d7d704c1 | |||
| 8b89232f12 | |||
| c3dec1a5ea | |||
| 44b06d70e8 | |||
| eee07e6cfd | |||
| 5051c27c3d | |||
| 76f3506ac5 | |||
| 5d7a84fad7 | |||
| dec161ed26 | |||
| 0f9dbf84b7 | |||
| f0d5337818 | |||
| 4cd9de5c37 | |||
| 76b0bfa7f5 | |||
| 32d6b0eed4 | |||
| 127d962271 | |||
| 92d7af0881 | |||
| af12066f77 | |||
| 2a1f8fa8f1 | |||
| 04e47bde84 | |||
| 49da7e74cd | |||
| 6ac47734c0 | |||
| 0e6ea76e88 | |||
| 0514588175 | |||
| 59d1212039 | |||
| d61cca6720 | |||
| 8c74e88f16 | |||
| 46cf512032 | |||
| 24a185d26b | |||
| b99a7344c9 | |||
| c6a4fb1e13 | |||
| e2718fe845 | |||
| 76314280cb | |||
| d6716218bd | |||
| 9371a92122 | |||
| e8b030ad17 | |||
| e0180b4849 | |||
| 3901bbb401 | |||
| 76bebfd798 | |||
| 3013166d8d | |||
| 8596e702ac | |||
| 414bf4a296 | |||
| 0daa01edef | |||
| 98abd96075 | |||
| 8e3fc826e2 | |||
| c750095241 | |||
| 2a0c0c0ad2 | |||
| 92f3bb89c3 | |||
| ac0e6c5e6e | |||
| f397b6fedf | |||
| 1d069e5077 | |||
| c5684a6278 | |||
| f3ac0be0e6 | |||
| 18c9468af5 | |||
| 32bc0da362 | |||
| c9a3800ce7 | |||
| d4239aaa8f | |||
| 4f72d5cfac | |||
| 66acab4130 | |||
| 9e9e3373e0 | |||
| 502fee1b45 | |||
| 4d0c7d706d | |||
| 6cd418b60a | |||
| a3b39dfd1a | |||
| 74da47e286 | |||
| 587ba9bec0 | |||
| 382392e03b | |||
| 409948a0f9 | |||
| 34919ca394 | |||
| 0d1c574cb1 | |||
| c564815931 | |||
| f6fb667ac1 | |||
| 832bbe734d | |||
| 7a2fda891c | |||
| e50c239a2e | |||
| cc7c8d92da | |||
| 87acab0846 | |||
| f43459d476 | |||
| e030f02776 | |||
| 10f2d01e7f | |||
| 80dbf9a32a | |||
| 185274e70f | |||
| f0ac55ec0c | |||
| 44544635dd | |||
| 3c594b1037 | |||
| ea7100e8c4 | |||
| a198abc485 | |||
| d4a37f6ef5 | |||
| a5c9c31231 | |||
| e3ec78a832 | |||
| a116e68a47 | |||
| e7084de166 | |||
| 398eda6365 | |||
| 349abf5ee6 | |||
| 4ce40b1975 | |||
| 536fe28f8f | |||
| 3e9e14f4d6 | |||
| c8140068ad | |||
| db314bc381 | |||
| 499a26b152 | |||
| a9cdb5be50 | |||
| 5f04208dbd | |||
| ffaa292006 | |||
| d3e44b1108 | |||
| fbf274a42b | |||
| d94cd65dfd | |||
| 3c1b403c4e | |||
| 75564453b3 | |||
| 3091e2dc0e | |||
| fc50a36cc5 | |||
| 9bf9fba2ec | |||
| 121615da70 | |||
| 53d28a713c | |||
| cf37704193 | |||
| 38289fe381 | |||
| f9337a1111 | |||
| 6d059b479f | |||
| b6e23b2d3e | |||
| e5e6a46c37 | |||
| 22b9a53bef | |||
| 3be81e3206 | |||
| ff09b6c824 | |||
| a8e892ba90 | |||
| 289cc3e7a0 | |||
| 7480b87e07 | |||
| befa6423be | |||
| fd418f568c | |||
| 09cf18a646 | |||
| 326c175dcb | |||
| 6d7c77ddc1 | |||
| efd706528b | |||
| b523c43927 | |||
| 75545ff70d | |||
| 3c6ef83046 | |||
| b9ac0a79f1 | |||
| 8539896f3d | |||
| a3b508ceff | |||
| 334a486737 | |||
| d7370cc916 | |||
| 92c34f7f38 | |||
| 93328c8d6d | |||
| 5710ec13d4 | |||
| fa637fcecb | |||
| 4af7d6f108 | |||
| 0fd159dadb | |||
| 1ff22c78b3 | |||
| ceb1def55c | |||
| 893a1d8306 | |||
| 3c91690e55 | |||
| 6835dd73bc | |||
| 7317fe1440 | |||
| 7b58fea911 | |||
| c1ff74c9a6 | |||
| 6dabfa176a | |||
| 0714f5fc67 | |||
| 3b1b1bfd48 | |||
| 218c867f46 | |||
| 2bc12f9730 | |||
| 5e564a8e0c | |||
| beaa6a9a7a | |||
| a9c8224f40 | |||
| 3dcc188d93 | |||
| 10b7556a37 | |||
| 54b7291c34 | |||
| 1e30b6e334 | |||
| 406240bae3 | |||
| 74d9b41b7d | |||
| ff0b0c54b7 | |||
| 6eec2d6b4f | |||
| 5731c5437a | |||
| 04f14ec026 | |||
| 12ed6336b1 | |||
| 3cb79e6977 | |||
| c5e21a2469 | |||
| 13aee51011 | |||
| 53fca1b5e6 | |||
| 7dad9fca0f | |||
| b249d7c76c | |||
| 4060f64232 | |||
| 5b2f7d3374 | |||
| 3116e29d16 | |||
| d2406f2a22 | |||
| a648318900 | |||
| 849f54e4f8 | |||
| 61009fea3f | |||
| 21dce6cca9 | |||
| 56bc8a778d | |||
| d93af1161d | |||
| 434776db1a | |||
| 6167e9cefc | |||
| dc918d764e | |||
| 9906887151 | |||
| b5a1017afa | |||
| 7badc230a4 | |||
| ab78482ee7 | |||
| 6369cf4dd9 | |||
| 7656bd50ee | |||
| 2115596ed3 | |||
| 0e3453f7c2 | |||
| 7ed65e42d7 | |||
| 835b640ebd | |||
| 6ee3318531 | |||
| ae24fe3850 | |||
| d4f4608dab | |||
| ea8a5020e2 | |||
| 622d9c9480 | |||
| bb0c9547be | |||
| 62da98aef6 | |||
| 03746b966b | |||
| de001da35b | |||
| 0da460ca13 | |||
| 450e19858b | |||
| 836e1fc330 | |||
| e836c28008 | |||
| fff4f921e4 | |||
| 9f265711a8 | |||
| 32afcd2e48 | |||
| 748df8d109 | |||
| 5ad405006c | |||
| 47859f3560 | |||
| 56d1b9a226 | |||
| 1b6a31b277 | |||
| 90a7503181 | |||
| e3efbcddc1 | |||
| c14b2fb36c | |||
| f0f111b387 | |||
| c95e45d283 | |||
| 52b8d50178 | |||
| f581627d10 | |||
| 6a8ec95a46 | |||
| b6c6680add | |||
| 5fb149f833 | |||
| abb0bf9247 | |||
| 8f3ddd3a73 | |||
| 8f34e6714a | |||
| 56841bcede | |||
| 006cc2ed60 | |||
| c79cf8d6bf | |||
| cf704cf81b | |||
| 265d474ec8 | |||
| 2e420169c3 | |||
| 5aec2671ea | |||
| ab0e22a316 | |||
| 06587824be | |||
| a0bce440a6 | |||
| 26b15251e2 | |||
| 1cf4fe405d | |||
| 6b8f5d3354 | |||
| d5af359365 | |||
| 8769e42a56 | |||
| 7cde65aa6e | |||
| e1b1500e3b | |||
| 2943a1c27f | |||
| b28cafc1d1 | |||
| 65f999b7b7 | |||
| 06d6636b97 | |||
| eb5a1ea113 | |||
| d84e70b6e5 | |||
| 7ff034504d | |||
| dedf0c6a8d | |||
| 5514ae3879 | |||
| 5af0dfb031 | |||
| 0bcda5e384 | |||
| d1eef242c6 | |||
| ceee00b276 | |||
| 6c2ab064cb | |||
| 772a5dc3d5 | |||
| 3e39a998ce | |||
| 2867dc50fa | |||
| c3c43769ae | |||
| 36ceaa4452 | |||
| c34b1a1b2a | |||
| e4df0ca368 | |||
| 8a91cecf41 | |||
| 04e8710cf5 | |||
| e8b3f9eaad | |||
| 23d6ec6cff | |||
| 0a6edae2dd | |||
| 0e45663ce8 | |||
| 80a9f4defd | |||
| 8f1e4018c0 | |||
| afe36d0b36 | |||
| 5d1e3efce8 | |||
| 293ec7aec5 | |||
| 6cefeb338b | |||
| f1744f5495 | |||
| 5750a173ff | |||
| e3a4fd9f93 | |||
| 5a071c1907 | |||
| 7cf3a7511b | |||
| af203aaf86 | |||
| 8e2c06cb0e | |||
| 1a5d8f1957 | |||
| 03c828c7ad | |||
| 758dc511fb | |||
| 0164723a8e | |||
| 032936a7b5 | |||
| da3e064fc7 | |||
| 317fc6ba0e | |||
| 1aaad223c0 | |||
| 81c86d7090 | |||
| d9a9fd387d | |||
| 0c190b165c | |||
| acc7bd79b0 | |||
| e4e89fe27a | |||
| 24551db0c8 | |||
| 12e6611ba4 | |||
| fb15886a1c | |||
| 06c1dc3a29 | |||
| 89d9de2353 | |||
| 12c85d3e23 | |||
| a5afec1f94 | |||
| ac0899c043 | |||
| 40c6213d7e | |||
| d140bc23f5 | |||
| 00f0859e1f | |||
| a0b2fab6fa | |||
| f669aafcf2 | |||
| 66a2807210 | |||
| c3009eb324 | |||
| 3bdfe167de | |||
| 31e8a12e88 | |||
| ebbfdcd35a | |||
| 9a7c8fb5be | |||
| cfef4ff2ad | |||
| b2220d6157 | |||
| 5ff941ae3d | |||
| 1c922d3b73 | |||
| b23dd28a06 | |||
| a55f41a24a | |||
| 5525c6f729 | |||
| eb147d9868 | |||
| f58a5d534e | |||
| b3ea8c406e | |||
| 99667f7c55 | |||
| 0b21203141 | |||
| 9a9ca974c2 | |||
| 140e4dde3d | |||
| 68670301e3 | |||
| a98d841983 | |||
| 332b764cc4 | |||
| 560f0742cc | |||
| 910f272467 | |||
| b6423a3426 | |||
| 4d2736ffa9 | |||
| 4dc2adf7f8 | |||
| da34f9a253 | |||
| 1f76737510 | |||
| bc8bc7d1a8 | |||
| 083569fca8 | |||
| a8903d9765 | |||
| 8e7d1a5f09 | |||
| c879b56f41 | |||
| 4518f1fba1 | |||
| 5c59b3a775 | |||
| 299dfcdd3c | |||
| 76c706644a | |||
| 0c8f2b9d85 | |||
| c924aaede9 | |||
| 28710f8ad5 | |||
| e695a19d11 | |||
| 6978a0b8d4 | |||
| 6784530b8b | |||
| 03d5fc33ca | |||
| ba14232628 | |||
| 1cdf5581f3 | |||
| 3488c49d0a | |||
| adaef43bc6 | |||
| ce8fe1bdf6 | |||
| fa04595d90 | |||
| aea79912ec | |||
| 80b4dd2e8a | |||
| 48530b89ea | |||
| a4025788ae | |||
| c6f2f60b03 | |||
| 33060738b6 | |||
| ab6d4871d8 | |||
| f87e64f988 | |||
| 27861f6358 | |||
| f611b65bc0 | |||
| 2dc61fbdc4 | |||
| 22be05400d | |||
| a9f501fe7d | |||
| e9077370ec | |||
| a804351a76 | |||
| f97b655f02 | |||
| 1498b78342 | |||
| 85e84fc1fa | |||
| 833e5d8bf1 | |||
| 773883c486 | |||
| 6e5e0278c2 | |||
| 951c4bedf8 | |||
| 9842e1f9d0 | |||
| 4c0c1c9830 | |||
| 6706d6053e | |||
| 0a874a5063 | |||
| 2caa6e3370 | |||
| a9e990251d | |||
| 7bde23590a | |||
| 5042dd52ce | |||
| 3b9e6bff3c | |||
| a2d05b21ff | |||
| f4f5f670a2 | |||
| 165e23773f | |||
| 8dbb598057 | |||
| ba9dc12164 | |||
| 399d08c86c | |||
| 6f799435b6 | |||
| 3d14154a29 | |||
| 7e331957c4 | |||
| 4da06830f1 | |||
| 27293cc1c1 | |||
| 2caac2b218 | |||
| 0dc80ccf21 | |||
| f2b48ede4c | |||
| 6cefdc2f5c | |||
| 29e78413fe | |||
| 8192e63a4b | |||
| b2ebdb0d07 | |||
| 9c3828fefe | |||
| 60916318f7 | |||
| d7c83397e4 | |||
| 1d621bba37 | |||
| e2f349e7bd | |||
| 102262c7ab | |||
| f02babe427 | |||
| fc6133b58f | |||
| 2bd65fa444 | |||
| d33208c7db | |||
| c9cd8e6211 | |||
| 74a96878bc | |||
| 7e28708e1d | |||
| 1211c01ca1 | |||
| f32b97733b | |||
| 4e1c90f76f | |||
| e63f258470 | |||
| ede9f9117f | |||
| 7c560fa137 | |||
| 178a0842fe | |||
| f345490cae | |||
| db141e82c9 | |||
| f163155929 | |||
| 9b6377fd80 | |||
| 7356b4532f | |||
| 7d7bec856d | |||
| c5504ef50b | |||
| 3658ff650d | |||
| 6d14afd80e | |||
| 6e5178efc4 | |||
| 29fc51522a | |||
| 6cd8fb7982 | |||
| ce824f8653 | |||
| 708f4a094d | |||
| 2704b73399 | |||
| 783ccd6c21 | |||
| 3fd1c3b64a | |||
| 58d249ca16 | |||
| bdc2b07339 | |||
| 6888ca709d | |||
| 8ae818e17c | |||
| c4f1baad31 | |||
| 3439ce19c9 | |||
| b7c18df540 | |||
| 74799134b1 | |||
| 3828e1e538 | |||
| d89046d515 | |||
| 4bc128f07e | |||
| e383b7a6ab | |||
| c89d6bf68b | |||
| 52640518d3 | |||
| cf493254b7 | |||
| c97eb41dc6 | |||
| b1224a77db | |||
| 17b777f751 | |||
| 9442c9e1f4 | |||
| 15740500af | |||
| 3484dda45e | |||
| 1ece6c0e2f | |||
| 59cad23aeb | |||
| da1c35d04b | |||
| c469aed047 | |||
| a065805b0f | |||
| f41a18b57d | |||
| 1257432df3 | |||
| d0c0e31220 | |||
| 9b7832c39a | |||
| e3e29b720d | |||
| 64872bddf4 | |||
| 81f2249575 | |||
| 9bbd6bd874 | |||
| 13e477ebfe | |||
| c284b54fc2 | |||
| 69caa477fb | |||
| 81f9aac13f | |||
| b2eff3c90c | |||
| aa45fe7359 | |||
| 253af0766c | |||
| cf9dbe583d | |||
| de8df0a05f | |||
| 53b6deaeae | |||
| 462858efa3 | |||
| f7e893667d | |||
| 5765c81f66 | |||
| 92334a8e28 | |||
| c4218c8e40 | |||
| c1f27fb848 | |||
| 6d0fd5bb93 | |||
| bd15d3ae24 | |||
| 7f249cd179 | |||
| aef3f4be99 | |||
| bf8083888d | |||
| f4fa5b7340 | |||
| 169568ca47 | |||
| 9cc4ddfc88 | |||
| 441963c84c | |||
| cf4ae61ac6 | |||
| da0f1cacea | |||
| 5e5592178d | |||
| b01222518d | |||
| 2060cf8a70 | |||
| a4bd87119b | |||
| 9f26355fe0 | |||
| f667d4965d | |||
| 585f84a734 | |||
| a1bff85263 | |||
| fb920bba62 | |||
| 58697f6f3b | |||
| 18c5b8d68a | |||
| 08cf140811 | |||
| 94673bcdf2 | |||
| aa15917c9d | |||
| 85fb37b6ea | |||
| ae3ae9a474 | |||
| e9be643db5 | |||
| b49eefbee6 | |||
| 640283fec6 | |||
| c8d50a6060 | |||
| 6a2728e730 | |||
| 1740d93420 | |||
| 0042d9b406 | |||
| 3bfa6097d5 | |||
| 237b8865f5 | |||
| 8f01cece3a | |||
| 2ca574d9e6 | |||
| 7f27e1e0e1 | |||
| 875e2f9d0d | |||
| 5c538dd9d6 | |||
| 3fb82502f7 | |||
| 7be2998cae | |||
| 9dfab9d9a4 | |||
| b63ae1f190 | |||
| 4fc796b387 | |||
| c3ff41dd84 | |||
| 0b927f059c | |||
| f3c3afd4cd | |||
| 1e26859bb7 | |||
| b1beacd1f3 | |||
| d9a0e2b8f4 | |||
| 4c7e95aac3 | |||
| c3310c6e8f | |||
| 2a24567370 | |||
| bd9628df93 | |||
| 99a153d9e8 | |||
| 04da71c3a1 | |||
| 0c86dd9d8d | |||
| 349068dcda | |||
| 144b10b35d | |||
| 44722bddcf | |||
| 2a240e3fe2 | |||
| ee66fb1c60 | |||
| ea212e4b50 | |||
| 038b18edf1 | |||
| 0610ebc514 | |||
| 968117c940 | |||
| 6788b12d65 | |||
| 66ffc1b2d6 | |||
| 4c7d384e9a | |||
| d83aef4e86 | |||
| bf59ba76f5 | |||
| e8e78f8be6 | |||
| 76da659977 | |||
| c2eea8abba | |||
| 065805d6e1 | |||
| 5fa79b2db2 | |||
| 5f20d3eb34 | |||
| 3c0f5a3fe4 | |||
| 771e9cd68a | |||
| c328afee57 | |||
| 3dae86223d | |||
| dd07212f02 | |||
| 85e31a5479 | |||
| a53d95099c | |||
| f76ee5e5ef | |||
| eba02dc1b9 | |||
| bcabdfc1ae | |||
| cb44b3b9f2 | |||
| 9aa2cd71b2 | |||
| abdf81b39b | |||
| 1176725af7 | |||
| f668adcf11 | |||
| a3beac8d13 | |||
| e926b4b3c9 | |||
| 6c168f046d | |||
| 37fa6affc8 | |||
| 47c6490115 | |||
| 467831e3d8 | |||
| 3c1638c046 | |||
| 4b7e87ec7f | |||
| 98b387aac3 | |||
| 5312c7ff31 | |||
| be956654b2 | |||
| 977f57fd37 | |||
| a1ea37c336 | |||
| 7369339c88 | |||
| 8ace2ba194 | |||
| 3f79385160 | |||
| 14ee003907 | |||
| 3bd3116cf8 | |||
| a1f692408d | |||
| b0d9c074e1 | |||
| 9238e15bb1 | |||
| d7b9a29dc6 | |||
| 0c2f58e40c | |||
| fba27ef4b9 | |||
| 19cdc09928 | |||
| 2b2d93b05f | |||
| 36471c23ce | |||
| bc88aaf8d7 | |||
| f598a8666c | |||
| 85b5ccf5ae | |||
| a592199068 | |||
| f7ea2629e4 | |||
| 83a9fa8913 | |||
| 477b058f74 | |||
| 861a6a17e4 | |||
| 0df6d83f08 | |||
| 036f9d5a45 | |||
| 43143f6434 | |||
| 3f24879157 | |||
| 40c098f78a | |||
| b335af8507 | |||
| 9a6a146183 | |||
| 9230588ce8 | |||
| 78406ba954 | |||
| aa78b70d69 | |||
| 1b81e7c928 | |||
| de08df6a7e | |||
| c2e4b8ca9a | |||
| 6723221a42 | |||
| 5bd7fffb4c | |||
| 471c71310b | |||
| 9e79acc25a | |||
| cdb06a4c6e | |||
| e1af3737f3 | |||
| d7f7f1b200 | |||
| 8914b12db5 | |||
| 296777546c | |||
| 3db8c5a0eb | |||
| b0e6bfa84c | |||
| b1e8990654 | |||
| 463ef9b08f | |||
| 14016743be | |||
| 59194dcf4d | |||
| b32c72f1fc | |||
| e27a46973c | |||
| 06461a465b | |||
| cf6f231be6 | |||
| b1d5849bb5 | |||
| cdc75dec97 | |||
| 9239f75123 | |||
| f0bee2ac8b | |||
| 295e481a2e | |||
| 5aaca27cda | |||
| f220c1e9eb | |||
| 642132920f | |||
| 4e7e7d99cc | |||
| ba8aa46cd0 | |||
| f00be30318 | |||
| 6b5231f930 | |||
| 2c7a9734af | |||
| 8526387acb | |||
| 17ac5c0525 | |||
| bf82288ab1 | |||
| 2151ad7f34 | |||
| 576914ed54 | |||
| 43dba8ac7f | |||
| dcd0cb8080 | |||
| 47beaff152 | |||
| e4bae80f9b | |||
| 1d531a9600 | |||
| 14cd1f7a0b | |||
| 871fd20ee5 | |||
| 58f0d81925 | |||
| b98454d213 | |||
| 954b89e762 | |||
| f75280ac9c | |||
| e370a65383 | |||
| c5a3f9ccd4 | |||
| 20cda07eef | |||
| c1975166a0 | |||
| f0574d492c | |||
| d8fa44f17e | |||
| 9447828c3a | |||
| 39fcc62e85 | |||
| 6f0d350f2c | |||
| 719dff1312 | |||
| 7c8404eaf9 | |||
| 4c812d47bd | |||
| 0d81fd287e | |||
| 681cd33698 | |||
| 1153778f92 | |||
| 49332d3e90 | |||
| 4495619a2e | |||
| 33f45582af | |||
| c9c8e14684 | |||
| 5eb3610a01 | |||
| f4a06036c6 | |||
| d4c03ce6cf | |||
| 9368d7c25c | |||
| de497675ac | |||
| a66bd48cae | |||
| 0250352139 | |||
| 134ba8d1dd | |||
| 777b9c9a9e | |||
| 5ba29122fd | |||
| ddc2867f94 | |||
| b81310cb82 | |||
| b4c815a60c | |||
| 473ab12a0a | |||
| 2c23b375b2 | |||
| 5578401a0f | |||
| 9b6d32346b | |||
| 783132318f | |||
| 7f3aa316a8 | |||
| 440ef26b44 | |||
| b84c92be3d | |||
| 40a5d5ddfa | |||
| 374fe1af1e | |||
| bf9b1b1457 | |||
| d5a185b13e | |||
| 40ad3d6c92 | |||
| df8f792183 | |||
| 609e96b5d1 | |||
| bb95747d56 | |||
| afd9d72954 | |||
| 596d79cde2 | |||
| d9cc78615f | |||
| 55e9b082cb | |||
| 70f8fc1b42 | |||
| da970585ca | |||
| d2fa086198 | |||
| 5dc47ac0ea | |||
| f8566871a0 | |||
| c1dea29501 | |||
| 8fc77a4365 | |||
| 21eef55907 | |||
| d5a35c8fc2 | |||
| d873ee9983 | |||
| 6628c365c9 | |||
| 0ca170b130 | |||
| 5040840578 | |||
| 0213c3b4d6 | |||
| 2851ea490c | |||
| 6541682433 | |||
| 693b45c561 | |||
| 6102b310b2 | |||
| ec2b664d8e | |||
| cd82418ee7 | |||
| 352dd5e7fa | |||
| 10b6b0445e | |||
| b0c4302887 | |||
| db1702623c | |||
| 0c8ee105b4 | |||
| a22c20fab0 | |||
| 9ddc8d6ba6 | |||
| 3d48628e71 | |||
| 696e7175b7 | |||
| a78547835e | |||
| a24e701b4e | |||
| 2228c7c29d | |||
| bdc2bc693f | |||
| 33341b60d8 | |||
| 105ced3b01 | |||
| b3aa5f131e | |||
| 5289bf3eeb | |||
| e7683820d5 | |||
| 772919ef11 | |||
| 95e6fc2844 | |||
| b7fed1ccf2 | |||
| d84136f445 | |||
| 7830b1be87 | |||
| 0dfcddcd17 | |||
| 83ab72079f | |||
| 671527c3ba | |||
| e6c9d7092f | |||
| 049eb2d87b | |||
| b521719b6f | |||
| ff22e75f95 | |||
| 527ee8eace | |||
| 2a3e9b5476 | |||
| 1f22ed98ac | |||
| 3d30fd5440 | |||
| 425bc2ab61 | |||
| 1d494adadb | |||
| c80f91f852 | |||
| b045b000cf | |||
| 53c8a85f0e | |||
| 4af820c301 | |||
| 139083bc57 | |||
| 7609a520d5 | |||
| 8415aa2d4c | |||
| 021ded5cc8 | |||
| 1d8fca7f28 | |||
| 44f39815d3 | |||
| 3640ab9dd3 | |||
| 389f8b514e | |||
| 9606343b2c | |||
| b086cc007d | |||
| 76c34c0014 | |||
| d2cc4c3037 | |||
| 37d7f275ac | |||
| a242c0a999 | |||
| 6dbea83132 | |||
| b35c01e31c | |||
| 4d6ed2b2c1 | |||
| bda6361ca9 | |||
| 87512768f0 | |||
| 84a7cf3f31 | |||
| 3757349c8e | |||
| 15a674157b | |||
| b3dac29dae | |||
| 6e0a859f03 | |||
| 5f2e452d6b | |||
| 815c3ea45f | |||
| 1de6176029 | |||
| fdccd5ad8e | |||
| 35eceaf1c4 | |||
| 1b115dbd3a | |||
| 2ca29edab3 | |||
| 85d8c9dbf0 | |||
| d888064990 | |||
| c16ecd5138 | |||
| 7536dff64b | |||
| e2b8dcf966 | |||
| 9bfc0a816f | |||
| cb02143c2f | |||
| 982e8b8577 | |||
| c901865ac8 | |||
| 5e9002971e | |||
| 974babf69f | |||
| 90c881a3de | |||
| b5a2c41049 | |||
| 5a892bd884 | |||
| 7c9a1b63e2 | |||
| 388f89f185 | |||
| 084dfbc2b3 | |||
| 165a3d6cfd | |||
| 0244d8dfe6 | |||
| ca5f3349e6 | |||
| 3e74059cc3 | |||
| e90c0f4296 | |||
| 59b26dd64d | |||
| a00df9b992 | |||
| bf652295eb | |||
| fa6bdc6d43 | |||
| 58f7b55a09 | |||
| 2e9a92588b | |||
| f99ff02fa2 | |||
| ced53dd04d | |||
| 86de53ab17 | |||
| 45e885c144 | |||
| b9f6adf574 | |||
| 5dadcea426 | |||
| 741f3c8c7d | |||
| a07e1d94c0 | |||
| f8539f723e | |||
| d94e8ee973 | |||
| f1af4038e3 | |||
| e92b19a692 | |||
| df65355ded | |||
| f1ee507bca | |||
| c3e2ec1618 | |||
| bad32be5f6 | |||
| 3ce1dd8087 | |||
| d7d568ee89 | |||
| 3a2f746602 | |||
| 999a40db19 | |||
| 0317287071 | |||
| c5a396e788 | |||
| 36d7151e8d | |||
| 3803c84452 | |||
| 2280ec573e | |||
| 58d41923fd | |||
| ebfb86222f | |||
| c6df7cb5f4 | |||
| 370f8f5086 | |||
| 7eb0cc8a8f | |||
| 992116b01f | |||
| 4a8e229566 | |||
| 737b515110 | |||
| 2b3d6f6ae4 | |||
| 386bebb33b | |||
| 3b24ba9043 | |||
| 41b916e97f | |||
| 988cd4e49a | |||
| 0b0abcea8b | |||
| 6b6c8e98fc | |||
| 97e20fb684 | |||
| 90d04fa60f | |||
| 5c6e156ea0 | |||
| 46ef59c679 | |||
| bf4089b33b | |||
| bb83ad47a4 | |||
| 0f9fab1d4f | |||
| 138bee8143 | |||
| d7e8d53a2a | |||
| 8db5e6d044 | |||
| c5a49e8f99 | |||
| 2654388c52 | |||
| 7d6a2e29aa | |||
| d95c4c0371 | |||
| a75ef43a2f | |||
| e77c212827 | |||
| 2afff77567 | |||
| d975fc7543 | |||
| d3821a4b21 | |||
| 8db5da9ffe | |||
| 781d4ad191 | |||
| e31c76986d | |||
| 0c97db52c5 | |||
| 893e336574 | |||
| 9b27ffbd86 | |||
| 2d5783dae7 | |||
| 579bc0d848 | |||
| 95d1dc24f6 | |||
| 3d9af62160 | |||
| 16942a3442 | |||
| 15719a0d0d | |||
| 3f157d955c | |||
| 061c62a5da | |||
| 4ae8d6441e | |||
| 0ae0c711ff | |||
| 7417d4205b | |||
| d660fe2d35 | |||
| 20133963bc | |||
| 7d37dd5dea | |||
| 3cd87c1cee | |||
| 276d178edf | |||
| 14415dfd10 | |||
| b8f4ed946f | |||
| 3fd59aaa93 | |||
| 61e9b82af2 | |||
| bf74d6ef43 | |||
| e979a0c93f | |||
| ea8000501b | |||
| 879a0494e9 | |||
| 3b7830002a | |||
| 5a160b0f65 | |||
| 14b55ab77f | |||
| 0a109508de | |||
| 779ce184fb | |||
| c47e73461c | |||
| 1dfceb551e | |||
| b1b5665343 | |||
| 0769c39e27 | |||
| c127570c83 | |||
| dfabee5b80 | |||
| 82cd8eae5d | |||
| 05a2547829 | |||
| 1dad5d49a6 | |||
| e1d6169122 | |||
| 15161669ec | |||
| 751dce98f5 | |||
| f983703a2e | |||
| f08920f19a | |||
| ea1abc687b | |||
| 0b48fb8bd7 | |||
| a10e282eb4 | |||
| e8d3d784ab | |||
| 058eb917d1 | |||
| d61aa21d50 | |||
| e4703a383b | |||
| 8a2281269c | |||
| 7296d4d48b | |||
| 05636f3a1d | |||
| 7fda77d51a | |||
| 8615760331 | |||
| 176d2ccda4 | |||
| 52c4b65f1e | |||
| a56e92a571 | |||
| 747bb16919 | |||
| 9df22452af | |||
| 628e4e3522 | |||
| 71cdb8d825 | |||
| beb030fc16 | |||
| c2913d5d69 | |||
| 8589a0588b | |||
| 7ca9ae8d5e | |||
| e2d2d2f8ff | |||
| 196c41e3bc | |||
| 0f9a7a6b2f | |||
| c8706c66ec | |||
| 4a4bf8d98d | |||
| 5184f94e2f | |||
| e3a4b41c2e | |||
| c11eefca32 | |||
| 0e4804137c | |||
| a8b99984f2 | |||
| e5707331e9 | |||
| 12b518578d | |||
| ce85dd0c3a | |||
| c1de7662c1 | |||
| 858426c874 | |||
| f143d4e3f4 | |||
| 1f8f03bbf7 | |||
| b858a404f7 | |||
| c1805783fc | |||
| 8648c4108e | |||
| ba0f6fea51 | |||
| 58ac242770 | |||
| a43b0772e1 | |||
| 5fae7b2100 | |||
| 50defa510f | |||
| 86a75462c5 | |||
| 5e50536c06 | |||
| 08ae836aa1 | |||
| 5bdf19bb18 | |||
| 21ee490d18 | |||
| f1228d0b98 | |||
| e4d4158e3f | |||
| bbff6c3edb | |||
| 7647cb2e49 | |||
| 1fcd2688f8 | |||
| bbeb64a70b | |||
| 78e75a8bae | |||
| 7dd590c43c | |||
| 006eb76bcd | |||
| 47ae00895a | |||
| 17f5d0517d | |||
| 3c7a17cbc1 | |||
| 78ec4142ff | |||
| 76074a821f | |||
| 0e5b939568 | |||
| c1a7e79862 | |||
| df65de4ae2 | |||
| 18633e02d2 | |||
| f0af315315 | |||
| 9738af68c8 | |||
| 8315f4c888 | |||
| 35381279c3 | |||
| e517414080 | |||
| 355e5d2ed3 | |||
| 9fc8d8444b | |||
| 57d7544b52 | |||
| 6cc5131f7a | |||
| 0453d546f8 | |||
| 8f704fdb7c | |||
| 7eb7cd265a | |||
| 70c122074f | |||
| e2a3f751cf | |||
| aeacd26366 | |||
| 930533b6da | |||
| 2ad9891b66 | |||
| 431aed6e88 | |||
| 37adea9387 | |||
| 314356d561 | |||
| 4ee515fa4b | |||
| 57b840327f | |||
| 1e5d8ece56 | |||
| 89fd074ec9 | |||
| ceb55cc8db | |||
| 577d6792f4 | |||
| ecbe1158ed | |||
| e4094afe08 | |||
| 7606a43aa9 | |||
| 1c8339297d | |||
| ccb3670c7c | |||
| 6239b9c13e | |||
| 9f91650e72 | |||
| b9706d462c | |||
| 36fadde3c7 | |||
| 0d5797a827 | |||
| e9586b6b4d | |||
| 35503f1d8f | |||
| fa6c8990ff | |||
| c4c51627d3 | |||
| 682c224d1a | |||
| b0c05c03cc | |||
| dee1bbe54e | |||
| cb26dc9c7b | |||
| 555926849d | |||
| 8b2d00a337 | |||
| 64d07cd04c | |||
| 77bfe6c984 | |||
| 2a46b40457 | |||
| 01f191e5eb | |||
| 053f04b15d | |||
| 9d4f9e46f9 | |||
| 2aa6b93a02 | |||
| 0b2f9747f8 | |||
| e104c020ef | |||
| 6807abff96 | |||
| 94ea7cefb0 | |||
| 262a68ba8f | |||
| ef0d14c35c | |||
| e76d25425a | |||
| f814bf6eab | |||
| fb65be64bb | |||
| 726eb5a030 | |||
| d204e54170 | |||
| 01ea7996b2 | |||
| 0c8b4a9f12 | |||
| 652dd2f2c6 | |||
| 847aa1ebab | |||
| 7fe52e0fbe | |||
| 96991e7623 | |||
| 52fdd7ce2b | |||
| f7531d6a81 | |||
| 31dd75e620 | |||
| 3e776bc53e | |||
| e80e8ab547 | |||
| e6a8c393c4 | |||
| ecf78d7249 | |||
| 77febdd006 | |||
| a0c545e2c4 | |||
| 93f4e1d9b4 | |||
| 460b971473 | |||
| f46d0a9f88 | |||
| fd2ae7e3bd | |||
| 59bfb807e1 | |||
| fe9c79df9d | |||
| a65066e962 | |||
| 41d2914a3b | |||
| cae582232f | |||
| 95ed58be44 | |||
| d2258994e3 | |||
| b4fc981447 | |||
| f9534a283a | |||
| f31ddf7846 | |||
| 272ea832b7 | |||
| 9ed3a4a735 | |||
| 39e1169e8b | |||
| 0f3d335755 | |||
| b824ba5d99 | |||
| 74d1680e7e | |||
| eece51c4fd | |||
| d820829e88 | |||
| f5a0346192 | |||
| 43f871e761 | |||
| 9cc00ab584 | |||
| fcc0391b58 | |||
| 4ac426b61b | |||
| e28af20593 | |||
| 624b3d8742 | |||
| 88b0edd60f | |||
| 3c46aa47ce | |||
| 5835b77a00 | |||
| 750978bef9 | |||
| 77d8caa332 | |||
| 1df475a5ea | |||
| 8733686fc0 | |||
| 0fec86d105 | |||
| 76ad40272e | |||
| 5cd7813f6d | |||
| e78e7687d6 | |||
| b918ccf238 | |||
| d29e0b4dcf | |||
| 2c022e9267 | |||
| b52bcfb84e | |||
| 237d83885d | |||
| 232607278a | |||
| 350aeecf3d | |||
| dafcde53e5 | |||
| 3bc81cf9cf | |||
| f82cf14c97 | |||
| 5ccd5f6b4e | |||
| fd56854c3f | |||
| 8d3c10ca74 | |||
| bc85248978 | |||
| 6d5c5fc2d5 | |||
| 4eb410bc50 | |||
| 54f308ae11 | |||
| 307bb5f29b | |||
| da7c811590 | |||
| 484a6c2799 | |||
| 64be7259f3 | |||
| 57db2ae3ce | |||
| 17f8a4e6e7 | |||
| 080a636638 | |||
| 211892439e | |||
| 694942e3cd | |||
| 03799855df | |||
| 46d55fa6ce | |||
| c4df1e27f4 | |||
| 81385d85aa | |||
| 938c63db67 | |||
| 121f024be0 | |||
| 980f69dc67 | |||
| b55e8c01a3 | |||
| 3b32b11fa6 | |||
| 1aa40b88e7 | |||
| 0f27a07043 | |||
| 020109b20c | |||
| b73cf9bcd2 | |||
| 0e5b0f776f | |||
| 92110efa67 | |||
| e6478e33b3 | |||
| 0abad8e29f | |||
| 661ff8ec99 | |||
| 9f06a4e32e | |||
| 10ac4f365d | |||
| 27b6f14e31 | |||
| e6e3f42491 | |||
| bc1331283a | |||
| 800811d04f |
@@ -0,0 +1,56 @@
|
||||
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
|
||||
@@ -0,0 +1,316 @@
|
||||
version: 2.1
|
||||
|
||||
|
||||
# We constantly run out of memory so please do not use parallelism (-j, -j4).
|
||||
|
||||
# Reusable image / compiler definitions
|
||||
executors:
|
||||
gcc8:
|
||||
docker:
|
||||
- image: conanio/gcc8
|
||||
environment:
|
||||
CXX: g++-8
|
||||
CC: gcc-8
|
||||
CMAKE_BUILD_FLAGS:
|
||||
CTEST_FLAGS: --output-on-failure
|
||||
|
||||
gcc9:
|
||||
docker:
|
||||
- image: conanio/gcc9
|
||||
environment:
|
||||
CXX: g++-9
|
||||
CC: gcc-9
|
||||
CMAKE_BUILD_FLAGS:
|
||||
CTEST_FLAGS: --output-on-failure
|
||||
|
||||
gcc10:
|
||||
docker:
|
||||
- image: conanio/gcc10
|
||||
environment:
|
||||
CXX: g++-10
|
||||
CC: gcc-10
|
||||
CMAKE_BUILD_FLAGS:
|
||||
CTEST_FLAGS: --output-on-failure
|
||||
|
||||
clang10:
|
||||
docker:
|
||||
- image: conanio/clang10
|
||||
environment:
|
||||
CXX: clang++-10
|
||||
CC: clang-10
|
||||
CMAKE_BUILD_FLAGS:
|
||||
CTEST_FLAGS: --output-on-failure
|
||||
|
||||
clang9:
|
||||
docker:
|
||||
- image: conanio/clang9
|
||||
environment:
|
||||
CXX: clang++-9
|
||||
CC: clang-9
|
||||
CMAKE_BUILD_FLAGS:
|
||||
CTEST_FLAGS: --output-on-failure
|
||||
|
||||
clang6:
|
||||
docker:
|
||||
- image: conanio/clang60
|
||||
environment:
|
||||
CXX: clang++-6.0
|
||||
CC: clang-6.0
|
||||
CMAKE_BUILD_FLAGS:
|
||||
CTEST_FLAGS: --output-on-failure
|
||||
|
||||
# Reusable test commands (and initializer for clang 6)
|
||||
commands:
|
||||
dependency_restore:
|
||||
steps:
|
||||
- restore_cache:
|
||||
keys:
|
||||
- cmake-cache-{{ checksum "dependencies/CMakeLists.txt" }}
|
||||
|
||||
dependency_cache:
|
||||
steps:
|
||||
- save_cache:
|
||||
key: cmake-cache-{{ checksum "dependencies/CMakeLists.txt" }}
|
||||
paths:
|
||||
- dependencies/.cache
|
||||
|
||||
install_cmake:
|
||||
steps:
|
||||
- run: apt-get update -qq
|
||||
- run: apt-get install -y cmake
|
||||
|
||||
cmake_prep:
|
||||
steps:
|
||||
- checkout
|
||||
- run: mkdir -p build
|
||||
|
||||
cmake_build_cache:
|
||||
steps:
|
||||
- cmake_prep
|
||||
- dependency_restore
|
||||
- run: cmake -DSIMDJSON_DEVELOPER_MODE=ON $CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX:PATH=destination -B build .
|
||||
- dependency_cache # dependencies are produced in the configure step
|
||||
|
||||
cmake_build:
|
||||
steps:
|
||||
- cmake_build_cache
|
||||
- run: cmake --build build
|
||||
|
||||
cmake_test:
|
||||
steps:
|
||||
- cmake_build
|
||||
- run: |
|
||||
cd build &&
|
||||
tools/json2json -h &&
|
||||
ctest $CTEST_FLAGS -L acceptance &&
|
||||
ctest $CTEST_FLAGS -LE acceptance -LE explicitonly
|
||||
|
||||
cmake_assert_test:
|
||||
steps:
|
||||
- run: |
|
||||
cd build &&
|
||||
tools/json2json -h &&
|
||||
ctest $CTEST_FLAGS -L assert
|
||||
|
||||
cmake_test_all:
|
||||
steps:
|
||||
- cmake_build
|
||||
- run: |
|
||||
cd build &&
|
||||
tools/json2json -h &&
|
||||
ctest $CTEST_FLAGS -DSIMDJSON_IMPLEMENTATION="haswell;westmere;fallback" -L acceptance -LE per_implementation &&
|
||||
SIMDJSON_FORCE_IMPLEMENTATION=haswell ctest $CTEST_FLAGS -L per_implementation -LE explicitonly &&
|
||||
SIMDJSON_FORCE_IMPLEMENTATION=westmere ctest $CTEST_FLAGS -L per_implementation -LE explicitonly &&
|
||||
SIMDJSON_FORCE_IMPLEMENTATION=fallback ctest $CTEST_FLAGS -L per_implementation -LE explicitonly &&
|
||||
ctest $CTEST_FLAGS -LE "acceptance|per_implementation" # Everything we haven't run yet, run now.
|
||||
|
||||
|
||||
cmake_perftest:
|
||||
steps:
|
||||
- cmake_build_cache
|
||||
- run: |
|
||||
cmake -DSIMDJSON_ENABLE_DOM_CHECKPERF=ON --build build --target checkperf &&
|
||||
cd build &&
|
||||
ctest --output-on-failure -R checkperf
|
||||
|
||||
# we not only want cmake to build and run tests, but we want also a successful installation from which we can build, link and run programs
|
||||
cmake_install_test: # this version builds, install, test and then verify from the installation
|
||||
steps:
|
||||
- run: cd build && make install
|
||||
- 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 && c++ -Ibuild/destination/include -Lbuild/destination/lib -std=c++17 -Wl,-rpath,build/destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json
|
||||
|
||||
cmake_installed_test_cxx20: # assuming that it was installed, this tries to build using C++20
|
||||
steps:
|
||||
- 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 && c++ -Ibuild/destination/include -Lbuild/destination/lib -std=c++20 -Wl,-rpath,build/destination/lib -o linkandrun tmp.cpp -lsimdjson && ./linkandrun jsonexamples/twitter.json
|
||||
|
||||
jobs:
|
||||
|
||||
# static
|
||||
justlib-gcc10:
|
||||
description: Build just the library, install it and do a basic test
|
||||
executor: gcc10
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_JUST_LIBRARY=ON }
|
||||
steps: [ cmake_build, cmake_install_test, cmake_installed_test_cxx20 ]
|
||||
assert-gcc10:
|
||||
description: Build the library with asserts on, install it and run tests
|
||||
executor: gcc10
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DCMAKE_CXX_FLAGS_RELEASE=-O3 }
|
||||
steps: [ cmake_test, cmake_assert_test ]
|
||||
assert-clang10:
|
||||
description: Build just the library, install it and do a basic test
|
||||
executor: clang10
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DCMAKE_CXX_FLAGS_RELEASE=-O3 }
|
||||
steps: [ cmake_test, cmake_assert_test ]
|
||||
gcc10-perftest:
|
||||
description: Build and run performance tests on GCC 10 and AVX 2 with a cmake static build, this test performance regression
|
||||
executor: gcc10
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DBUILD_SHARED_LIBS=OFF }
|
||||
steps: [ cmake_perftest ]
|
||||
gcc10:
|
||||
description: Build and run tests on GCC 10 and AVX 2 with a cmake static build
|
||||
executor: gcc10
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DBUILD_SHARED_LIBS=OFF }
|
||||
steps: [ cmake_test, cmake_install_test, cmake_installed_test_cxx20 ]
|
||||
clang6:
|
||||
description: Build and run tests on clang 6 and AVX 2 with a cmake static build
|
||||
executor: clang6
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DBUILD_SHARED_LIBS=OFF }
|
||||
steps: [ cmake_test, cmake_install_test ]
|
||||
clang10:
|
||||
description: Build and run tests on clang 10 and AVX 2 with a cmake static build
|
||||
executor: clang10
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DBUILD_SHARED_LIBS=OFF }
|
||||
steps: [ cmake_test, cmake_install_test, cmake_installed_test_cxx20 ]
|
||||
# libcpp
|
||||
libcpp-clang10:
|
||||
description: Build and run tests on clang 10 and AVX 2 with a cmake static build and libc++
|
||||
executor: clang10
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_USE_LIBCPP=ON -DBUILD_SHARED_LIBS=OFF }
|
||||
steps: [ cmake_test, cmake_install_test, cmake_installed_test_cxx20 ]
|
||||
# sanitize
|
||||
sanitize-gcc10:
|
||||
description: Build and run tests on GCC 10 and AVX 2 with a cmake sanitize build
|
||||
executor: gcc10
|
||||
environment: { CMAKE_FLAGS: -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DSIMDJSON_SANITIZE=ON, CTEST_FLAGS: --output-on-failure -LE explicitonly }
|
||||
steps: [ cmake_test ]
|
||||
sanitize-clang10:
|
||||
description: Build and run tests on clang 10 and AVX 2 with a cmake sanitize build
|
||||
executor: clang10
|
||||
environment: { CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON -DSIMDJSON_NO_FORCE_INLINING=ON -DSIMDJSON_SANITIZE=ON, CTEST_FLAGS: --output-on-failure -LE explicitonly }
|
||||
steps: [ cmake_test ]
|
||||
threadsanitize-gcc10:
|
||||
description: Build and run tests on GCC 10 and AVX 2 with a cmake sanitize build
|
||||
executor: gcc10
|
||||
environment: { CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON -DSIMDJSON_SANITIZE_THREADS=ON, CTEST_FLAGS: --output-on-failure -LE explicitonly }
|
||||
steps: [ cmake_test ]
|
||||
threadsanitize-clang10:
|
||||
description: Build and run tests on clang 10 and AVX 2 with a cmake sanitize build
|
||||
executor: clang10
|
||||
environment: { CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON -DSIMDJSON_NO_FORCE_INLINING=ON -DSIMDJSON_SANITIZE_THREADS=ON, CTEST_FLAGS: --output-on-failure -LE explicitonly }
|
||||
steps: [ cmake_test ]
|
||||
# dynamic
|
||||
dynamic-gcc10:
|
||||
description: Build and run tests on GCC 10 and AVX 2 with a cmake dynamic build
|
||||
executor: gcc10
|
||||
environment: { CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON }
|
||||
steps: [ cmake_test, cmake_install_test ]
|
||||
dynamic-clang10:
|
||||
description: Build and run tests on clang 10 and AVX 2 with a cmake dynamic build
|
||||
executor: clang10
|
||||
environment: { CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON }
|
||||
steps: [ cmake_test, cmake_install_test ]
|
||||
|
||||
# unthreaded
|
||||
unthreaded-gcc10:
|
||||
description: Build and run tests on GCC 10 and AVX 2 *without* threads
|
||||
executor: gcc10
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_ENABLE_THREADS=OFF }
|
||||
steps: [ cmake_test, cmake_install_test ]
|
||||
unthreaded-clang10:
|
||||
description: Build and run tests on Clang 10 and AVX 2 *without* threads
|
||||
executor: clang10
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_ENABLE_THREADS=OFF }
|
||||
steps: [ cmake_test, cmake_install_test ]
|
||||
|
||||
# noexcept
|
||||
noexcept-gcc10:
|
||||
description: Build and run tests on GCC 10 and AVX 2 with exceptions off
|
||||
executor: gcc10
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_EXCEPTIONS=OFF }
|
||||
steps: [ cmake_test, cmake_install_test ]
|
||||
noexcept-clang10:
|
||||
description: Build and run tests on Clang 10 and AVX 2 with exceptions off
|
||||
executor: clang10
|
||||
environment: { CMAKE_FLAGS: -DSIMDJSON_EXCEPTIONS=OFF }
|
||||
steps: [ cmake_test, cmake_install_test ]
|
||||
|
||||
#
|
||||
# Misc.
|
||||
#
|
||||
|
||||
# make (test and checkperf)
|
||||
arch-haswell-gcc10:
|
||||
description: Build, run tests and check performance on GCC 10 with -march=haswell
|
||||
executor: gcc10
|
||||
environment: { CXXFLAGS: -march=haswell }
|
||||
steps: [ cmake_test ]
|
||||
arch-nehalem-gcc10:
|
||||
description: Build, run tests and check performance on GCC 10 with -march=nehalem
|
||||
executor: gcc10
|
||||
environment: { CXXFLAGS: -march=nehalem }
|
||||
steps: [ cmake_test ]
|
||||
sanitize-haswell-gcc10:
|
||||
description: Build and run tests on GCC 10 and AVX 2 with a cmake sanitize build
|
||||
executor: gcc10
|
||||
environment: { CXXFLAGS: -march=haswell, CMAKE_FLAGS: -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DSIMDJSON_SANITIZE=ON, CTEST_FLAGS: --output-on-failure -LE explicitonly }
|
||||
steps: [ cmake_test ]
|
||||
sanitize-haswell-clang10:
|
||||
description: Build and run tests on clang 10 and AVX 2 with a cmake sanitize build
|
||||
executor: clang10
|
||||
environment: { CXXFLAGS: -march=haswell, CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON -DSIMDJSON_NO_FORCE_INLINING=ON -DSIMDJSON_SANITIZE=ON, CTEST_FLAGS: --output-on-failure -LE explicitonly }
|
||||
steps: [ cmake_test ]
|
||||
|
||||
workflows:
|
||||
version: 2.1
|
||||
build_and_test:
|
||||
jobs:
|
||||
# full multi-implementation tests
|
||||
#- gcc7 tested on GitHub actions
|
||||
- gcc10 # do not delete this as it tests our performance
|
||||
- clang6
|
||||
#- clang10 # this gets tested a lot below
|
||||
|
||||
# libc++
|
||||
- libcpp-clang10
|
||||
|
||||
# full single-implementation tests
|
||||
- sanitize-gcc10
|
||||
- sanitize-clang10
|
||||
- threadsanitize-gcc10
|
||||
- threadsanitize-clang10
|
||||
- dynamic-gcc10
|
||||
- dynamic-clang10
|
||||
- unthreaded-gcc10
|
||||
- unthreaded-clang10
|
||||
|
||||
# no exceptions
|
||||
- noexcept-gcc10
|
||||
- noexcept-clang10
|
||||
|
||||
# quicker make single-implementation tests
|
||||
- arch-haswell-gcc10
|
||||
- arch-nehalem-gcc10
|
||||
|
||||
|
||||
# sanitized single-implementation tests
|
||||
- sanitize-haswell-gcc10
|
||||
- sanitize-haswell-clang10
|
||||
|
||||
# testing "just the library"
|
||||
- justlib-gcc10
|
||||
|
||||
# testing asserts
|
||||
- assert-gcc10
|
||||
- assert-clang10
|
||||
|
||||
# TODO add windows: https://circleci.com/docs/2.0/configuration-reference/#windows
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
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
|
||||
@@ -0,0 +1 @@
|
||||
BasedOnStyle: LLVM
|
||||
@@ -0,0 +1,47 @@
|
||||
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
|
||||
@@ -0,0 +1,15 @@
|
||||
*
|
||||
!.git
|
||||
!Makefile
|
||||
!amalgamate.py
|
||||
!benchmark
|
||||
!dependencies
|
||||
!include
|
||||
!jsonchecker
|
||||
!jsonexamples
|
||||
!scripts
|
||||
!singleheader
|
||||
!src
|
||||
!style
|
||||
!tests
|
||||
!tools
|
||||
+424
@@ -0,0 +1,424 @@
|
||||
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/
|
||||
@@ -0,0 +1,12 @@
|
||||
# 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
@@ -0,0 +1,118 @@
|
||||
# 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
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
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: https://github.com/simdjson/simdjson/blob/master/doc/basics.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.
|
||||
|
||||
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.
|
||||
|
||||
**simjson 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.
|
||||
|
||||
**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
|
||||
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
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: https://github.com/simdjson/simdjson/blob/master/doc/basics.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
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
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: https://github.com/simdjson/simdjson/blob/master/doc/basics.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
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
Our tests check whether you have introduced trailing white space. If such a test fails, please check the "artifacts button" above, which if you click it gives a link to a downloadable file to help you identify the issue. You can also run scripts/remove_trailing_whitespace.sh locally if you have a bash shell and the sed command available on your system.
|
||||
|
||||
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
|
||||
@@ -0,0 +1,29 @@
|
||||
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@v2
|
||||
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
|
||||
@@ -0,0 +1,34 @@
|
||||
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"
|
||||
@@ -0,0 +1,24 @@
|
||||
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
|
||||
@@ -0,0 +1,33 @@
|
||||
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)
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Doxygen GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
# 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@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: doc/api/html
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Detect trailing whitespace
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
whitespace:
|
||||
runs-on: ubuntu-20.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
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
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: 15
|
||||
# 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@v3
|
||||
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@v3
|
||||
if: always()
|
||||
with:
|
||||
name: valgrindresults
|
||||
path: valgrind.tar
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: Archive any crashes as an artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: crashes
|
||||
path: |
|
||||
crash-*
|
||||
leak-*
|
||||
timeout-*
|
||||
if-no-files-found: ignore
|
||||
@@ -0,0 +1,50 @@
|
||||
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
|
||||
@@ -0,0 +1,44 @@
|
||||
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 .
|
||||
@@ -0,0 +1,46 @@
|
||||
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
|
||||
@@ -0,0 +1,48 @@
|
||||
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
|
||||
@@ -0,0 +1,29 @@
|
||||
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@v2
|
||||
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
|
||||
@@ -0,0 +1,29 @@
|
||||
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@v2
|
||||
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
|
||||
@@ -0,0 +1,29 @@
|
||||
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@v2
|
||||
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
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Performance check on Ubuntu 20.04 CI (GCC 9)
|
||||
|
||||
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-20.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
|
||||
@@ -0,0 +1,38 @@
|
||||
name: Ubuntu 20.04 CI (GCC 8)
|
||||
|
||||
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-20.04
|
||||
env:
|
||||
CXX: g++-8
|
||||
CC: gcc-8
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: dependencies/.cache
|
||||
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
|
||||
- name: Install GCC 8
|
||||
run: sudo apt-get install -y g++-8
|
||||
- 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 .
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Ubuntu 20.04 CI (GCC 9) 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-20.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_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.1)\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 .
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Ubuntu 20.04 CI (GCC 9) 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-20.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.1)\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 .
|
||||
@@ -0,0 +1,41 @@
|
||||
name: Ubuntu 20.04 CI (GCC 9) With Memory Sanitizer
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
ubuntu-build-address-sanitizier:
|
||||
if: >-
|
||||
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
|
||||
! contains(toJSON(github.event.commits.*.message), '[skip github]')
|
||||
runs-on: ubuntu-20.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-20.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
|
||||
@@ -0,0 +1,47 @@
|
||||
name: Ubuntu 20.04 CI (GCC 9)
|
||||
|
||||
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-20.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 .
|
||||
@@ -0,0 +1,23 @@
|
||||
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
|
||||
@@ -0,0 +1,23 @@
|
||||
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
|
||||
@@ -0,0 +1,33 @@
|
||||
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: Use cmake
|
||||
run: |
|
||||
mkdir builddebug &&
|
||||
cd builddebug &&
|
||||
CXX=g++-12 cmake -DSIMDJSON_CXX_STANDARD=20 -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 &&
|
||||
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 .. &&
|
||||
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 .
|
||||
@@ -0,0 +1,23 @@
|
||||
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
|
||||
@@ -0,0 +1,24 @@
|
||||
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_
|
||||
@@ -0,0 +1,24 @@
|
||||
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
|
||||
@@ -0,0 +1,47 @@
|
||||
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 .
|
||||
@@ -0,0 +1,22 @@
|
||||
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
|
||||
@@ -0,0 +1,25 @@
|
||||
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
|
||||
@@ -0,0 +1,21 @@
|
||||
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
|
||||
@@ -0,0 +1,44 @@
|
||||
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
|
||||
@@ -0,0 +1,40 @@
|
||||
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}}
|
||||
@@ -0,0 +1,37 @@
|
||||
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}}
|
||||
@@ -0,0 +1,37 @@
|
||||
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}}
|
||||
@@ -0,0 +1,30 @@
|
||||
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
@@ -0,0 +1,109 @@
|
||||
# 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
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
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"
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
{
|
||||
// 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": [
|
||||
|
||||
]
|
||||
}
|
||||
Vendored
+131
@@ -0,0 +1,131 @@
|
||||
{
|
||||
"editor.rulers": [
|
||||
{"column": 95 },
|
||||
{"column": 120 }
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
# List of authors for copyright purposes, in no particular order
|
||||
Daniel Lemire
|
||||
Geoff Langdale
|
||||
John Keiser
|
||||
+375
@@ -0,0 +1,375 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(
|
||||
simdjson
|
||||
# The version number is modified by tools/release.py
|
||||
VERSION 3.11.0
|
||||
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 "24.0.0" CACHE STRING "simdjson library version")
|
||||
set(SIMDJSON_LIB_SOVERSION "24" 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()
|
||||
|
||||
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_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)
|
||||
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)
|
||||
|
||||
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)
|
||||
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(MSVC 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>"
|
||||
)
|
||||
|
||||
simdjson_add_props(target_compile_features PUBLIC cxx_std_11)
|
||||
|
||||
# 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()
|
||||
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(loongarch64)$")
|
||||
option(SIMDJSON_PREFER_LSX "Prefer LoongArch SX" ON)
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag(-mlasx COMPILER_SUPPORTS_LASX)
|
||||
check_cxx_compiler_flag(-mlsx COMPILER_SUPPORTS_LSX)
|
||||
if(COMPILER_SUPPORTS_LASX AND NOT SIMDJSON_PREFER_LSX)
|
||||
simdjson_add_props(
|
||||
target_compile_options PRIVATE
|
||||
-mlasx
|
||||
)
|
||||
elseif(COMPILER_SUPPORTS_LSX)
|
||||
simdjson_add_props(
|
||||
target_compile_options PRIVATE
|
||||
-mlsx
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# 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>
|
||||
)
|
||||
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 ----
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
#
|
||||
# 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()
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
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 discusssed 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).
|
||||
@@ -0,0 +1,45 @@
|
||||
# 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!
|
||||
+332
@@ -0,0 +1,332 @@
|
||||
|
||||
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
|
||||
------------------------------
|
||||
|
||||
```bash
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -D SIMDJSON_DEVELOPER_MODE=ON ..
|
||||
cmake --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
|
||||
------------------------------
|
||||
|
||||
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.
|
||||
* **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:
|
||||
* **.drone.yml:** Definitions for Drone CI.
|
||||
* **.appveyor.yml:** Definitions for Appveyor CI (Windows).
|
||||
* **.circleci:** Definitions for Circle CI.
|
||||
* **.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).
|
||||
* **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
|
||||
@@ -0,0 +1,201 @@
|
||||
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-2023 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.
|
||||
@@ -0,0 +1,231 @@
|
||||
|
||||
[/badge.svg)](https://simdjson.org/plots.html)
|
||||
[](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:simdjson)
|
||||
[![][license img]][license]
|
||||
|
||||
[](https://simdjson.github.io/simdjson/)
|
||||
|
||||
simdjson : Parsing gigabytes of JSON per second
|
||||
===============================================
|
||||
|
||||
<img src="images/logo.png" width="10%" 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)
|
||||
|
||||
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`:
|
||||
|
||||
```c++
|
||||
#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.
|
||||
* [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.
|
||||
|
||||
Godbolt
|
||||
-------------
|
||||
|
||||
Some users may want to browse code along with the compiled assembly. You want to check out the following lists of examples:
|
||||
* [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
|
||||
------------------------------
|
||||
[](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.
|
||||
- [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.
|
||||
|
||||
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, <br />
|
||||
[](http://www.youtube.com/watch?v=wlvKAT7SZIQ)<br />
|
||||
(It was the best voted talk, we're kinda proud of it.)
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
This code is made available under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,7 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please use the following contact information for reporting a vulnerability:
|
||||
|
||||
- [Daniel Lemire](https://github.com/lemire) - daniel@lemire.me
|
||||
@@ -1,127 +0,0 @@
|
||||
<!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"> 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&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&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&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&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) && !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 "simdjson/generic/base.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/generic/jsoncharutils.h"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "simdjson/generic/atomparsing.h"</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "simdjson/generic/dom_parser_implementation.h"</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include "simdjson/generic/implementation_simdjson_result_base.h"</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include "simdjson/generic/numberparsing.h"</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 "simdjson/generic/implementation_simdjson_result_base-inl.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_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
@@ -1,167 +0,0 @@
|
||||
<!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"> 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&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&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&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;"> </span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">▼</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;"> </span><span id="arr_0_0_" class="arrow" onclick="toggleFolder('0_0_')">▼</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;"> </span><span id="arr_0_0_0_" class="arrow" onclick="toggleFolder('0_0_0_')">▼</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;"> </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;"> </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;"> </span><span id="arr_0_0_2_" class="arrow" onclick="toggleFolder('0_0_2_')">▼</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;"> </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;"> </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;"> </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;"> </span><span id="arr_0_0_5_" class="arrow" onclick="toggleFolder('0_0_5_')">▼</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;"> </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;"> </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;"> </span><span id="arr_0_1_" class="arrow" onclick="toggleFolder('0_1_')">▼</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;"> </span><span id="arr_0_1_0_" class="arrow" onclick="toggleFolder('0_1_0_')">▼</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;"> </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;"> </span><span id="arr_0_1_1_" class="arrow" onclick="toggleFolder('0_1_1_')">▼</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;"> </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;"> </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;"> </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;"> </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;"> </span><span id="arr_0_1_1_4_" class="arrow" onclick="toggleFolder('0_1_1_4_')">▼</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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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;"> </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< dom::array ></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;"> </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< dom::document_stream ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_13_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </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< dom::element ></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;"> </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< dom::object ></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;"> </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< SIMDJSON_IMPLEMENTATION::ondemand::array ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_16_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </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< SIMDJSON_IMPLEMENTATION::ondemand::document_reference ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_17_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </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< SIMDJSON_IMPLEMENTATION::ondemand::field ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_18_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </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< SIMDJSON_IMPLEMENTATION::ondemand::json_iterator ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_19_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </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< SIMDJSON_IMPLEMENTATION::ondemand::json_type ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_20_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </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< SIMDJSON_IMPLEMENTATION::ondemand::object ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_21_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </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< SIMDJSON_IMPLEMENTATION::ondemand::token_iterator ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_22_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </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< SIMDJSON_IMPLEMENTATION::ondemand::value ></a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_23_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </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< SIMDJSON_IMPLEMENTATION::ondemand::value_iterator ></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>
|
||||
@@ -1,58 +0,0 @@
|
||||
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 ]
|
||||
] ]
|
||||
];
|
||||
@@ -1,143 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/base.h"</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> <<span class="keyword">typename</span> T> <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> <<span class="keyword">typename</span> T> <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>
|
||||
@@ -1,125 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/arm64/base.h"</span></div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include "simdjson/arm64/intrinsics.h"</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include "simdjson/arm64/bitmanipulation.h"</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include "simdjson/arm64/bitmask.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/arm64/numberparsing_defs.h"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "simdjson/arm64/simd.h"</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "simdjson/arm64/stringparsing_defs.h"</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>
|
||||
@@ -1,216 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/arm64/base.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/arm64/intrinsics.h"</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(&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 & (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(&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">"rbit %0, %1"</span> : <span class="stringliteral">"=r"</span>(rev_bits) : <span class="stringliteral">"r"</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) >> 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 < 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<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> *<span class="keyword">></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>
|
||||
@@ -1,158 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/arm64/base.h"</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 "cumulative bitwise xor," 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->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->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 << 1;</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> bitmask ^= bitmask << 2;</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> bitmask ^= bitmask << 4;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> bitmask ^= bitmask << 8;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> bitmask ^= bitmask << 16;</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> bitmask ^= bitmask << 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>
|
||||
@@ -1,123 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/arm64/begin.h"</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include "simdjson/generic/builder/amalgamated.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/arm64/end.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">#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>
|
||||
@@ -1,121 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/arm64/base.h"</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>
|
||||
@@ -1,148 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/base.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/implementation.h"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "simdjson/internal/instruction_set.h"</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">"arm64"</span>, <span class="stringliteral">"ARM NEON"</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<internal::dom_parser_implementation>& 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> &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>
|
||||
@@ -1,130 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/arm64/base.h"</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 <arm_neon.h></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) <= <a class="code hl_variable" href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf">simdjson::SIMDJSON_PADDING</a>, <span class="stringliteral">"insufficient padding for arm64"</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>
|
||||
@@ -1,177 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/arm64/base.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/arm64/intrinsics.h"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "simdjson/internal/numberparsing_tables.h"</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 <cstring></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 && 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 <intrin.h></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 && 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'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(&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 & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8;</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16;</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordflow">return</span> uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 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, &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<</span>__uint128_t<span class="keyword">></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 >> 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>
|
||||
@@ -1,123 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/arm64/begin.h"</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include "simdjson/generic/ondemand/amalgamated.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/arm64/end.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">#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>
|
||||
@@ -1,626 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/arm64/base.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/arm64/bitmanipulation.h"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "simdjson/internal/simdprune_tables.h"</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><<span class="keyword">typename</span> T></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<uint8_t> and simd8<bool>, 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><<span class="keyword">typename</span> T, <span class="keyword">typename</span> Mask=simd8<<span class="keywordtype">bool</span>>></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&() <span class="keyword">const</span> { <span class="keywordflow">return</span> this->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&() { <span class="keywordflow">return</span> this->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<T> operator|(<span class="keyword">const</span> simd8<T> 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<T> operator&(<span class="keyword">const</span> simd8<T> 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<T> operator^(<span class="keyword">const</span> simd8<T> 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<T> bit_andnot(<span class="keyword">const</span> simd8<T> 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<T> 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<T>& operator|=(<span class="keyword">const</span> simd8<T> other) { <span class="keyword">auto</span> this_cast = <span class="keyword">static_cast<</span>simd8<T>*<span class="keyword">></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<T>& operator&=(<span class="keyword">const</span> simd8<T> other) { <span class="keyword">auto</span> this_cast = <span class="keyword">static_cast<</span>simd8<T>*<span class="keyword">></span>(<span class="keyword">this</span>); *this_cast = *this_cast & 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<T>& operator^=(<span class="keyword">const</span> simd8<T> other) { <span class="keyword">auto</span> this_cast = <span class="keyword">static_cast<</span>simd8<T>*<span class="keyword">></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<T> lhs, <span class="keyword">const</span> simd8<T> 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><<span class="keywordtype">int</span> N=1></div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> simdjson_inline simd8<T> prev(<span class="keyword">const</span> simd8<T> 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><></div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keyword">struct </span>simd8<bool>: base_u8<bool> {</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<bool> 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<bool>(_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> & 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><></div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keyword">struct </span>simd8<uint8_t>: base_u8<uint8_t> {</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<uint8_t>(_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<uint8_t> 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<uint8_t>(</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<uint8_t> saturating_add(<span class="keyword">const</span> simd8<uint8_t> 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<uint8_t> saturating_sub(<span class="keyword">const</span> simd8<uint8_t> 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<uint8_t> operator+(<span class="keyword">const</span> simd8<uint8_t> 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<uint8_t> operator-(<span class="keyword">const</span> simd8<uint8_t> 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<uint8_t>& operator+=(<span class="keyword">const</span> simd8<uint8_t> 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<uint8_t>& operator-=(<span class="keyword">const</span> simd8<uint8_t> 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<uint8_t> max_val(<span class="keyword">const</span> simd8<uint8_t> 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<uint8_t> min_val(<span class="keyword">const</span> simd8<uint8_t> 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<bool> operator<=(<span class="keyword">const</span> simd8<uint8_t> 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<bool> operator>=(<span class="keyword">const</span> simd8<uint8_t> 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<bool> operator<(<span class="keyword">const</span> simd8<uint8_t> 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<bool> operator>(<span class="keyword">const</span> simd8<uint8_t> 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 >, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's.</span></div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> simdjson_inline simd8<uint8_t> gt_bits(<span class="keyword">const</span> simd8<uint8_t> other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> simd8<uint8_t>(*<span class="keyword">this</span> > other); }</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="comment">// Same as <, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's.</span></div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> simdjson_inline simd8<uint8_t> lt_bits(<span class="keyword">const</span> simd8<uint8_t> other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> simd8<uint8_t>(*<span class="keyword">this</span> < 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<bool> any_bits_set(simd8<uint8_t> 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<uint8_t> bits)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (*<span class="keyword">this</span> & 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><<span class="keywordtype">int</span> N></div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> simdjson_inline simd8<uint8_t> 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><<span class="keywordtype">int</span> N></div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> simdjson_inline simd8<uint8_t> 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><<span class="keyword">typename</span> L></div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> simdjson_inline simd8<L> lookup_16(simd8<L> 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 'output" 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<L> 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><<span class="keyword">typename</span> L></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 >> 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 "nearly pruned"</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<</span><span class="keyword">const </span>uint8_t *<span class="keyword">></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<</span>uint8_t*<span class="keyword">></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><<span class="keyword">typename</span> L></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 >> 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><<span class="keyword">typename</span> L></div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> simdjson_inline simd8<L> 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<L>::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><<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> simdjson_inline simd8<uint8_t> apply_lookup_16_to(<span class="keyword">const</span> simd8<T> 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<uint8_t>(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><></div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> <span class="keyword">struct </span>simd8<int8_t> {</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<int8_t> 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<int8_t> 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<int8_t> 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&() <span class="keyword">const</span> { <span class="keywordflow">return</span> this->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&() { <span class="keywordflow">return</span> this->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<int8_t> 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<int8_t>(</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<uint8_t>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> vreinterpretq_u8_s8(this->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<int8_t> operator+(<span class="keyword">const</span> simd8<int8_t> 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<int8_t> operator-(<span class="keyword">const</span> simd8<int8_t> 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<int8_t>& operator+=(<span class="keyword">const</span> simd8<int8_t> 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<int8_t>& operator-=(<span class="keyword">const</span> simd8<int8_t> 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<int8_t> max_val(<span class="keyword">const</span> simd8<int8_t> 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<int8_t> min_val(<span class="keyword">const</span> simd8<int8_t> 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<bool> operator>(<span class="keyword">const</span> simd8<int8_t> 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<bool> operator<(<span class="keyword">const</span> simd8<int8_t> 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<bool> <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<int8_t> 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><<span class="keywordtype">int</span> N=1></div>
|
||||
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> simdjson_inline simd8<int8_t> prev(<span class="keyword">const</span> simd8<int8_t> 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><<span class="keyword">typename</span> L></div>
|
||||
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> simdjson_inline simd8<L> lookup_16(simd8<L> 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><<span class="keyword">typename</span> L></div>
|
||||
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> simdjson_inline simd8<L> 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<L>::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><<span class="keyword">typename</span> T></div>
|
||||
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span> simdjson_inline simd8<int8_t> apply_lookup_16_to(<span class="keyword">const</span> simd8<T> 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<uint8_t>(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><<span class="keyword">typename</span> T></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<T>);</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">"ARM kernel should use four registers per 64-byte block."</span>);</div>
|
||||
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno"> 430</span> <span class="keyword">const</span> simd8<T> chunks[NUM_CHUNKS];</div>
|
||||
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span> <span class="keyword">template</span><<span class="keywordtype">int</span> <span class="keywordtype">id</span>x> simd8<uint8_t> get()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> idx < NUM_CHUNKS ? chunks[idx] : simd8<T>(); }</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<T>& 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<T>& operator=(<span class="keyword">const</span> simd8<T>& 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<T> chunk0, <span class="keyword">const</span> simd8<T> chunk1, <span class="keyword">const</span> simd8<T> chunk2, <span class="keyword">const</span> simd8<T> 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<T>::load(ptr), simd8<T>::load(ptr+16), simd8<T>::load(ptr+32), simd8<T>::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->chunks[0].store(ptr+<span class="keyword">sizeof</span>(simd8<T>)*0);</div>
|
||||
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> this->chunks[1].store(ptr+<span class="keyword">sizeof</span>(simd8<T>)*1);</div>
|
||||
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span> this->chunks[2].store(ptr+<span class="keyword">sizeof</span>(simd8<T>)*2);</div>
|
||||
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span> this->chunks[3].store(ptr+<span class="keyword">sizeof</span>(simd8<T>)*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<T> 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->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->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->chunks[0].compress_halves(uint16_t(mask), output, &output[popcounts & 0xFF]);</div>
|
||||
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> this->chunks[1].compress_halves(uint16_t(mask >> 16), &output[(offsets >> 8) & 0xFF], &output[(offsets >> 16) & 0xFF]);</div>
|
||||
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> this->chunks[2].compress_halves(uint16_t(mask >> 32), &output[(offsets >> 24) & 0xFF], &output[(offsets >> 32) & 0xFF]);</div>
|
||||
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> this->chunks[3].compress_halves(uint16_t(mask >> 48), &output[(offsets >> 40) & 0xFF], &output[(offsets >> 48) & 0xFF]);</div>
|
||||
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> <span class="keywordflow">return</span> offsets >> 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->chunks[0] & bit_mask, this->chunks[1] & bit_mask);</div>
|
||||
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> uint8x16_t sum1 = vpaddq_u8(this->chunks[2] & bit_mask, this->chunks[3] & 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<T> mask = simd8<T>::splat(m);</div>
|
||||
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> <span class="keywordflow">return</span> simd8x64<bool>(</div>
|
||||
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> this->chunks[0] == mask,</div>
|
||||
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"> 487</span> this->chunks[1] == mask,</div>
|
||||
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> this->chunks[2] == mask,</div>
|
||||
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"> 489</span> this->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<T> mask = simd8<T>::splat(m);</div>
|
||||
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> <span class="keywordflow">return</span> simd8x64<bool>(</div>
|
||||
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> this->chunks[0] <= mask,</div>
|
||||
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> this->chunks[1] <= mask,</div>
|
||||
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> this->chunks[2] <= mask,</div>
|
||||
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span> this->chunks[3] <= 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<T></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 &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>
|
||||
@@ -1,196 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/arm64/base.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/arm64/simd.h"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "simdjson/arm64/bitmanipulation.h"</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) & 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> >= (BYTES_PROCESSED - 1), <span class="stringliteral">"backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"</span>);</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> simd8<uint8_t> v0(src);</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> simd8<uint8_t> 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<bool>(v0 == <span class="charliteral">'\\'</span>, v1 == <span class="charliteral">'\\'</span>, v0 == <span class="charliteral">'"'</span>, v1 == <span class="charliteral">'"'</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 >> 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> >= (BYTES_PROCESSED - 1), <span class="stringliteral">"escaping finder must process fewer than SIMDJSON_PADDING bytes"</span>);</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> simd8<uint8_t> 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<bool> is_quote = (v == <span class="charliteral">'"'</span>);</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> simd8<bool> is_backslash = (v == <span class="charliteral">'\\'</span>);</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> simd8<bool> is_control = (v < 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>
|
||||
@@ -1,123 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/arm64/begin.h"</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include "simdjson/generic/amalgamated.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/arm64/end.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">#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>
|
||||
@@ -1,227 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/generic/ondemand/base.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/generic/ondemand/array_iterator.h"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "simdjson/generic/ondemand/value-inl.h"</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "simdjson/generic/ondemand/value_iterator-inl.h"</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 &_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<value></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> &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> &) <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> &<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'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<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::simdjson_result(</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> SIMDJSON_IMPLEMENTATION::ondemand::array_iterator &&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<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>(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<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::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<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>({}, 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<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::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<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator==(<span class="keyword">const</span> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &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<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator!=(<span class="keyword">const</span> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &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<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::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'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<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::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< value > 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 &) 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 & 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 &) 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>
|
||||
@@ -1,208 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 <iterator></span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/generic/implementation_simdjson_result_base.h"</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "simdjson/generic/ondemand/base.h"</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "simdjson/generic/ondemand/value_iterator.h"</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<value></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><<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>></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> &) 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> &) 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> &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 &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><<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>>;</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><></div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="keyword">struct </span>simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> : <span class="keyword">public</span> SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> {</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<SIMDJSON_IMPLEMENTATION::ondemand::value>;</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 &&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<SIMDJSON_IMPLEMENTATION::ondemand::value> 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<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &) 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<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &) const noexcept;</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &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>
|
||||
@@ -1,147 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/base.h"</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include <atomic></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><<span class="keyword">typename</span> T></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& 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->()<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& operator*() { <span class="keywordflow">return</span> *ptr; }</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> T* operator->() { <span class="keywordflow">return</span> ptr.load(); }</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> atomic_ptr& 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<T*> 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>
|
||||
@@ -1,193 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/generic/base.h"</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include "simdjson/generic/jsoncharutils.h"</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 <cstring></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'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("false");</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(&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) <= <a class="code hl_variable" href="namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf">SIMDJSON_PADDING</a>, <span class="stringliteral">"SIMDJSON_PADDING must be larger than 4 bytes"</span>);</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> std::memcpy(&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">"true"</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 > 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">"true"</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">"alse"</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 > 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">"alse"</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">"null"</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 > 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">"null"</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>
|
||||
@@ -1,165 +0,0 @@
|
||||
<!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"> 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&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&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&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&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 "simdjson/common_defs.h"</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include "simdjson/compiler_check.h"</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include "simdjson/error.h"</span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include "simdjson/portability.h"</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include "simdjson/concepts.h"</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include "simdjson/constevalutil.h"</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><<span class="keyword">typename</span> T></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>
|
||||
@@ -0,0 +1,34 @@
|
||||
add_subdirectory(dom)
|
||||
|
||||
|
||||
include_directories( . linux )
|
||||
link_libraries(simdjson-windows-headers test-data)
|
||||
link_libraries(simdjson)
|
||||
|
||||
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()
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
#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
|
||||
@@ -0,0 +1,51 @@
|
||||
#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
|
||||
@@ -0,0 +1,72 @@
|
||||
#pragma once
|
||||
|
||||
#if SIMDJSON_EXCEPTIONS
|
||||
|
||||
#include "amazon_cellphones.h"
|
||||
|
||||
namespace amazon_cellphones {
|
||||
|
||||
using namespace simdjson;
|
||||
|
||||
template<bool threaded>
|
||||
struct simdjson_ondemand {
|
||||
using StringType = std::string;
|
||||
|
||||
ondemand::parser parser{};
|
||||
|
||||
bool run(simdjson::padded_string &json, std::map<StringType, brand> &result) {
|
||||
#ifdef SIMDJSON_THREADS_ENABLED
|
||||
parser.threaded = threaded;
|
||||
#endif
|
||||
ondemand::document_stream stream = parser.iterate_many(json);
|
||||
ondemand::document_stream::iterator i = stream.begin();
|
||||
++i; // Skip first line
|
||||
for (;i != stream.end(); ++i) {
|
||||
auto doc = *i;
|
||||
size_t index{0};
|
||||
StringType copy;
|
||||
double rating;
|
||||
uint64_t reviews;
|
||||
for ( auto value : doc ) {
|
||||
switch (index)
|
||||
{
|
||||
case 1:
|
||||
copy = StringType(std::string_view(value));
|
||||
break;
|
||||
case 5:
|
||||
rating = double(value);
|
||||
break;
|
||||
case 7:
|
||||
reviews = uint64_t(value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
auto x = result.find(copy);
|
||||
if (x == result.end()) { // If key not found, add new key
|
||||
result.emplace(copy, amazon_cellphones::brand{
|
||||
rating * reviews,
|
||||
reviews
|
||||
});
|
||||
} else { // Otherwise, update key data
|
||||
x->second.cumulative_rating += rating * reviews;
|
||||
x->second.reviews_count += reviews;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
BENCHMARK_TEMPLATE(amazon_cellphones, simdjson_ondemand<UNTHREADED>)->UseManualTime();
|
||||
#ifdef SIMDJSON_THREADS_ENABLED
|
||||
BENCHMARK_TEMPLATE(amazon_cellphones, simdjson_ondemand<THREADED>)->UseManualTime();
|
||||
#endif
|
||||
|
||||
} // namespace amazon_cellphones
|
||||
|
||||
#endif // SIMDJSON_EXCEPTIONS
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,613 @@
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <iostream>
|
||||
#include "simdjson.h"
|
||||
#include <sstream>
|
||||
|
||||
using namespace simdjson;
|
||||
using namespace benchmark;
|
||||
using namespace std;
|
||||
|
||||
const padded_string EMPTY_ARRAY("[]", 2);
|
||||
|
||||
static const char *TWITTER_JSON = SIMDJSON_BENCHMARK_DATA_DIR "twitter.json";
|
||||
static const char *NUMBERS_JSON = SIMDJSON_BENCHMARK_DATA_DIR "numbers.json";
|
||||
|
||||
static void recover_one_string(State& state) {
|
||||
dom::parser parser;
|
||||
const std::string_view data = "\"one string\"";
|
||||
padded_string docdata{data};
|
||||
// we do not want mem. alloc. in the loop.
|
||||
auto error = parser.allocate(docdata.size());
|
||||
if(error) {
|
||||
cout << error << endl;
|
||||
return;
|
||||
}
|
||||
dom::element doc;
|
||||
if ((error = parser.parse(docdata).get(doc))) {
|
||||
cerr << "could not parse string" << error << endl;
|
||||
return;
|
||||
}
|
||||
for (simdjson_unused auto _ : state) {
|
||||
std::string_view v;
|
||||
error = doc.get(v);
|
||||
if (error) {
|
||||
cerr << "could not get string" << error << endl;
|
||||
return;
|
||||
}
|
||||
benchmark::DoNotOptimize(v);
|
||||
}
|
||||
}
|
||||
BENCHMARK(recover_one_string);
|
||||
|
||||
|
||||
static void serialize_twitter(State& state) {
|
||||
dom::parser parser;
|
||||
padded_string docdata;
|
||||
auto error = padded_string::load(TWITTER_JSON).get(docdata);
|
||||
if(error) {
|
||||
cerr << "could not parse twitter.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
// we do not want mem. alloc. in the loop.
|
||||
if((error = parser.allocate(docdata.size()))) {
|
||||
cout << error << endl;
|
||||
return;
|
||||
}
|
||||
dom::element doc;
|
||||
if ((error = parser.parse(docdata).get(doc))) {
|
||||
cerr << "could not parse twitter.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
size_t bytes = 0;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
std::string serial = simdjson::minify(doc);
|
||||
bytes += serial.size();
|
||||
benchmark::DoNotOptimize(serial);
|
||||
}
|
||||
// we validate the result
|
||||
{
|
||||
auto serial = simdjson::minify(doc);
|
||||
dom::element doc2; // we parse the minified output
|
||||
if ((error = parser.parse(serial).get(doc2))) { throw std::runtime_error("serialization error"); }
|
||||
auto serial2 = simdjson::minify(doc2); // we minify a second time
|
||||
if(serial != serial2) { throw std::runtime_error("serialization mismatch"); }
|
||||
}
|
||||
// Gigabyte: https://en.wikipedia.org/wiki/Gigabyte
|
||||
state.counters["Gigabytes"] = benchmark::Counter(
|
||||
double(bytes), benchmark::Counter::kIsRate,
|
||||
benchmark::Counter::OneK::kIs1000); // For GiB : kIs1024
|
||||
state.counters["docs"] = Counter(double(state.iterations()), benchmark::Counter::kIsRate);
|
||||
}
|
||||
BENCHMARK(serialize_twitter)->ComputeStatistics("max", [](const std::vector<double>& v) -> double {
|
||||
return *(std::max_element(std::begin(v), std::end(v)));
|
||||
})->DisplayAggregatesOnly(true);
|
||||
|
||||
|
||||
static void serialize_big_string_to_string(State& state) {
|
||||
dom::parser parser;
|
||||
std::vector<char> content;
|
||||
content.push_back('\"');
|
||||
for(size_t i = 0 ; i < 100000; i ++) {
|
||||
content.push_back('0' + char(i%10)); // we add what looks like a long list of digits
|
||||
}
|
||||
content.push_back('\"');
|
||||
dom::element doc;
|
||||
simdjson::error_code error;
|
||||
if ((error = parser.parse(content.data(), content.size()).get(doc))) {
|
||||
cerr << "could not parse big string" << error << endl;
|
||||
return;
|
||||
}
|
||||
size_t bytes = 0;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
auto serial = simdjson::to_string(doc);
|
||||
bytes += serial.size();
|
||||
benchmark::DoNotOptimize(serial);
|
||||
}
|
||||
// Gigabyte: https://en.wikipedia.org/wiki/Gigabyte
|
||||
state.counters["Gigabytes"] = benchmark::Counter(
|
||||
double(bytes), benchmark::Counter::kIsRate,
|
||||
benchmark::Counter::OneK::kIs1000); // For GiB : kIs1024
|
||||
state.counters["docs"] = Counter(double(state.iterations()), benchmark::Counter::kIsRate);
|
||||
}
|
||||
BENCHMARK(serialize_big_string_to_string)->ComputeStatistics("max", [](const std::vector<double>& v) -> double {
|
||||
return *(std::max_element(std::begin(v), std::end(v)));
|
||||
})->DisplayAggregatesOnly(true);
|
||||
|
||||
|
||||
static void serialize_twitter_to_string(State& state) {
|
||||
dom::parser parser;
|
||||
padded_string docdata;
|
||||
auto error = padded_string::load(TWITTER_JSON).get(docdata);
|
||||
if(error) {
|
||||
cerr << "could not parse twitter.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
// we do not want mem. alloc. in the loop.
|
||||
if((error = parser.allocate(docdata.size()))) {
|
||||
cout << error << endl;
|
||||
return;
|
||||
}
|
||||
dom::element doc;
|
||||
if ((error = parser.parse(docdata).get(doc))) {
|
||||
cerr << "could not parse twitter.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
size_t bytes = 0;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
auto serial = simdjson::to_string(doc);
|
||||
bytes += serial.size();
|
||||
benchmark::DoNotOptimize(serial);
|
||||
}
|
||||
// we validate the result
|
||||
{
|
||||
auto serial = simdjson::to_string(doc);
|
||||
dom::element doc2; // we parse the stringify output
|
||||
if ((error = parser.parse(serial).get(doc2))) { throw std::runtime_error("serialization error"); }
|
||||
auto serial2 = simdjson::to_string(doc2); // we stringify again
|
||||
if(serial != serial2) { throw std::runtime_error("serialization mismatch"); }
|
||||
}
|
||||
// Gigabyte: https://en.wikipedia.org/wiki/Gigabyte
|
||||
state.counters["Gigabytes"] = benchmark::Counter(
|
||||
double(bytes), benchmark::Counter::kIsRate,
|
||||
benchmark::Counter::OneK::kIs1000); // For GiB : kIs1024
|
||||
state.counters["docs"] = Counter(double(state.iterations()), benchmark::Counter::kIsRate);
|
||||
}
|
||||
BENCHMARK(serialize_twitter_to_string)->ComputeStatistics("max", [](const std::vector<double>& v) -> double {
|
||||
return *(std::max_element(std::begin(v), std::end(v)));
|
||||
})->DisplayAggregatesOnly(true);
|
||||
|
||||
static void serialize_twitter_string_builder(State& state) {
|
||||
dom::parser parser;
|
||||
padded_string docdata;
|
||||
auto error = padded_string::load(TWITTER_JSON).get(docdata);
|
||||
if(error) {
|
||||
cerr << "could not parse twitter.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
// we do not want mem. alloc. in the loop.
|
||||
if((error = parser.allocate(docdata.size()))) {
|
||||
cout << error << endl;
|
||||
return;
|
||||
}
|
||||
dom::element doc;
|
||||
if ((error = parser.parse(docdata).get(doc))) {
|
||||
cerr << "could not parse twitter.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
size_t bytes = 0;
|
||||
simdjson::internal::string_builder<> sb;// not part of our public API, for internal use
|
||||
for (simdjson_unused auto _ : state) {
|
||||
sb.clear();
|
||||
sb.append(doc);
|
||||
std::string_view serial = sb.str();
|
||||
bytes += serial.size();
|
||||
benchmark::DoNotOptimize(serial);
|
||||
}
|
||||
// Gigabyte: https://en.wikipedia.org/wiki/Gigabyte
|
||||
state.counters["Gigabytes"] = benchmark::Counter(
|
||||
double(bytes), benchmark::Counter::kIsRate,
|
||||
benchmark::Counter::OneK::kIs1000); // For GiB : kIs1024
|
||||
state.counters["docs"] = Counter(double(state.iterations()), benchmark::Counter::kIsRate);
|
||||
}
|
||||
BENCHMARK(serialize_twitter_string_builder)->ComputeStatistics("max", [](const std::vector<double>& v) -> double {
|
||||
return *(std::max_element(std::begin(v), std::end(v)));
|
||||
})->DisplayAggregatesOnly(true);
|
||||
|
||||
|
||||
static void numbers_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
dom::array arr;
|
||||
simdjson::error_code error;
|
||||
if ((error = parser.load(NUMBERS_JSON).get(arr))) {
|
||||
cerr << "could not read " << NUMBERS_JSON << " as an array: " << error << endl;
|
||||
return;
|
||||
}
|
||||
for (simdjson_unused auto _ : state) {
|
||||
std::vector<double> container;
|
||||
for (auto e : arr) {
|
||||
double x;
|
||||
if ((error = e.get(x))) { cerr << "found a node that is not an number: " << error << endl; break;}
|
||||
container.push_back(x);
|
||||
}
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_scan);
|
||||
|
||||
static void numbers_size_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
dom::array arr;
|
||||
simdjson::error_code error;
|
||||
if ((error = parser.load(NUMBERS_JSON).get(arr))) {
|
||||
cerr << "could not read " << NUMBERS_JSON << " as an array: " << error << endl;
|
||||
return;
|
||||
}
|
||||
for (simdjson_unused auto _ : state) {
|
||||
std::vector<double> container;
|
||||
container.resize(arr.size());
|
||||
size_t pos = 0;
|
||||
for (auto e : arr) {
|
||||
double x;
|
||||
if ((error = e.get(x))) { cerr << "found a node that is not an number: " << error << endl; break;}
|
||||
container[pos++] = x;
|
||||
}
|
||||
if(pos != container.size()) { cerr << "bad count" << endl; }
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_size_scan);
|
||||
|
||||
|
||||
static void numbers_type_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
dom::array arr;
|
||||
simdjson::error_code error;
|
||||
if ((error = parser.load(NUMBERS_JSON).get(arr))) {
|
||||
cerr << "could not read " << NUMBERS_JSON << " as an array" << endl;
|
||||
return;
|
||||
}
|
||||
for (simdjson_unused auto _ : state) {
|
||||
std::vector<double> container;
|
||||
for (auto e : arr) {
|
||||
dom::element_type actual_type = e.type();
|
||||
if(actual_type != dom::element_type::DOUBLE) {
|
||||
cerr << "found a node that is not an number?" << endl; break;
|
||||
}
|
||||
double x;
|
||||
error = e.get(x);
|
||||
container.push_back(x);
|
||||
}
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_type_scan);
|
||||
|
||||
static void numbers_type_size_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
dom::array arr;
|
||||
simdjson::error_code error;
|
||||
if ((error = parser.load(NUMBERS_JSON).get(arr))) {
|
||||
cerr << "could not read " << NUMBERS_JSON << " as an array: " << error << endl;
|
||||
return;
|
||||
}
|
||||
for (simdjson_unused auto _ : state) {
|
||||
std::vector<double> container;
|
||||
container.resize(arr.size());
|
||||
size_t pos = 0;
|
||||
for (auto e : arr) {
|
||||
dom::element_type actual_type = e.type();
|
||||
if(actual_type != dom::element_type::DOUBLE) {
|
||||
cerr << "found a node that is not an number?" << endl; break;
|
||||
}
|
||||
double x;
|
||||
error = e.get(x);
|
||||
container[pos++] = x;
|
||||
}
|
||||
if(pos != container.size()) { cerr << "bad count" << endl; }
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_type_size_scan);
|
||||
|
||||
static void numbers_load_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
dom::array arr;
|
||||
simdjson::error_code error;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
// this may hit the disk, but probably just once
|
||||
if ((error = parser.load(NUMBERS_JSON).get(arr))) {
|
||||
cerr << "could not read " << NUMBERS_JSON << " as an array: " << error << endl;
|
||||
break;
|
||||
}
|
||||
std::vector<double> container;
|
||||
for (auto e : arr) {
|
||||
double x;
|
||||
if ((error = e.get(x))) { cerr << "found a node that is not an number: " << error << endl; break;}
|
||||
container.push_back(x);
|
||||
}
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_load_scan);
|
||||
|
||||
static void numbers_load_size_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
dom::array arr;
|
||||
simdjson::error_code error;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
// this may hit the disk, but probably just once
|
||||
if ((error = parser.load(NUMBERS_JSON).get(arr))) {
|
||||
cerr << "could not read " << NUMBERS_JSON << " as an array" << endl;
|
||||
break;
|
||||
}
|
||||
std::vector<double> container;
|
||||
container.resize(arr.size());
|
||||
size_t pos = 0;
|
||||
for (auto e : arr) {
|
||||
double x;
|
||||
if ((error = e.get(x))) { cerr << "found a node that is not an number?" << endl; break;}
|
||||
container[pos++] = x;
|
||||
}
|
||||
if(pos != container.size()) { cerr << "bad count" << endl; }
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_load_size_scan);
|
||||
|
||||
|
||||
#if SIMDJSON_EXCEPTIONS
|
||||
|
||||
|
||||
static void numbers_exceptions_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
dom::array arr = parser.load(NUMBERS_JSON);
|
||||
for (simdjson_unused auto _ : state) {
|
||||
std::vector<double> container;
|
||||
for (double x : arr) {
|
||||
container.push_back(x);
|
||||
}
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_exceptions_scan);
|
||||
|
||||
static void numbers_exceptions_size_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
dom::array arr = parser.load(NUMBERS_JSON);
|
||||
for (simdjson_unused auto _ : state) {
|
||||
std::vector<double> container;
|
||||
container.resize(arr.size());
|
||||
size_t pos = 0;
|
||||
for (auto e : arr) {
|
||||
container[pos++] = double(e);
|
||||
}
|
||||
if(pos != container.size()) { cerr << "bad count" << endl; }
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_exceptions_size_scan);
|
||||
|
||||
|
||||
|
||||
static void numbers_type_exceptions_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
dom::array arr = parser.load(NUMBERS_JSON);
|
||||
for (simdjson_unused auto _ : state) {
|
||||
std::vector<double> container;
|
||||
for (auto e : arr) {
|
||||
dom::element_type actual_type = e.type();
|
||||
if(actual_type != dom::element_type::DOUBLE) {
|
||||
cerr << "found a node that is not an number?" << endl; break;
|
||||
}
|
||||
container.push_back(double(e));
|
||||
}
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_type_exceptions_scan);
|
||||
|
||||
static void numbers_type_exceptions_size_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
dom::array arr = parser.load(NUMBERS_JSON);
|
||||
for (simdjson_unused auto _ : state) {
|
||||
std::vector<double> container;
|
||||
container.resize(arr.size());
|
||||
size_t pos = 0;
|
||||
for (auto e : arr) {
|
||||
dom::element_type actual_type = e.type();
|
||||
if(actual_type != dom::element_type::DOUBLE) {
|
||||
cerr << "found a node that is not an number?" << endl; break;
|
||||
}
|
||||
container[pos++] = double(e);
|
||||
}
|
||||
if(pos != container.size()) { cerr << "bad count" << endl; }
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_type_exceptions_size_scan);
|
||||
|
||||
static void numbers_exceptions_load_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
// this may hit the disk, but probably just once
|
||||
dom::array arr = parser.load(NUMBERS_JSON);
|
||||
std::vector<double> container;
|
||||
for (double x : arr) {
|
||||
container.push_back(x);
|
||||
}
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_exceptions_load_scan);
|
||||
|
||||
static void numbers_exceptions_load_size_scan(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
// this may hit the disk, but probably just once
|
||||
dom::array arr = parser.load(NUMBERS_JSON);
|
||||
std::vector<double> container;
|
||||
container.resize(arr.size());
|
||||
size_t pos = 0;
|
||||
for (double x : arr) {
|
||||
container[pos++] = x;
|
||||
}
|
||||
if(pos != container.size()) { cerr << "bad count" << endl; }
|
||||
benchmark::DoNotOptimize(container.data());
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
}
|
||||
BENCHMARK(numbers_exceptions_load_size_scan);
|
||||
|
||||
|
||||
static void twitter_count(State& state) {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
dom::element doc = parser.load(TWITTER_JSON);
|
||||
for (simdjson_unused auto _ : state) {
|
||||
uint64_t result_count = doc["search_metadata"]["count"];
|
||||
if (result_count != 100) { return; }
|
||||
}
|
||||
}
|
||||
BENCHMARK(twitter_count);
|
||||
|
||||
static void twitter_default_profile(State& state) {
|
||||
// Count unique users with a default profile.
|
||||
dom::parser parser;
|
||||
dom::element doc = parser.load(TWITTER_JSON);
|
||||
for (simdjson_unused auto _ : state) {
|
||||
set<string_view> default_users;
|
||||
for (dom::object tweet : doc["statuses"]) {
|
||||
dom::object user = tweet["user"];
|
||||
if (user["default_profile"]) {
|
||||
default_users.emplace(user["screen_name"]);
|
||||
}
|
||||
}
|
||||
if (default_users.size() != 86) { return; }
|
||||
}
|
||||
}
|
||||
BENCHMARK(twitter_default_profile);
|
||||
|
||||
static void twitter_image_sizes(State& state) {
|
||||
// Count unique image sizes
|
||||
dom::parser parser;
|
||||
dom::element doc = parser.load(TWITTER_JSON);
|
||||
simdjson::error_code error;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
set<tuple<uint64_t, uint64_t>> image_sizes;
|
||||
for (dom::object tweet : doc["statuses"]) {
|
||||
dom::array media;
|
||||
if (! (error = tweet["entities"]["media"].get(media))) {
|
||||
for (dom::object image : media) {
|
||||
for (auto size : image["sizes"].get_object()) {
|
||||
image_sizes.emplace(size.value["w"], size.value["h"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (image_sizes.size() != 15) { return; };
|
||||
}
|
||||
}
|
||||
BENCHMARK(twitter_image_sizes);
|
||||
|
||||
#endif // SIMDJSON_EXCEPTIONS
|
||||
|
||||
static void error_code_twitter_count(State& state) noexcept {
|
||||
// Prints the number of results in twitter.json
|
||||
dom::parser parser;
|
||||
simdjson::error_code error;
|
||||
dom::element doc;
|
||||
if ((error = parser.load(TWITTER_JSON).get(doc))) { return; }
|
||||
for (simdjson_unused auto _ : state) {
|
||||
uint64_t value;
|
||||
if ((error = doc["search_metadata"]["count"].get(value))) { return; }
|
||||
if (value != 100) { return; }
|
||||
}
|
||||
}
|
||||
BENCHMARK(error_code_twitter_count);
|
||||
|
||||
static void error_code_twitter_default_profile(State& state) noexcept {
|
||||
// Count unique users with a default profile.
|
||||
dom::parser parser;
|
||||
simdjson::error_code error;
|
||||
dom::element doc;
|
||||
if ((error = parser.load(TWITTER_JSON).get(doc))) { std::cerr << error << std::endl; return; }
|
||||
for (simdjson_unused auto _ : state) {
|
||||
set<string_view> default_users;
|
||||
|
||||
dom::array tweets;
|
||||
if ((error = doc["statuses"].get(tweets))) { return; }
|
||||
for (dom::element tweet : tweets) {
|
||||
dom::object user;
|
||||
if ((error = tweet["user"].get(user))) { return; }
|
||||
bool default_profile{};
|
||||
if ((error = user["default_profile"].get(default_profile))) { return; }
|
||||
if (default_profile) {
|
||||
std::string_view screen_name;
|
||||
if ((error = user["screen_name"].get(screen_name))) { return; }
|
||||
default_users.insert(screen_name);
|
||||
}
|
||||
}
|
||||
|
||||
if (default_users.size() != 86) { return; }
|
||||
}
|
||||
}
|
||||
BENCHMARK(error_code_twitter_default_profile);
|
||||
|
||||
static void error_code_twitter_image_sizes(State& state) noexcept {
|
||||
// Count unique image sizes
|
||||
dom::parser parser;
|
||||
simdjson::error_code error;
|
||||
dom::element doc;
|
||||
if ((error = parser.load(TWITTER_JSON).get(doc))) { std::cerr << error << std::endl; return; }
|
||||
for (simdjson_unused auto _ : state) {
|
||||
set<tuple<uint64_t, uint64_t>> image_sizes;
|
||||
dom::array statuses;
|
||||
if ((error = doc["statuses"].get(statuses))) { return; }
|
||||
for (dom::element tweet : statuses) {
|
||||
dom::array images;
|
||||
if (! (error = tweet["entities"]["media"].get(images))) {
|
||||
for (dom::element image : images) {
|
||||
dom::object sizes;
|
||||
if ((error = image["sizes"].get(sizes))) { return; }
|
||||
for (auto size : sizes) {
|
||||
uint64_t width, height;
|
||||
if ((error = size.value["w"].get(width))) { return; }
|
||||
if ((error = size.value["h"].get(height))) { return; }
|
||||
image_sizes.emplace(width, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (image_sizes.size() != 15) { return; };
|
||||
}
|
||||
}
|
||||
BENCHMARK(error_code_twitter_image_sizes);
|
||||
|
||||
static void parse_surrogate_pairs(State& state) {
|
||||
// NOTE: This mostly exists to show there's a tiny benefit to
|
||||
// loading and comparing both bytes of "\\u" simultaneously.
|
||||
// (which should also reduce the compiled code size).
|
||||
// The repeated surrogate pairs make this easier to measure.
|
||||
dom::parser parser;
|
||||
const std::string_view data = "\"\\uD834\\uDD1E\\uD834\\uDD1E\\uD834\\uDD1E\\uD834\\uDD1E\\uD834\\uDD1E\\uD834\\uDD1E\\uD834\\uDD1E\\uD834\\uDD1E\\uD834\\uDD1E\\uD834\\uDD1E\"";
|
||||
padded_string docdata{data};
|
||||
// we do not want mem. alloc. in the loop.
|
||||
auto error = parser.allocate(docdata.size());
|
||||
if (error) {
|
||||
cout << error << endl;
|
||||
return;
|
||||
}
|
||||
for (simdjson_unused auto _ : state) {
|
||||
dom::element doc;
|
||||
if ((error = parser.parse(docdata).get(doc))) {
|
||||
cerr << "could not parse string" << error << endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
BENCHMARK(parse_surrogate_pairs);
|
||||
|
||||
BENCHMARK_MAIN();
|
||||
@@ -0,0 +1,151 @@
|
||||
#include "simdjson.h"
|
||||
|
||||
SIMDJSON_PUSH_DISABLE_ALL_WARNINGS
|
||||
|
||||
#ifdef SIMDJSON_COMPETITION_YYJSON
|
||||
#include "yyjson.h"
|
||||
#endif
|
||||
|
||||
#ifdef SIMDJSON_COMPETITION_RAPIDJSON
|
||||
#include "rapidjson/document.h"
|
||||
#include "rapidjson/reader.h"
|
||||
#include "rapidjson/stringbuffer.h"
|
||||
#include "rapidjson/writer.h"
|
||||
#endif
|
||||
|
||||
#ifdef SIMDJSON_COMPETITION_SAJSON
|
||||
#include "sajson.h"
|
||||
#endif
|
||||
|
||||
#ifdef SIMDJSON_COMPETITION_NLOHMANN_JSON
|
||||
#include <nlohmann/json.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef SIMDJSON_COMPETITION_BOOSTJSON
|
||||
#include <boost/json.hpp>
|
||||
#endif
|
||||
|
||||
// This has to be last, for reasons I don't yet understand
|
||||
#include <benchmark/benchmark.h>
|
||||
|
||||
SIMDJSON_POP_DISABLE_WARNINGS
|
||||
#include "json2msgpack/simdjson_ondemand.h"
|
||||
#include "json2msgpack/simdjson_dom.h"
|
||||
#include "json2msgpack/yyjson.h"
|
||||
#include "json2msgpack/rapidjson.h"
|
||||
#if SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "json2msgpack/sajson.h"
|
||||
#endif // SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "json2msgpack/nlohmann_json.h"
|
||||
#include "json2msgpack/boostjson.h"
|
||||
|
||||
#include "partial_tweets/simdjson_ondemand.h"
|
||||
#include "partial_tweets/simdjson_dom.h"
|
||||
#include "partial_tweets/yyjson.h"
|
||||
#if SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "partial_tweets/sajson.h"
|
||||
#endif // SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "partial_tweets/rapidjson.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "partial_tweets/rapidjson_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "partial_tweets/nlohmann_json.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "partial_tweets/nlohmann_json_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "partial_tweets/boostjson.h"
|
||||
|
||||
|
||||
#include "distinct_user_id/simdjson_ondemand.h"
|
||||
#include "distinct_user_id/simdjson_ondemand_json_pointer.h"
|
||||
#include "distinct_user_id/simdjson_dom.h"
|
||||
#include "distinct_user_id/simdjson_dom_json_pointer.h"
|
||||
#include "distinct_user_id/yyjson.h"
|
||||
#if SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "distinct_user_id/sajson.h"
|
||||
#endif // SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "distinct_user_id/rapidjson.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "distinct_user_id/rapidjson_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "distinct_user_id/nlohmann_json.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "distinct_user_id/nlohmann_json_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "distinct_user_id/boostjson.h"
|
||||
|
||||
#include "find_tweet/simdjson_ondemand.h"
|
||||
#include "find_tweet/simdjson_dom.h"
|
||||
#include "find_tweet/yyjson.h"
|
||||
#if SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "find_tweet/sajson.h"
|
||||
#endif // SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "find_tweet/rapidjson.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "find_tweet/rapidjson_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "find_tweet/nlohmann_json.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "find_tweet/nlohmann_json_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "find_tweet/boostjson.h"
|
||||
|
||||
#include "top_tweet/simdjson_ondemand.h"
|
||||
#include "top_tweet/simdjson_dom.h"
|
||||
#include "top_tweet/yyjson.h"
|
||||
#if SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "top_tweet/sajson.h"
|
||||
#endif // SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "top_tweet/rapidjson.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "top_tweet/rapidjson_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "top_tweet/nlohmann_json.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "top_tweet/nlohmann_json_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "top_tweet/boostjson.h"
|
||||
|
||||
|
||||
#include "kostya/simdjson_ondemand.h"
|
||||
#include "kostya/simdjson_dom.h"
|
||||
#include "kostya/yyjson.h"
|
||||
#if SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "kostya/sajson.h"
|
||||
#endif // SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "kostya/rapidjson.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "kostya/rapidjson_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "kostya/nlohmann_json.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "kostya/nlohmann_json_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "kostya/boostjson.h"
|
||||
|
||||
#include "large_random/simdjson_ondemand.h"
|
||||
#if SIMDJSON_COMPETITION_ONDEMAND_UNORDERED
|
||||
#include "large_random/simdjson_ondemand_unordered.h"
|
||||
#endif // SIMDJSON_COMPETITION_ONDEMAND_UNORDERED
|
||||
#include "large_random/simdjson_dom.h"
|
||||
#include "large_random/yyjson.h"
|
||||
#if SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "large_random/sajson.h"
|
||||
#endif // SIMDJSON_COMPETITION_ONDEMAND_SAJSON
|
||||
#include "large_random/rapidjson.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "large_random/rapidjson_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "large_random/nlohmann_json.h"
|
||||
#if SIMDJSON_COMPETITION_SAX
|
||||
#include "large_random/nlohmann_json_sax.h"
|
||||
#endif // SIMDJSON_COMPETITION_SAX
|
||||
#include "large_random/boostjson.h"
|
||||
|
||||
#include "amazon_cellphones/simdjson_dom.h"
|
||||
#include "amazon_cellphones/simdjson_ondemand.h"
|
||||
|
||||
#include "large_amazon_cellphones/simdjson_dom.h"
|
||||
#include "large_amazon_cellphones/simdjson_ondemand.h"
|
||||
|
||||
BENCHMARK_MAIN();
|
||||
@@ -0,0 +1,226 @@
|
||||
#include <benchmark/benchmark.h>
|
||||
#include <iostream>
|
||||
#include "simdjson.h"
|
||||
using namespace simdjson;
|
||||
using namespace benchmark;
|
||||
using namespace std;
|
||||
|
||||
const padded_string EMPTY_ARRAY("[]", 2);
|
||||
const char *TWITTER_JSON = SIMDJSON_BENCHMARK_DATA_DIR "twitter.json";
|
||||
const char *GSOC_JSON = SIMDJSON_BENCHMARK_DATA_DIR "gsoc-2018.json";
|
||||
|
||||
|
||||
|
||||
|
||||
static void fast_minify_twitter(State& state) {
|
||||
dom::parser parser;
|
||||
padded_string docdata;
|
||||
auto error = padded_string::load(TWITTER_JSON).get(docdata);
|
||||
if(error) {
|
||||
cerr << "could not parse twitter.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
std::unique_ptr<char[]> buffer{new char[docdata.size()]};
|
||||
|
||||
size_t bytes = 0;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
size_t new_length{}; // It will receive the minified length.
|
||||
auto error = simdjson::minify(docdata.data(), docdata.size(), buffer.get(), new_length);
|
||||
bytes += docdata.size();
|
||||
benchmark::DoNotOptimize(error);
|
||||
}
|
||||
// Gigabyte: https://en.wikipedia.org/wiki/Gigabyte
|
||||
state.counters["Gigabytes"] = benchmark::Counter(
|
||||
double(bytes), benchmark::Counter::kIsRate,
|
||||
benchmark::Counter::OneK::kIs1000); // For GiB : kIs1024
|
||||
state.counters["docs"] = Counter(double(state.iterations()), benchmark::Counter::kIsRate);
|
||||
}
|
||||
BENCHMARK(fast_minify_twitter)->Repetitions(10)->ComputeStatistics("max", [](const std::vector<double>& v) -> double {
|
||||
return *(std::max_element(std::begin(v), std::end(v)));
|
||||
})->DisplayAggregatesOnly(true);
|
||||
|
||||
|
||||
|
||||
|
||||
static void fast_minify_gsoc(State& state) {
|
||||
dom::parser parser;
|
||||
padded_string docdata;
|
||||
auto error = padded_string::load(GSOC_JSON).get(docdata);
|
||||
if(error) {
|
||||
cerr << "could not parse gsoc-2018.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
std::unique_ptr<char[]> buffer{new char[docdata.size()]};
|
||||
|
||||
size_t bytes = 0;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
size_t new_length{}; // It will receive the minified length.
|
||||
auto error = simdjson::minify(docdata.data(), docdata.size(), buffer.get(), new_length);
|
||||
bytes += docdata.size();
|
||||
benchmark::DoNotOptimize(error);
|
||||
}
|
||||
// Gigabyte: https://en.wikipedia.org/wiki/Gigabyte
|
||||
state.counters["Gigabytes"] = benchmark::Counter(
|
||||
double(bytes), benchmark::Counter::kIsRate,
|
||||
benchmark::Counter::OneK::kIs1000); // For GiB : kIs1024
|
||||
state.counters["docs"] = Counter(double(state.iterations()), benchmark::Counter::kIsRate);
|
||||
}
|
||||
BENCHMARK(fast_minify_gsoc)->Repetitions(10)->ComputeStatistics("max", [](const std::vector<double>& v) -> double {
|
||||
return *(std::max_element(std::begin(v), std::end(v)));
|
||||
})->DisplayAggregatesOnly(true);
|
||||
|
||||
static void unicode_validate_twitter(State& state) {
|
||||
dom::parser parser;
|
||||
padded_string docdata;
|
||||
auto error = padded_string::load(TWITTER_JSON).get(docdata);
|
||||
if(error) {
|
||||
cerr << "could not parse twitter.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
// we do not want mem. alloc. in the loop.
|
||||
error = parser.allocate(docdata.size());
|
||||
if(error) {
|
||||
cout << error << endl;
|
||||
return;
|
||||
}
|
||||
size_t bytes = 0;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
bool is_ok = simdjson::validate_utf8(docdata.data(), docdata.size());
|
||||
bytes += docdata.size();
|
||||
benchmark::DoNotOptimize(is_ok);
|
||||
}
|
||||
// Gigabyte: https://en.wikipedia.org/wiki/Gigabyte
|
||||
state.counters["Gigabytes"] = benchmark::Counter(
|
||||
double(bytes), benchmark::Counter::kIsRate,
|
||||
benchmark::Counter::OneK::kIs1000); // For GiB : kIs1024
|
||||
state.counters["docs"] = Counter(double(state.iterations()), benchmark::Counter::kIsRate);
|
||||
}
|
||||
BENCHMARK(unicode_validate_twitter)->Repetitions(10)->ComputeStatistics("max", [](const std::vector<double>& v) -> double {
|
||||
return *(std::max_element(std::begin(v), std::end(v)));
|
||||
})->DisplayAggregatesOnly(true);
|
||||
|
||||
static void parse_twitter(State& state) {
|
||||
dom::parser parser;
|
||||
padded_string docdata;
|
||||
auto error = padded_string::load(TWITTER_JSON).get(docdata);
|
||||
if(error) {
|
||||
cerr << "could not parse twitter.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
// we do not want mem. alloc. in the loop.
|
||||
error = parser.allocate(docdata.size());
|
||||
if(error) {
|
||||
cout << error << endl;
|
||||
return;
|
||||
}
|
||||
size_t bytes = 0;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
dom::element doc;
|
||||
bytes += docdata.size();
|
||||
if ((error = parser.parse(docdata).get(doc))) {
|
||||
cerr << "could not parse twitter.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
benchmark::DoNotOptimize(doc);
|
||||
}
|
||||
// Gigabyte: https://en.wikipedia.org/wiki/Gigabyte
|
||||
state.counters["Gigabytes"] = benchmark::Counter(
|
||||
double(bytes), benchmark::Counter::kIsRate,
|
||||
benchmark::Counter::OneK::kIs1000); // For GiB : kIs1024
|
||||
state.counters["docs"] = Counter(double(state.iterations()), benchmark::Counter::kIsRate);
|
||||
}
|
||||
BENCHMARK(parse_twitter)->Repetitions(10)->ComputeStatistics("max", [](const std::vector<double>& v) -> double {
|
||||
return *(std::max_element(std::begin(v), std::end(v)));
|
||||
})->DisplayAggregatesOnly(true);
|
||||
|
||||
|
||||
static void parse_gsoc(State& state) {
|
||||
dom::parser parser;
|
||||
padded_string docdata;
|
||||
auto error = padded_string::load(GSOC_JSON).get(docdata);
|
||||
if(error) {
|
||||
cerr << "could not parse gsoc-2018.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
// we do not want mem. alloc. in the loop.
|
||||
error = parser.allocate(docdata.size());
|
||||
if(error) {
|
||||
cout << error << endl;
|
||||
return;
|
||||
}
|
||||
size_t bytes = 0;
|
||||
for (simdjson_unused auto _ : state) {
|
||||
bytes += docdata.size();
|
||||
dom::element doc;
|
||||
if ((error = parser.parse(docdata).get(doc))) {
|
||||
cerr << "could not parse gsoc-2018.json" << error << endl;
|
||||
return;
|
||||
}
|
||||
benchmark::DoNotOptimize(doc);
|
||||
}
|
||||
// Gigabyte: https://en.wikipedia.org/wiki/Gigabyte
|
||||
state.counters["Gigabytes"] = benchmark::Counter(
|
||||
double(bytes), benchmark::Counter::kIsRate,
|
||||
benchmark::Counter::OneK::kIs1000); // For GiB : kIs1024
|
||||
state.counters["docs"] = Counter(double(state.iterations()), benchmark::Counter::kIsRate);
|
||||
}
|
||||
BENCHMARK(parse_gsoc)->Repetitions(10)->ComputeStatistics("max", [](const std::vector<double>& v) -> double {
|
||||
return *(std::max_element(std::begin(v), std::end(v)));
|
||||
})->DisplayAggregatesOnly(true);
|
||||
|
||||
|
||||
static void parser_parse_error_code(State& state) {
|
||||
dom::parser parser;
|
||||
if (parser.allocate(EMPTY_ARRAY.length())) { return; }
|
||||
for (simdjson_unused auto _ : state) {
|
||||
auto error = parser.parse(EMPTY_ARRAY).error();
|
||||
if (error) { return; }
|
||||
}
|
||||
}
|
||||
BENCHMARK(parser_parse_error_code);
|
||||
|
||||
#if SIMDJSON_EXCEPTIONS
|
||||
|
||||
static void parser_parse_exception(State& state) {
|
||||
dom::parser parser;
|
||||
if (parser.allocate(EMPTY_ARRAY.length())) { return; }
|
||||
for (simdjson_unused auto _ : state) {
|
||||
try {
|
||||
simdjson_unused dom::element doc = parser.parse(EMPTY_ARRAY);
|
||||
} catch(simdjson_error &j) {
|
||||
cout << j.what() << endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
BENCHMARK(parser_parse_exception);
|
||||
|
||||
#endif // SIMDJSON_EXCEPTIONS
|
||||
|
||||
static void document_parse_error_code(State& state) {
|
||||
for (simdjson_unused auto _ : state) {
|
||||
dom::parser parser;
|
||||
auto error = parser.parse(EMPTY_ARRAY).error();
|
||||
if (error) { return; }
|
||||
}
|
||||
}
|
||||
BENCHMARK(document_parse_error_code);
|
||||
|
||||
#if SIMDJSON_EXCEPTIONS
|
||||
|
||||
static void document_parse_exception(State& state) {
|
||||
for (simdjson_unused auto _ : state) {
|
||||
try {
|
||||
dom::parser parser;
|
||||
simdjson_unused dom::element doc = parser.parse(EMPTY_ARRAY);
|
||||
} catch(simdjson_error &j) {
|
||||
cout << j.what() << endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
BENCHMARK(document_parse_exception);
|
||||
|
||||
#endif // SIMDJSON_EXCEPTIONS
|
||||
|
||||
BENCHMARK_MAIN();
|
||||
@@ -0,0 +1,508 @@
|
||||
#include "event_counter.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cctype>
|
||||
#ifndef _MSC_VER
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <cinttypes>
|
||||
#include <initializer_list>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "linux-perf-events.h"
|
||||
#ifdef __linux__
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
#include "simdjson.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include "benchmarker.h"
|
||||
|
||||
using namespace simdjson;
|
||||
using std::cerr;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::string;
|
||||
using std::to_string;
|
||||
using std::vector;
|
||||
using std::ostream;
|
||||
using std::ofstream;
|
||||
using std::exception;
|
||||
|
||||
// Stash the exe_name in main() for functions to use
|
||||
char* exe_name;
|
||||
|
||||
void print_usage(ostream& out) {
|
||||
out << "Usage: " << exe_name << " [-v] [-n #] [-s STAGE] [-a ARCH]" << endl;
|
||||
out << endl;
|
||||
out << "Runs the parser against jsonexamples/generated json files in a loop, measuring speed and other statistics." << endl;
|
||||
out << endl;
|
||||
out << "Options:" << endl;
|
||||
out << endl;
|
||||
out << "-n # - Number of iterations per file. Default: 400" << endl;
|
||||
out << "-i # - Number of times to iterate a single file before moving to the next. Default: 20" << endl;
|
||||
out << "-v - Verbose output." << endl;
|
||||
out << "-s STAGE - Stop after the given stage." << endl;
|
||||
out << " -s stage1 - Stop after find_structural_bits." << endl;
|
||||
out << " -s all - Run all stages." << endl;
|
||||
out << "-a ARCH - Use the parser with the designated architecture (HASWELL, WESTMERE," << endl;
|
||||
out << " PPC64 or ARM64). By default, detects best supported architecture." << endl;
|
||||
}
|
||||
|
||||
void exit_usage(string message) {
|
||||
cerr << message << endl;
|
||||
cerr << endl;
|
||||
print_usage(cerr);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
struct option_struct {
|
||||
bool stage1_only = false;
|
||||
|
||||
int32_t iterations = 400;
|
||||
int32_t iteration_step = 50;
|
||||
|
||||
bool verbose = false;
|
||||
|
||||
option_struct(int argc, char **argv) {
|
||||
int c;
|
||||
|
||||
while ((c = getopt(argc, argv, "vtn:i:a:s:")) != -1) {
|
||||
switch (c) {
|
||||
case 'n':
|
||||
iterations = atoi(optarg);
|
||||
break;
|
||||
case 'i':
|
||||
iteration_step = atoi(optarg);
|
||||
break;
|
||||
case 'v':
|
||||
verbose = true;
|
||||
break;
|
||||
case 'a': {
|
||||
auto impl = simdjson::get_available_implementations()[optarg];
|
||||
if(impl && impl->supported_by_runtime_system()) {
|
||||
simdjson::get_active_implementation() = impl;
|
||||
} else {
|
||||
std::cerr << "implementation " << optarg << " not found or not supported " << std::endl;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
if (!strcmp(optarg, "stage1")) {
|
||||
stage1_only = true;
|
||||
} else if (!strcmp(optarg, "all")) {
|
||||
stage1_only = false;
|
||||
} else {
|
||||
exit_usage(string("Unsupported option value -s ") + optarg + ": expected -s stage1 or all");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
exit_error(string("Unexpected argument ") + std::string(1,static_cast<char>(c)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<typename F>
|
||||
void each_stage(const F& f) const {
|
||||
f(BenchmarkStage::STAGE1);
|
||||
if (!this->stage1_only) {
|
||||
f(BenchmarkStage::STAGE2);
|
||||
f(BenchmarkStage::ALL);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
struct feature_benchmarker {
|
||||
benchmarker utf8;
|
||||
benchmarker utf8_miss;
|
||||
benchmarker escape;
|
||||
benchmarker escape_miss;
|
||||
benchmarker empty;
|
||||
benchmarker empty_miss;
|
||||
benchmarker struct7;
|
||||
benchmarker struct7_miss;
|
||||
benchmarker struct7_full;
|
||||
benchmarker struct15;
|
||||
benchmarker struct15_miss;
|
||||
benchmarker struct23;
|
||||
benchmarker struct23_miss;
|
||||
|
||||
feature_benchmarker(event_collector& collector) :
|
||||
utf8 (SIMDJSON_BENCHMARK_DATA_DIR "generated/utf-8.json", collector),
|
||||
utf8_miss (SIMDJSON_BENCHMARK_DATA_DIR "generated/utf-8-miss.json", collector),
|
||||
escape (SIMDJSON_BENCHMARK_DATA_DIR "generated/escape.json", collector),
|
||||
escape_miss (SIMDJSON_BENCHMARK_DATA_DIR "generated/escape-miss.json", collector),
|
||||
empty (SIMDJSON_BENCHMARK_DATA_DIR "generated/0-structurals.json", collector),
|
||||
empty_miss (SIMDJSON_BENCHMARK_DATA_DIR "generated/0-structurals-miss.json", collector),
|
||||
struct7 (SIMDJSON_BENCHMARK_DATA_DIR "generated/7-structurals.json", collector),
|
||||
struct7_miss (SIMDJSON_BENCHMARK_DATA_DIR "generated/7-structurals-miss.json", collector),
|
||||
struct7_full (SIMDJSON_BENCHMARK_DATA_DIR "generated/7-structurals-full.json", collector),
|
||||
struct15 (SIMDJSON_BENCHMARK_DATA_DIR "generated/15-structurals.json", collector),
|
||||
struct15_miss(SIMDJSON_BENCHMARK_DATA_DIR "generated/15-structurals-miss.json", collector),
|
||||
struct23 (SIMDJSON_BENCHMARK_DATA_DIR "generated/23-structurals.json", collector),
|
||||
struct23_miss(SIMDJSON_BENCHMARK_DATA_DIR "generated/23-structurals-miss.json", collector)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
simdjson_inline void run_iterations(size_t iterations, bool stage1_only=false) {
|
||||
struct7.run_iterations(iterations, stage1_only);
|
||||
struct7_miss.run_iterations(iterations, stage1_only);
|
||||
struct7_full.run_iterations(iterations, stage1_only);
|
||||
utf8.run_iterations(iterations, stage1_only);
|
||||
utf8_miss.run_iterations(iterations, stage1_only);
|
||||
escape.run_iterations(iterations, stage1_only);
|
||||
escape_miss.run_iterations(iterations, stage1_only);
|
||||
empty.run_iterations(iterations, stage1_only);
|
||||
empty_miss.run_iterations(iterations, stage1_only);
|
||||
struct15.run_iterations(iterations, stage1_only);
|
||||
struct15_miss.run_iterations(iterations, stage1_only);
|
||||
struct23.run_iterations(iterations, stage1_only);
|
||||
struct23_miss.run_iterations(iterations, stage1_only);
|
||||
}
|
||||
|
||||
double cost_per_block(BenchmarkStage stage, const benchmarker& feature, size_t feature_blocks, const benchmarker& base) const {
|
||||
return (feature[stage].best.elapsed_ns() - base[stage].best.elapsed_ns()) / double(feature_blocks);
|
||||
}
|
||||
|
||||
// Whether we're recording cache miss and branch miss events
|
||||
bool has_events() const {
|
||||
return empty.collector.has_events();
|
||||
}
|
||||
|
||||
// Base cost of any block (including empty ones)
|
||||
double base_cost(BenchmarkStage stage) const {
|
||||
return (empty[stage].best.elapsed_ns() / double(empty.stats->blocks));
|
||||
}
|
||||
|
||||
// Extra cost of a 1-7 structural block over an empty block
|
||||
double struct1_7_cost(BenchmarkStage stage) const {
|
||||
return cost_per_block(stage, struct7, struct7.stats->blocks_with_1_structural, empty);
|
||||
}
|
||||
// Extra cost of an 1-7-structural miss
|
||||
double struct1_7_miss_cost(BenchmarkStage stage) const {
|
||||
return cost_per_block(stage, struct7_miss, struct7_miss.stats->blocks_with_1_structural, struct7);
|
||||
}
|
||||
// Rate of 1-7-structural misses per 8-structural flip
|
||||
double struct1_7_miss_rate(BenchmarkStage stage) const {
|
||||
#if SIMDJSON_SIMPLE_PERFORMANCE_COUNTERS
|
||||
return 1;
|
||||
#else
|
||||
if (!has_events()) { return 1; }
|
||||
return struct7_miss[stage].best.branch_misses() - struct7[stage].best.branch_misses() / double(struct7_miss.stats->blocks_with_1_structural_flipped);
|
||||
#endif
|
||||
}
|
||||
// Extra cost of an 8-15 structural block over a 1-7 structural block
|
||||
double struct8_15_cost(BenchmarkStage stage) const {
|
||||
return cost_per_block(stage, struct15, struct15.stats->blocks_with_8_structurals, struct7);
|
||||
}
|
||||
// Extra cost of an 8-15-structural miss over a 1-7 miss
|
||||
double struct8_15_miss_cost(BenchmarkStage stage) const {
|
||||
return cost_per_block(stage, struct15_miss, struct15_miss.stats->blocks_with_8_structurals_flipped, struct15);
|
||||
}
|
||||
// Rate of 8-15-structural misses per 8-structural flip
|
||||
double struct8_15_miss_rate(BenchmarkStage stage) const {
|
||||
#if SIMDJSON_SIMPLE_PERFORMANCE_COUNTERS
|
||||
return 1;
|
||||
#else
|
||||
if (!has_events()) { return 1; }
|
||||
return double(struct15_miss[stage].best.branch_misses() - struct15[stage].best.branch_misses()) / double(struct15_miss.stats->blocks_with_8_structurals_flipped);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Extra cost of a 16+-structural block over an 8-15 structural block (actual varies based on # of structurals!)
|
||||
double struct16_cost(BenchmarkStage stage) const {
|
||||
return cost_per_block(stage, struct23, struct23.stats->blocks_with_16_structurals, struct15);
|
||||
}
|
||||
// Extra cost of a 16-structural miss over an 8-15 miss
|
||||
double struct16_miss_cost(BenchmarkStage stage) const {
|
||||
return cost_per_block(stage, struct23_miss, struct23_miss.stats->blocks_with_16_structurals_flipped, struct23);
|
||||
}
|
||||
// Rate of 16-structural misses per 16-structural flip
|
||||
double struct16_miss_rate(BenchmarkStage stage) const {
|
||||
#if SIMDJSON_SIMPLE_PERFORMANCE_COUNTERS
|
||||
return 1;
|
||||
#else
|
||||
if (!has_events()) { return 1; }
|
||||
return double(struct23_miss[stage].best.branch_misses() - struct23[stage].best.branch_misses()) / double(struct23_miss.stats->blocks_with_16_structurals_flipped);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// Extra cost of having UTF-8 in a block
|
||||
double utf8_cost(BenchmarkStage stage) const {
|
||||
return cost_per_block(stage, utf8, utf8.stats->blocks_with_utf8, struct7_full);
|
||||
}
|
||||
// Extra cost of a UTF-8 miss
|
||||
double utf8_miss_cost(BenchmarkStage stage) const {
|
||||
return cost_per_block(stage, utf8_miss, utf8_miss.stats->blocks_with_utf8_flipped, utf8);
|
||||
}
|
||||
// Rate of UTF-8 misses per UTF-8 flip
|
||||
double utf8_miss_rate(BenchmarkStage stage) const {
|
||||
#if SIMDJSON_SIMPLE_PERFORMANCE_COUNTERS
|
||||
return 1;
|
||||
#else
|
||||
if (!has_events()) { return 1; }
|
||||
return double(utf8_miss[stage].best.branch_misses() - utf8[stage].best.branch_misses()) / double(utf8_miss.stats->blocks_with_utf8_flipped);
|
||||
#endif
|
||||
}
|
||||
// Extra cost of having escapes in a block
|
||||
double escape_cost(BenchmarkStage stage) const {
|
||||
return cost_per_block(stage, escape, escape.stats->blocks_with_escapes, struct7_full);
|
||||
}
|
||||
// Extra cost of an escape miss
|
||||
double escape_miss_cost(BenchmarkStage stage) const {
|
||||
return cost_per_block(stage, escape_miss, escape_miss.stats->blocks_with_escapes_flipped, escape);
|
||||
}
|
||||
// Rate of escape misses per escape flip
|
||||
double escape_miss_rate(BenchmarkStage stage) const {
|
||||
#if SIMDJSON_SIMPLE_PERFORMANCE_COUNTERS
|
||||
return 1;
|
||||
#else
|
||||
if (!has_events()) { return 1; }
|
||||
return double(escape_miss[stage].best.branch_misses() - escape[stage].best.branch_misses()) / double(escape_miss.stats->blocks_with_escapes_flipped);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
double calc_expected_feature_cost(BenchmarkStage stage, const benchmarker& file) const {
|
||||
// Expected base ns/block (empty)
|
||||
json_stats& stats = *file.stats;
|
||||
double expected = base_cost(stage) * double(stats.blocks);
|
||||
expected += struct1_7_cost(stage) * double(stats.blocks_with_1_structural);
|
||||
expected += utf8_cost(stage) * double(stats.blocks_with_utf8);
|
||||
expected += escape_cost(stage) * double(stats.blocks_with_escapes);
|
||||
expected += struct8_15_cost(stage) * double(stats.blocks_with_8_structurals);
|
||||
expected += struct16_cost(stage) * double(stats.blocks_with_16_structurals);
|
||||
return expected / double(stats.blocks);
|
||||
}
|
||||
|
||||
double calc_expected_miss_cost(BenchmarkStage stage, const benchmarker& file) const {
|
||||
// Expected base ns/block (empty)
|
||||
json_stats& stats = *file.stats;
|
||||
double expected = struct1_7_miss_cost(stage) * double(stats.blocks_with_1_structural_flipped) * struct1_7_miss_rate(stage);
|
||||
expected += utf8_miss_cost(stage) * double(stats.blocks_with_utf8_flipped) * utf8_miss_rate(stage);
|
||||
expected += escape_miss_cost(stage) * double(stats.blocks_with_escapes_flipped) * escape_miss_rate(stage);
|
||||
expected += struct8_15_miss_cost(stage) * double(stats.blocks_with_8_structurals_flipped) * struct8_15_miss_rate(stage);
|
||||
expected += struct16_miss_cost(stage) * double(stats.blocks_with_16_structurals_flipped) * struct16_miss_rate(stage);
|
||||
return expected / double(stats.blocks);
|
||||
}
|
||||
|
||||
double calc_expected_misses(BenchmarkStage stage, const benchmarker& file) const {
|
||||
json_stats& stats = *file.stats;
|
||||
double expected = double(stats.blocks_with_1_structural_flipped) * struct1_7_miss_rate(stage);
|
||||
expected += double(stats.blocks_with_utf8_flipped) * utf8_miss_rate(stage);
|
||||
expected += double(stats.blocks_with_escapes_flipped) * escape_miss_rate(stage);
|
||||
expected += double(stats.blocks_with_8_structurals_flipped) * struct8_15_miss_rate(stage);
|
||||
expected += double(stats.blocks_with_16_structurals_flipped) * struct16_miss_rate(stage);
|
||||
return expected;
|
||||
}
|
||||
|
||||
double calc_expected(BenchmarkStage stage, const benchmarker& file) const {
|
||||
return calc_expected_feature_cost(stage, file) + calc_expected_miss_cost(stage, file);
|
||||
}
|
||||
void print(const option_struct& options) const {
|
||||
printf("\n");
|
||||
printf("Features in ns/block (64 bytes):\n");
|
||||
printf("\n");
|
||||
printf("| %-8s ", "Stage");
|
||||
printf("| %8s ", "Base");
|
||||
printf("| %8s ", "7 Struct");
|
||||
printf("| %8s ", "UTF-8");
|
||||
printf("| %8s ", "Escape");
|
||||
printf("| %8s ", "15 Str.");
|
||||
printf("| %8s ", "16+ Str.");
|
||||
printf("| %15s ", "7 Struct Miss");
|
||||
printf("| %15s ", "UTF-8 Miss");
|
||||
printf("| %15s ", "Escape Miss");
|
||||
printf("| %15s ", "15 Str. Miss");
|
||||
printf("| %15s ", "16+ Str. Miss");
|
||||
printf("|\n");
|
||||
|
||||
printf("|%.10s", "---------------------------------------");
|
||||
printf("|%.10s", "---------------------------------------");
|
||||
printf("|%.10s", "---------------------------------------");
|
||||
printf("|%.10s", "---------------------------------------");
|
||||
printf("|%.10s", "---------------------------------------");
|
||||
printf("|%.10s", "---------------------------------------");
|
||||
printf("|%.10s", "---------------------------------------");
|
||||
printf("|%.17s", "---------------------------------------");
|
||||
printf("|%.17s", "---------------------------------------");
|
||||
printf("|%.17s", "---------------------------------------");
|
||||
printf("|%.17s", "---------------------------------------");
|
||||
printf("|%.17s", "---------------------------------------");
|
||||
printf("|\n");
|
||||
|
||||
options.each_stage([&](auto stage) {
|
||||
printf("| %-8s ", benchmark_stage_name(stage));
|
||||
printf("| %8.3g ", base_cost(stage));
|
||||
printf("| %8.3g ", struct1_7_cost(stage));
|
||||
printf("| %8.3g ", utf8_cost(stage));
|
||||
printf("| %8.3g ", escape_cost(stage));
|
||||
printf("| %8.3g ", struct8_15_cost(stage));
|
||||
printf("| %8.3g ", struct16_cost(stage));
|
||||
if (has_events()) {
|
||||
printf("| %8.3g (%3d%%) ", struct1_7_miss_cost(stage), int(struct1_7_miss_rate(stage)*100));
|
||||
printf("| %8.3g (%3d%%) ", utf8_miss_cost(stage), int(utf8_miss_rate(stage)*100));
|
||||
printf("| %8.3g (%3d%%) ", escape_miss_cost(stage), int(escape_miss_rate(stage)*100));
|
||||
printf("| %8.3g (%3d%%) ", struct8_15_miss_cost(stage), int(struct8_15_miss_rate(stage)*100));
|
||||
printf("| %8.3g (%3d%%) ", struct16_miss_cost(stage), int(struct16_miss_rate(stage)*100));
|
||||
} else {
|
||||
printf("| %8.3g ", struct1_7_miss_cost(stage));
|
||||
printf("| %8.3g ", utf8_miss_cost(stage));
|
||||
printf("| %8.3g ", escape_miss_cost(stage));
|
||||
printf("| %8.3g ", struct8_15_miss_cost(stage));
|
||||
printf("| %8.3g ", struct16_miss_cost(stage));
|
||||
}
|
||||
printf("|\n");
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
#if SIMDJSON_SIMPLE_PERFORMANCE_COUNTERS
|
||||
void print_file_effectiveness(BenchmarkStage stage, const char* filename, const benchmarker& results, const feature_benchmarker& features) {
|
||||
double actual = results[stage].best.elapsed_ns() / double(results.stats->blocks);
|
||||
double calc = features.calc_expected(stage, results);
|
||||
double calc_misses = features.calc_expected_misses(stage, results);
|
||||
double calc_miss_cost = features.calc_expected_miss_cost(stage, results);
|
||||
printf(" | %-8s ", benchmark_stage_name(stage));
|
||||
printf("| %-15s ", filename);
|
||||
printf("| %8.3g ", features.calc_expected_feature_cost(stage, results));
|
||||
printf("| %8.3g ", calc_miss_cost);
|
||||
printf("| %8.3g ", calc);
|
||||
printf("| %8.3g ", actual);
|
||||
printf("| %+8.3g ", actual - calc);
|
||||
printf("| %13llu ", (long long unsigned)(calc_misses));
|
||||
}
|
||||
#else
|
||||
void print_file_effectiveness(BenchmarkStage stage, const char* filename, const benchmarker& results, const feature_benchmarker& features) {
|
||||
double actual = results[stage].best.elapsed_ns() / double(results.stats->blocks);
|
||||
double calc = features.calc_expected(stage, results);
|
||||
double actual_misses = results[stage].best.branch_misses();
|
||||
double calc_misses = features.calc_expected_misses(stage, results);
|
||||
double calc_miss_cost = features.calc_expected_miss_cost(stage, results);
|
||||
printf(" | %-8s ", benchmark_stage_name(stage));
|
||||
printf("| %-15s ", filename);
|
||||
printf("| %8.3g ", features.calc_expected_feature_cost(stage, results));
|
||||
printf("| %8.3g ", calc_miss_cost);
|
||||
printf("| %8.3g ", calc);
|
||||
printf("| %8.3g ", actual);
|
||||
printf("| %+8.3g ", actual - calc);
|
||||
printf("| %13llu ", (long long unsigned)(calc_misses));
|
||||
if (features.has_events()) {
|
||||
printf("| %13llu ", (long long unsigned)(actual_misses));
|
||||
printf("| %+13lld ", (long long int)(actual_misses - calc_misses));
|
||||
double miss_adjustment = calc_miss_cost * (double(int64_t(actual_misses - calc_misses)) / calc_misses);
|
||||
printf("| %8.3g ", calc_miss_cost + miss_adjustment);
|
||||
printf("| %+8.3g ", actual - (calc + miss_adjustment));
|
||||
}
|
||||
printf("|\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
// Read options
|
||||
exe_name = argv[0];
|
||||
option_struct options(argc, argv);
|
||||
if (options.verbose) {
|
||||
verbose_stream = &cout;
|
||||
}
|
||||
|
||||
// Initialize the event collector. We put this early so if it prints an error message, it's the
|
||||
// first thing printed.
|
||||
event_collector collector;
|
||||
|
||||
// Set up benchmarkers by reading all files
|
||||
feature_benchmarker features(collector);
|
||||
benchmarker gsoc_2018(SIMDJSON_BENCHMARK_DATA_DIR "gsoc-2018.json", collector);
|
||||
benchmarker twitter(SIMDJSON_BENCHMARK_DATA_DIR "twitter.json", collector);
|
||||
benchmarker random(SIMDJSON_BENCHMARK_DATA_DIR "random.json", collector);
|
||||
|
||||
// Run the benchmarks
|
||||
progress_bar progress(options.iterations, 100);
|
||||
// Put the if (options.stage1_only) *outside* the loop so that run_iterations will be optimized
|
||||
if (options.stage1_only) {
|
||||
for (int iteration = 0; iteration < options.iterations; iteration += options.iteration_step) {
|
||||
if (!options.verbose) { progress.print(iteration); }
|
||||
features.run_iterations(options.iteration_step, true);
|
||||
gsoc_2018.run_iterations(options.iteration_step, true);
|
||||
twitter.run_iterations(options.iteration_step, true);
|
||||
random.run_iterations(options.iteration_step, true);
|
||||
}
|
||||
} else {
|
||||
for (int iteration = 0; iteration < options.iterations; iteration += options.iteration_step) {
|
||||
if (!options.verbose) { progress.print(iteration); }
|
||||
features.run_iterations(options.iteration_step, false);
|
||||
gsoc_2018.run_iterations(options.iteration_step, false);
|
||||
twitter.run_iterations(options.iteration_step, false);
|
||||
random.run_iterations(options.iteration_step, false);
|
||||
}
|
||||
}
|
||||
if (!options.verbose) { progress.erase(); }
|
||||
|
||||
features.print(options);
|
||||
|
||||
// Gauge effectiveness
|
||||
if (options.verbose) {
|
||||
printf("\n");
|
||||
printf(" Effectiveness Check: Estimated vs. Actual ns/block for real files:\n");
|
||||
printf("\n");
|
||||
printf(" | %8s ", "Stage");
|
||||
printf("| %-15s ", "File");
|
||||
printf("| %11s ", "Est. (Base)");
|
||||
printf("| %11s ", "Est. (Miss)");
|
||||
printf("| %8s ", "Est.");
|
||||
printf("| %8s ", "Actual");
|
||||
printf("| %8s ", "Diff");
|
||||
printf("| %13s ", "Est. Misses");
|
||||
if (features.has_events()) {
|
||||
printf("| %13s ", "Actual Misses");
|
||||
printf("| %13s ", "Diff (Misses)");
|
||||
printf("| %13s ", "Adjusted Miss");
|
||||
printf("| %13s ", "Adjusted Diff");
|
||||
}
|
||||
printf("|\n");
|
||||
printf(" |%.10s", "---------------------------------------");
|
||||
printf("|%.17s", "---------------------------------------");
|
||||
printf("|%.13s", "---------------------------------------");
|
||||
printf("|%.13s", "---------------------------------------");
|
||||
printf("|%.10s", "---------------------------------------");
|
||||
printf("|%.10s", "---------------------------------------");
|
||||
printf("|%.10s", "---------------------------------------");
|
||||
printf("|%.15s", "---------------------------------------");
|
||||
if (features.has_events()) {
|
||||
printf("|%.15s", "---------------------------------------");
|
||||
printf("|%.15s", "---------------------------------------");
|
||||
printf("|%.15s", "---------------------------------------");
|
||||
printf("|%.15s", "---------------------------------------");
|
||||
}
|
||||
printf("|\n");
|
||||
|
||||
options.each_stage([&](auto stage) {
|
||||
print_file_effectiveness(stage, "gsoc-2018.json", gsoc_2018, features);
|
||||
print_file_effectiveness(stage, "twitter.json", twitter, features);
|
||||
print_file_effectiveness(stage, "random.json", random, features);
|
||||
});
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
#ifndef _BENCHMARK_H_
|
||||
#define _BENCHMARK_H_
|
||||
|
||||
#include "event_counter.h"
|
||||
|
||||
/*
|
||||
* Prints the best number of operations per cycle where
|
||||
* test is the function call, answer is the expected answer generated by
|
||||
* test, repeat is the number of times we should repeat and size is the
|
||||
* number of operations represented by test.
|
||||
*/
|
||||
#define BEST_TIME(name, test, expected, pre, repeat, size, verbose) \
|
||||
do { \
|
||||
if (verbose) \
|
||||
std::printf("%-40s\t: ", name); \
|
||||
else \
|
||||
std::printf("\"%-40s\"", name); \
|
||||
fflush(NULL); \
|
||||
event_collector collector; \
|
||||
event_aggregate aggregate{}; \
|
||||
for (decltype(repeat) i = 0; i < repeat; i++) { \
|
||||
pre; \
|
||||
std::atomic_thread_fence(std::memory_order_acquire); \
|
||||
collector.start(); \
|
||||
if (test != expected) { \
|
||||
std::fprintf(stderr, "not expected (%d , %d )", (int)test, \
|
||||
(int)expected); \
|
||||
break; \
|
||||
} \
|
||||
std::atomic_thread_fence(std::memory_order_release); \
|
||||
event_count allocate_count = collector.end(); \
|
||||
aggregate << allocate_count; \
|
||||
} \
|
||||
if (collector.has_events()) { \
|
||||
std::printf("%7.3f", \
|
||||
aggregate.best.cycles() / static_cast<double>(size)); \
|
||||
if (verbose) { \
|
||||
std::printf(" cycles/byte "); \
|
||||
} \
|
||||
std::printf("\t"); \
|
||||
std::printf("%7.3f", \
|
||||
aggregate.best.instructions() / static_cast<double>(size)); \
|
||||
if (verbose) { \
|
||||
std::printf(" instructions/byte "); \
|
||||
} \
|
||||
std::printf("\t"); \
|
||||
} \
|
||||
double gb = static_cast<double>(size) / 1000000000.0; \
|
||||
std::printf("%7.3f", gb / aggregate.best.elapsed_sec()); \
|
||||
if (verbose) { \
|
||||
std::printf(" GB/s "); \
|
||||
} \
|
||||
std::printf("\t"); \
|
||||
std::printf("%7.3f", 1.0 / aggregate.best.elapsed_sec()); \
|
||||
if (verbose) { \
|
||||
std::printf(" documents/s "); \
|
||||
} \
|
||||
std::printf("\n"); \
|
||||
std::fflush(NULL); \
|
||||
} while (0)
|
||||
|
||||
// like BEST_TIME, but no check
|
||||
#define BEST_TIME_NOCHECK(name, test, pre, repeat, size, verbose) \
|
||||
do { \
|
||||
if (verbose) \
|
||||
std::printf("%-40s\t: ", name); \
|
||||
else \
|
||||
std::printf("\"%-40s\"", name); \
|
||||
std::fflush(NULL); \
|
||||
event_collector collector; \
|
||||
event_aggregate aggregate{}; \
|
||||
for (decltype(repeat) i = 0; i < repeat; i++) { \
|
||||
pre; \
|
||||
std::atomic_thread_fence(std::memory_order_acquire); \
|
||||
collector.start(); \
|
||||
test; \
|
||||
std::atomic_thread_fence(std::memory_order_release); \
|
||||
event_count allocate_count = collector.end(); \
|
||||
aggregate << allocate_count; \
|
||||
} \
|
||||
if (collector.has_events()) { \
|
||||
std::printf("%7.3f", \
|
||||
aggregate.best.cycles() / static_cast<double>(size)); \
|
||||
if (verbose) { \
|
||||
std::printf(" cycles/byte "); \
|
||||
} \
|
||||
std::printf("\t"); \
|
||||
std::printf("%7.3f", \
|
||||
aggregate.best.instructions() / static_cast<double>(size)); \
|
||||
if (verbose) { \
|
||||
std::printf(" instructions/byte "); \
|
||||
} \
|
||||
std::printf("\t"); \
|
||||
} \
|
||||
double gb = static_cast<double>(size) / 1000000000.0; \
|
||||
std::printf("%7.3f", gb / aggregate.best.elapsed_sec()); \
|
||||
if (verbose) { \
|
||||
std::printf(" GB/s "); \
|
||||
} \
|
||||
std::printf("\t"); \
|
||||
std::printf("%7.3f", 1.0 / aggregate.best.elapsed_sec()); \
|
||||
if (verbose) { \
|
||||
std::printf(" documents/s "); \
|
||||
} \
|
||||
std::printf("\n"); \
|
||||
std::fflush(NULL); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,538 @@
|
||||
#ifndef __BENCHMARKER_H
|
||||
#define __BENCHMARKER_H
|
||||
|
||||
#include "event_counter.h"
|
||||
#include "simdjson.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cctype>
|
||||
#ifndef _MSC_VER
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <cinttypes>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "linux-perf-events.h"
|
||||
#ifdef __linux__
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
#include "simdjson.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
using namespace simdjson;
|
||||
using std::cerr;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::string;
|
||||
using std::to_string;
|
||||
using std::vector;
|
||||
using std::ostream;
|
||||
using std::ofstream;
|
||||
using std::exception;
|
||||
using std::min;
|
||||
using std::max;
|
||||
|
||||
// Initialize "verbose" to go nowhere. We'll read options in main() and set to cout if verbose is true.
|
||||
std::ofstream dev_null;
|
||||
ostream *verbose_stream = &dev_null;
|
||||
const size_t BYTES_PER_BLOCK = 64;
|
||||
|
||||
ostream& verbose() {
|
||||
return *verbose_stream;
|
||||
}
|
||||
|
||||
void exit_error(string message) {
|
||||
cerr << message << endl;
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
struct json_stats {
|
||||
size_t bytes = 0;
|
||||
size_t blocks = 0;
|
||||
size_t structurals = 0;
|
||||
size_t blocks_with_utf8 = 0;
|
||||
size_t blocks_with_utf8_flipped = 0;
|
||||
size_t blocks_with_escapes = 0;
|
||||
size_t blocks_with_escapes_flipped = 0;
|
||||
size_t blocks_with_0_structurals = 0;
|
||||
size_t blocks_with_0_structurals_flipped = 0;
|
||||
size_t blocks_with_1_structural = 0;
|
||||
size_t blocks_with_1_structural_flipped = 0;
|
||||
size_t blocks_with_8_structurals = 0;
|
||||
size_t blocks_with_8_structurals_flipped = 0;
|
||||
size_t blocks_with_16_structurals = 0;
|
||||
size_t blocks_with_16_structurals_flipped = 0;
|
||||
|
||||
json_stats(const padded_string& json, const dom::parser& parser) {
|
||||
bytes = json.size();
|
||||
blocks = bytes / BYTES_PER_BLOCK;
|
||||
if (bytes % BYTES_PER_BLOCK > 0) { blocks++; } // Account for remainder block
|
||||
structurals = parser.implementation->n_structural_indexes-1;
|
||||
|
||||
// Calculate stats on blocks that will trigger utf-8 if statements / mispredictions
|
||||
bool last_block_has_utf8 = false;
|
||||
for (size_t block=0; block<blocks; block++) {
|
||||
// Find utf-8 in the block
|
||||
size_t block_start = block*BYTES_PER_BLOCK;
|
||||
size_t block_end = block_start+BYTES_PER_BLOCK;
|
||||
if (block_end > json.size()) { block_end = json.size(); }
|
||||
bool block_has_utf8 = false;
|
||||
for (size_t i=block_start; i<block_end; i++) {
|
||||
if (json.data()[i] & 0x80) {
|
||||
block_has_utf8 = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (block_has_utf8) {
|
||||
blocks_with_utf8++;
|
||||
}
|
||||
if (block > 0 && last_block_has_utf8 != block_has_utf8) {
|
||||
blocks_with_utf8_flipped++;
|
||||
}
|
||||
last_block_has_utf8 = block_has_utf8;
|
||||
}
|
||||
|
||||
// Calculate stats on blocks that will trigger escape if statements / mispredictions
|
||||
bool last_block_has_escapes = false;
|
||||
for (size_t block=0; block<blocks; block++) {
|
||||
// Find utf-8 in the block
|
||||
size_t block_start = block*BYTES_PER_BLOCK;
|
||||
size_t block_end = block_start+BYTES_PER_BLOCK;
|
||||
if (block_end > json.size()) { block_end = json.size(); }
|
||||
bool block_has_escapes = false;
|
||||
for (size_t i=block_start; i<block_end; i++) {
|
||||
if (json.data()[i] == '\\') {
|
||||
block_has_escapes = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (block_has_escapes) {
|
||||
blocks_with_escapes++;
|
||||
}
|
||||
if (block > 0 && last_block_has_escapes != block_has_escapes) {
|
||||
blocks_with_escapes_flipped++;
|
||||
}
|
||||
last_block_has_escapes = block_has_escapes;
|
||||
}
|
||||
|
||||
// Calculate stats on blocks that will trigger structural count if statements / mispredictions
|
||||
bool last_block_has_0_structurals = false;
|
||||
bool last_block_has_1_structural = false;
|
||||
bool last_block_has_8_structurals = false;
|
||||
bool last_block_has_16_structurals = false;
|
||||
size_t structural=0;
|
||||
for (size_t block=0; block<blocks; block++) {
|
||||
// Count structurals in the block
|
||||
int block_structurals=0;
|
||||
while (structural < parser.implementation->n_structural_indexes && parser.implementation->structural_indexes[structural] < (block+1)*BYTES_PER_BLOCK) {
|
||||
block_structurals++;
|
||||
structural++;
|
||||
}
|
||||
|
||||
bool block_has_0_structurals = block_structurals == 0;
|
||||
if (block_has_0_structurals) {
|
||||
blocks_with_0_structurals++;
|
||||
}
|
||||
if (block > 0 && last_block_has_0_structurals != block_has_0_structurals) {
|
||||
blocks_with_0_structurals_flipped++;
|
||||
}
|
||||
last_block_has_0_structurals = block_has_0_structurals;
|
||||
|
||||
bool block_has_1_structural = block_structurals >= 1;
|
||||
if (block_has_1_structural) {
|
||||
blocks_with_1_structural++;
|
||||
}
|
||||
if (block > 0 && last_block_has_1_structural != block_has_1_structural) {
|
||||
blocks_with_1_structural_flipped++;
|
||||
}
|
||||
last_block_has_1_structural = block_has_1_structural;
|
||||
|
||||
bool block_has_8_structurals = block_structurals >= 8;
|
||||
if (block_has_8_structurals) {
|
||||
blocks_with_8_structurals++;
|
||||
}
|
||||
if (block > 0 && last_block_has_8_structurals != block_has_8_structurals) {
|
||||
blocks_with_8_structurals_flipped++;
|
||||
}
|
||||
last_block_has_8_structurals = block_has_8_structurals;
|
||||
|
||||
bool block_has_16_structurals = block_structurals >= 16;
|
||||
if (block_has_16_structurals) {
|
||||
blocks_with_16_structurals++;
|
||||
}
|
||||
if (block > 0 && last_block_has_16_structurals != block_has_16_structurals) {
|
||||
blocks_with_16_structurals_flipped++;
|
||||
}
|
||||
last_block_has_16_structurals = block_has_16_structurals;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct progress_bar {
|
||||
int max_value;
|
||||
int total_ticks;
|
||||
double ticks_per_value;
|
||||
int next_tick;
|
||||
progress_bar(int _max_value, int _total_ticks) : max_value(_max_value), total_ticks(_total_ticks), ticks_per_value(double(_total_ticks)/_max_value), next_tick(0) {
|
||||
fprintf(stderr, "[");
|
||||
for (int i=0;i<total_ticks;i++) {
|
||||
fprintf(stderr, " ");
|
||||
}
|
||||
fprintf(stderr, "]");
|
||||
for (int i=0;i<total_ticks+1;i++) {
|
||||
fprintf(stderr, "\b");
|
||||
}
|
||||
}
|
||||
|
||||
void print(int value) {
|
||||
double ticks = value*ticks_per_value;
|
||||
if (ticks >= total_ticks) {
|
||||
ticks = total_ticks-1;
|
||||
}
|
||||
int tick;
|
||||
for (tick=next_tick; tick <= ticks && tick <= total_ticks; tick++) {
|
||||
fprintf(stderr, "=");
|
||||
}
|
||||
next_tick = tick;
|
||||
}
|
||||
void erase() const {
|
||||
for (int i=0;i<next_tick+1;i++) {
|
||||
fprintf(stderr, "\b");
|
||||
}
|
||||
for (int tick=0; tick<=total_ticks+2; tick++) {
|
||||
fprintf(stderr, " ");
|
||||
}
|
||||
for (int tick=0; tick<=total_ticks+2; tick++) {
|
||||
fprintf(stderr, "\b");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The speed at which we can allocate memory is strictly system specific.
|
||||
* It depends on the OS and the runtime library. It is subject to various
|
||||
* system-specific knobs. It is not something that we can reasonably
|
||||
* benchmark with crude timings.
|
||||
* If someone wants to optimize how simdjson allocate memory, then it will
|
||||
* almost surely require a distinct benchmarking tool. What is meant by
|
||||
* "memory allocation" also requires a definition. Doing "new char[size]" can
|
||||
* do many different things depending on the system.
|
||||
*/
|
||||
|
||||
enum class BenchmarkStage {
|
||||
ALL, // This excludes allocation
|
||||
ALLOCATE,
|
||||
STAGE1,
|
||||
STAGE2
|
||||
};
|
||||
|
||||
const char* benchmark_stage_name(BenchmarkStage stage) {
|
||||
switch (stage) {
|
||||
case BenchmarkStage::ALL: return "All (Without Allocation)";
|
||||
case BenchmarkStage::ALLOCATE: return "Allocate";
|
||||
case BenchmarkStage::STAGE1: return "Stage 1";
|
||||
case BenchmarkStage::STAGE2: return "Stage 2";
|
||||
default: return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
struct benchmarker {
|
||||
// JSON text from loading the file. Owns the memory.
|
||||
padded_string json{};
|
||||
// JSON filename
|
||||
const char *filename;
|
||||
// Event collector that can be turned on to measure cycles, missed branches, etc.
|
||||
event_collector& collector;
|
||||
|
||||
// Statistics about the JSON file independent of its speed (amount of utf-8, structurals, etc.).
|
||||
// Loaded on first parse.
|
||||
json_stats* stats;
|
||||
// Speed and event summary for full parse (stage 1 and stage 2, but *excluding* allocation)
|
||||
event_aggregate all_stages_without_allocation{};
|
||||
// Speed and event summary for stage 1
|
||||
event_aggregate stage1{};
|
||||
// Speed and event summary for stage 2
|
||||
event_aggregate stage2{};
|
||||
// Speed and event summary for allocation
|
||||
event_aggregate allocate_stage{};
|
||||
// Speed and event summary for the repeatly-parsing mode
|
||||
event_aggregate loop{};
|
||||
|
||||
benchmarker(const char *_filename, event_collector& _collector)
|
||||
: filename(_filename), collector(_collector), stats(NULL) {
|
||||
verbose() << "[verbose] loading " << filename << endl;
|
||||
auto error = padded_string::load(filename).get(json);
|
||||
if (error) {
|
||||
exit_error(string("Could not load the file ") + filename);
|
||||
}
|
||||
verbose() << "[verbose] loaded " << filename << endl;
|
||||
}
|
||||
|
||||
~benchmarker() {
|
||||
if (stats) {
|
||||
delete stats;
|
||||
}
|
||||
}
|
||||
|
||||
benchmarker(const benchmarker&) = delete;
|
||||
benchmarker& operator=(const benchmarker&) = delete;
|
||||
|
||||
const event_aggregate& operator[](BenchmarkStage stage) const {
|
||||
switch (stage) {
|
||||
case BenchmarkStage::ALL: return this->all_stages_without_allocation;
|
||||
case BenchmarkStage::STAGE1: return this->stage1;
|
||||
case BenchmarkStage::STAGE2: return this->stage2;
|
||||
case BenchmarkStage::ALLOCATE: return this->allocate_stage;
|
||||
default: exit_error("Unknown stage"); return this->all_stages_without_allocation;
|
||||
}
|
||||
}
|
||||
|
||||
int iterations() const {
|
||||
return all_stages_without_allocation.iterations;
|
||||
}
|
||||
|
||||
simdjson_inline void run_iteration(bool stage1_only, bool hotbuffers=false) {
|
||||
// Allocate dom::parser
|
||||
collector.start();
|
||||
dom::parser parser;
|
||||
// We always allocate at least 64KB. Smaller allocations may actually be slower under some systems.
|
||||
error_code error = parser.allocate(json.size() < 65536 ? 65536 : json.size());
|
||||
if (error) {
|
||||
exit_error(string("Unable to allocate_stage ") + to_string(json.size()) + " bytes for the JSON text: " + error_message(error));
|
||||
}
|
||||
event_count allocate_count = collector.end();
|
||||
allocate_stage << allocate_count;
|
||||
// Run it once to get hot buffers
|
||||
if(hotbuffers) {
|
||||
auto result = parser.parse(reinterpret_cast<const uint8_t *>(json.data()), json.size());
|
||||
if (result.error()) {
|
||||
exit_error(string("Failed to parse ") + filename + string(":") + error_message(result.error()));
|
||||
}
|
||||
}
|
||||
|
||||
verbose() << "[verbose] allocated memory for parsed JSON " << endl;
|
||||
|
||||
// Stage 1 (find structurals)
|
||||
collector.start();
|
||||
error = parser.implementation->stage1(reinterpret_cast<const uint8_t *>(json.data()), json.size(), stage1_mode::regular);
|
||||
event_count stage1_count = collector.end();
|
||||
stage1 << stage1_count;
|
||||
if (error) {
|
||||
exit_error(string("Failed to parse ") + filename + " during stage 1: " + error_message(error));
|
||||
}
|
||||
|
||||
// Stage 2 (unified machine) and the rest
|
||||
|
||||
if (stage1_only) {
|
||||
all_stages_without_allocation << stage1_count;
|
||||
} else {
|
||||
event_count stage2_count;
|
||||
collector.start();
|
||||
error = parser.implementation->stage2(parser.doc);
|
||||
if (error) {
|
||||
exit_error(string("Failed to parse ") + filename + " during stage 2 parsing " + error_message(error));
|
||||
}
|
||||
stage2_count = collector.end();
|
||||
stage2 << stage2_count;
|
||||
all_stages_without_allocation << stage1_count + stage2_count;
|
||||
}
|
||||
// Calculate stats the first time we parse
|
||||
if (stats == NULL) {
|
||||
if (stage1_only) { // we need stage 2 once
|
||||
error = parser.implementation->stage2(parser.doc);
|
||||
if (error) {
|
||||
printf("Warning: failed to parse during stage 2. Unable to acquire statistics.\n");
|
||||
}
|
||||
}
|
||||
stats = new json_stats(json, parser);
|
||||
}
|
||||
}
|
||||
|
||||
void run_loop(size_t iterations) {
|
||||
dom::parser parser;
|
||||
auto firstresult = parser.parse(reinterpret_cast<const uint8_t *>(json.data()), json.size());
|
||||
if (firstresult.error()) {
|
||||
exit_error(string("Failed to parse ") + filename + string(":") + error_message(firstresult.error()));
|
||||
}
|
||||
|
||||
collector.start();
|
||||
// some users want something closer to "number of documents per second"
|
||||
for(size_t i = 0; i < iterations; i++) {
|
||||
auto result = parser.parse(reinterpret_cast<const uint8_t *>(json.data()), json.size());
|
||||
if (result.error()) {
|
||||
exit_error(string("Failed to parse ") + filename + string(":") + error_message(result.error()));
|
||||
}
|
||||
}
|
||||
event_count all_loop_count = collector.end();
|
||||
loop << all_loop_count;
|
||||
}
|
||||
|
||||
simdjson_inline void run_iterations(size_t iterations, bool stage1_only, bool hotbuffers=false) {
|
||||
for (size_t i = 0; i<iterations; i++) {
|
||||
run_iteration(stage1_only, hotbuffers);
|
||||
}
|
||||
run_loop(iterations);
|
||||
}
|
||||
|
||||
// Gigabyte: https://en.wikipedia.org/wiki/Gigabyte
|
||||
template<typename T>
|
||||
void print_aggregate(const char* prefix, const T& stage) const {
|
||||
printf("%s%-13s: %8.4f ns per block (%6.2f%%) - %8.4f ns per byte - %8.4f ns per structural - %8.4f GB/s\n",
|
||||
prefix,
|
||||
"Speed",
|
||||
stage.elapsed_ns() / static_cast<double>(stats->blocks), // per block
|
||||
percent(stage.elapsed_sec(), all_stages_without_allocation.elapsed_sec()), // %
|
||||
stage.elapsed_ns() / static_cast<double>(stats->bytes), // per byte
|
||||
stage.elapsed_ns() / static_cast<double>(stats->structurals), // per structural
|
||||
(static_cast<double>(json.size()) / 1000000000.0) / stage.elapsed_sec() // GB/s
|
||||
);
|
||||
|
||||
if (collector.has_events()) {
|
||||
printf("%s%-13s: %8.4f per block (%6.2f%%) - %8.4f per byte - %8.4f per structural - %8.3f GHz est. frequency\n",
|
||||
prefix,
|
||||
"Cycles",
|
||||
stage.cycles() / static_cast<double>(stats->blocks),
|
||||
percent(stage.cycles(), all_stages_without_allocation.cycles()),
|
||||
stage.cycles() / static_cast<double>(stats->bytes),
|
||||
stage.cycles() / static_cast<double>(stats->structurals),
|
||||
(stage.cycles() / stage.elapsed_sec()) / 1000000000.0
|
||||
);
|
||||
printf("%s%-13s: %8.4f per block (%6.2f%%) - %8.4f per byte - %8.4f per structural - %8.3f per cycle\n",
|
||||
prefix,
|
||||
"Instructions",
|
||||
stage.instructions() / static_cast<double>(stats->blocks),
|
||||
percent(stage.instructions(), all_stages_without_allocation.instructions()),
|
||||
stage.instructions() / static_cast<double>(stats->bytes),
|
||||
stage.instructions() / static_cast<double>(stats->structurals),
|
||||
stage.instructions() / static_cast<double>(stage.cycles())
|
||||
);
|
||||
#if !SIMDJSON_SIMPLE_PERFORMANCE_COUNTERS
|
||||
// NOTE: removed cycles/miss because it is a somewhat misleading stat
|
||||
printf("%s%-13s: %7.0f branch misses (%6.2f%%) - %.0f cache misses (%6.2f%%) - %.2f cache references\n",
|
||||
prefix,
|
||||
"Misses",
|
||||
stage.branch_misses(),
|
||||
percent(stage.branch_misses(), all_stages_without_allocation.branch_misses()),
|
||||
stage.cache_misses(),
|
||||
percent(stage.cache_misses(), all_stages_without_allocation.cache_misses()),
|
||||
stage.cache_references()
|
||||
);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static double percent(size_t a, size_t b) {
|
||||
return 100.0 * static_cast<double>(a) / static_cast<double>(b);
|
||||
}
|
||||
static double percent(double a, double b) {
|
||||
return 100.0 * a / b;
|
||||
}
|
||||
|
||||
void print(bool tabbed_output, bool stage1_only) const {
|
||||
if (tabbed_output) {
|
||||
char* filename_copy = reinterpret_cast<char*>(malloc(strlen(filename)+1));
|
||||
SIMDJSON_PUSH_DISABLE_WARNINGS
|
||||
SIMDJSON_DISABLE_DEPRECATED_WARNING // Validated CRT_SECURE safe here
|
||||
strcpy(filename_copy, filename);
|
||||
SIMDJSON_POP_DISABLE_WARNINGS
|
||||
|
||||
#if defined(__linux__)
|
||||
char* base = ::basename(filename_copy);
|
||||
#else
|
||||
char* base = filename_copy;
|
||||
#endif
|
||||
if (strlen(base) >= 5 && !strcmp(base+strlen(base)-5, ".json")) {
|
||||
base[strlen(base)-5] = '\0';
|
||||
}
|
||||
|
||||
double gb = static_cast<double>(json.size()) / 1000000000.0;
|
||||
if (collector.has_events()) {
|
||||
printf("\"%s\"\t%f\t%f\t%f\t%f\t%f\t%f\t%f\n",
|
||||
base,
|
||||
allocate_stage.best.cycles() / static_cast<double>(json.size()),
|
||||
stage1.best.cycles() / static_cast<double>(json.size()),
|
||||
stage2.best.cycles() / static_cast<double>(json.size()),
|
||||
all_stages_without_allocation.best.cycles() / static_cast<double>(json.size()),
|
||||
gb / all_stages_without_allocation.best.elapsed_sec(),
|
||||
gb / stage1.best.elapsed_sec(),
|
||||
gb / stage2.best.elapsed_sec());
|
||||
} else {
|
||||
printf("\"%s\"\t\t\t\t\t%f\t%f\t%f\n",
|
||||
base,
|
||||
gb / all_stages_without_allocation.best.elapsed_sec(),
|
||||
gb / stage1.best.elapsed_sec(),
|
||||
gb / stage2.best.elapsed_sec());
|
||||
}
|
||||
free(filename_copy);
|
||||
} else {
|
||||
printf("\n");
|
||||
printf("%s\n", filename);
|
||||
printf("%s\n", string(strlen(filename), '=').c_str());
|
||||
printf("%9zu blocks - %10zu bytes - %5zu structurals (%5.1f %%)\n", stats->bytes / BYTES_PER_BLOCK, stats->bytes, stats->structurals, percent(stats->structurals, stats->bytes));
|
||||
if (stats) {
|
||||
printf("special blocks with: utf8 %9zu (%5.1f %%) - escape %9zu (%5.1f %%) - 0 structurals %9zu (%5.1f %%) - 1+ structurals %9zu (%5.1f %%) - 8+ structurals %9zu (%5.1f %%) - 16+ structurals %9zu (%5.1f %%)\n",
|
||||
stats->blocks_with_utf8, percent(stats->blocks_with_utf8, stats->blocks),
|
||||
stats->blocks_with_escapes, percent(stats->blocks_with_escapes, stats->blocks),
|
||||
stats->blocks_with_0_structurals, percent(stats->blocks_with_0_structurals, stats->blocks),
|
||||
stats->blocks_with_1_structural, percent(stats->blocks_with_1_structural, stats->blocks),
|
||||
stats->blocks_with_8_structurals, percent(stats->blocks_with_8_structurals, stats->blocks),
|
||||
stats->blocks_with_16_structurals, percent(stats->blocks_with_16_structurals, stats->blocks));
|
||||
printf("special block flips: utf8 %9zu (%5.1f %%) - escape %9zu (%5.1f %%) - 0 structurals %9zu (%5.1f %%) - 1+ structurals %9zu (%5.1f %%) - 8+ structurals %9zu (%5.1f %%) - 16+ structurals %9zu (%5.1f %%)\n",
|
||||
stats->blocks_with_utf8_flipped, percent(stats->blocks_with_utf8_flipped, stats->blocks),
|
||||
stats->blocks_with_escapes_flipped, percent(stats->blocks_with_escapes_flipped, stats->blocks),
|
||||
stats->blocks_with_0_structurals_flipped, percent(stats->blocks_with_0_structurals_flipped, stats->blocks),
|
||||
stats->blocks_with_1_structural_flipped, percent(stats->blocks_with_1_structural_flipped, stats->blocks),
|
||||
stats->blocks_with_8_structurals_flipped, percent(stats->blocks_with_8_structurals_flipped, stats->blocks),
|
||||
stats->blocks_with_16_structurals_flipped, percent(stats->blocks_with_16_structurals_flipped, stats->blocks));
|
||||
}
|
||||
printf("\n");
|
||||
if(!stage1_only) {
|
||||
printf("All Stages (excluding allocation)\n");
|
||||
print_aggregate("| " , all_stages_without_allocation.best);
|
||||
// frequently, allocation is a tiny fraction of the running time so we omit it
|
||||
if(allocate_stage.best.elapsed_sec() > 0.01 * all_stages_without_allocation.best.elapsed_sec()) {
|
||||
printf("|- Allocation\n");
|
||||
print_aggregate("| ", allocate_stage.best);
|
||||
}
|
||||
}
|
||||
printf("|- Stage 1\n");
|
||||
print_aggregate("| ", stage1.best);
|
||||
if(!stage1_only) {
|
||||
printf("|- Stage 2\n");
|
||||
print_aggregate("| ", stage2.best);
|
||||
}
|
||||
if (collector.has_events()) {
|
||||
double freq1 = (stage1.best.cycles() / stage1.best.elapsed_sec()) / 1000000000.0;
|
||||
double freq2 = (stage2.best.cycles() / stage2.best.elapsed_sec()) / 1000000000.0;
|
||||
double freqall = (all_stages_without_allocation.best.cycles() / all_stages_without_allocation.best.elapsed_sec()) / 1000000000.0;
|
||||
double freqmin = min(freq1, freq2);
|
||||
double freqmax = max(freq1, freq2);
|
||||
if((freqall < 0.95 * freqmin) || (freqall > 1.05 * freqmax)) {
|
||||
printf("\nWarning: The processor frequency fluctuates in an expected way!!!\n"
|
||||
"Range for stage 1 and stage 2 : [%.3f GHz, %.3f GHz], overall: %.3f GHz.\n",
|
||||
freqmin, freqmax, freqall);
|
||||
}
|
||||
}
|
||||
printf("\n%.1f documents parsed per second (best)\n", 1.0/static_cast<double>(all_stages_without_allocation.best.elapsed_sec()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef SIMDJSON_COMPETITION_BOOSTJSON
|
||||
|
||||
#include "distinct_user_id.h"
|
||||
|
||||
namespace distinct_user_id {
|
||||
|
||||
struct boostjson {
|
||||
bool run(simdjson::padded_string &json, std::vector<uint64_t> &result) {
|
||||
|
||||
auto root = boost::json::parse(json);
|
||||
for (const auto &tweet : root.at("statuses").as_array()) {
|
||||
result.push_back(tweet.at("user").at("id").to_number<uint64_t>());
|
||||
|
||||
if (tweet.as_object().if_contains("retweeted_status")) {
|
||||
result.push_back(tweet.at("retweeted_status").at("user").at("id").to_number<uint64_t>());
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
BENCHMARK_TEMPLATE(distinct_user_id, boostjson)->UseManualTime();
|
||||
|
||||
} // namespace distinct_user_id
|
||||
|
||||
#endif // SIMDJSON_COMPETITION_BOOSTJSON
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "json_benchmark/file_runner.h"
|
||||
#include <vector>
|
||||
|
||||
namespace distinct_user_id {
|
||||
|
||||
using namespace json_benchmark;
|
||||
|
||||
template<typename I>
|
||||
struct runner : public file_runner<I> {
|
||||
std::vector<uint64_t> result{};
|
||||
|
||||
bool setup(benchmark::State &state) {
|
||||
return this->load_json(state, TWITTER_JSON);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
bool after_run(benchmark::State &state) {
|
||||
if (!file_runner<I>::after_run(state)) { return false; }
|
||||
std::sort(result.begin(), result.end());
|
||||
auto last = std::unique(result.begin(), result.end());
|
||||
result.erase(last, result.end());
|
||||
return true;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
};
|
||||
|
||||
struct simdjson_dom;
|
||||
|
||||
template<typename I> simdjson_inline static void distinct_user_id(benchmark::State &state) {
|
||||
run_json_benchmark<runner<I>, runner<simdjson_dom>>(state);
|
||||
}
|
||||
|
||||
} // namespace distinct_user_id
|
||||
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef SIMDJSON_COMPETITION_NLOHMANN_JSON
|
||||
|
||||
#include "distinct_user_id.h"
|
||||
|
||||
namespace distinct_user_id {
|
||||
|
||||
struct nlohmann_json {
|
||||
bool run(simdjson::padded_string &json, std::vector<uint64_t> &result) {
|
||||
auto root = nlohmann::json::parse(json.data(), json.data() + json.size());
|
||||
for (auto tweet : root["statuses"]) {
|
||||
result.push_back(tweet["user"]["id"]);
|
||||
if (tweet.contains("retweeted_status")) {
|
||||
result.push_back(tweet["retweeted_status"]["user"]["id"]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
BENCHMARK_TEMPLATE(distinct_user_id, nlohmann_json)->UseManualTime();
|
||||
|
||||
} // namespace distinct_user_id
|
||||
|
||||
#endif // SIMDJSON_COMPETITION_NLOHMANN_JSON
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user