mirror of
https://github.com/opencv/opencv.git
synced 2026-07-24 12:53:04 +04:00
Compare commits
3832 Commits
4.5.5
...
5.0.0-alpha
| Author | SHA1 | Date | |
|---|---|---|---|
| 616fd50947 | |||
| 816851c999 | |||
| 0c774c94f9 | |||
| ddfb9d1dc8 | |||
| 446787ab48 | |||
| 91a0bdb6ea | |||
| c69b5524ff | |||
| 95659ebe97 | |||
| 644cf0de08 | |||
| cb1e6250e6 | |||
| 69d0aacc2a | |||
| 2b28a6e205 | |||
| 3b1ec72cf5 | |||
| 22d4735de1 | |||
| 0c4fd4f7ee | |||
| 650f2c3da3 | |||
| a492068a3a | |||
| efbe580ff3 | |||
| 5b03d82814 | |||
| b476ed6d06 | |||
| b7dacbd5e3 | |||
| 18e8d69097 | |||
| 0213483c18 | |||
| b31bc1a295 | |||
| d0ccd85a02 | |||
| a5f8711ce1 | |||
| a27d749471 | |||
| fb0a40ded4 | |||
| 85a844e9c2 | |||
| bf914a7681 | |||
| e1ba8f2659 | |||
| 2ba82c2c88 | |||
| ff142b8ef9 | |||
| 3672a14b42 | |||
| b9914065e8 | |||
| c8c64f69dd | |||
| 939aac47a2 | |||
| d6b674a3de | |||
| 68941ef8e7 | |||
| 55b4c2ac59 | |||
| 37e13f9dcf | |||
| fb422a62d2 | |||
| 57b31e2d4b | |||
| 82c45dde5b | |||
| 0b01712dd3 | |||
| 997a2bf0bb | |||
| 65d4112fa5 | |||
| 905cc45f85 | |||
| f7483cd978 | |||
| 7095cb6904 | |||
| 5080be6669 | |||
| 1358af180c | |||
| 6e229bda2b | |||
| 83a1621527 | |||
| ae0a06c206 | |||
| 7808d50412 | |||
| 5a3e18973b | |||
| 7be5181bff | |||
| f85a51ed18 | |||
| d39810d5c5 | |||
| 5fe6b9c8f8 | |||
| ce7c0f0e65 | |||
| c3ca3f4f00 | |||
| d0820dac38 | |||
| 64d3111377 | |||
| 2ed6d0f590 | |||
| 64273c8a5b | |||
| ea0f9336e2 | |||
| 8b84fcb376 | |||
| db1aa3c8a9 | |||
| 1d420dc9c0 | |||
| b89c041227 | |||
| 1b0d58a554 | |||
| 474028ea87 | |||
| 0d7d045a3b | |||
| d0c8b36de8 | |||
| 206a30bce9 | |||
| 21cb138be8 | |||
| d46280507e | |||
| 8c6339c04d | |||
| 4866811933 | |||
| 3dace76c3f | |||
| b7e609d5e8 | |||
| e5a8e2ac79 | |||
| cd5dbf9389 | |||
| 77b45145d1 | |||
| 1ff16cb551 | |||
| 0310b081f9 | |||
| e1d66643b3 | |||
| 11a4a06fa4 | |||
| 1a775198ce | |||
| dc1f7ea5cb | |||
| 3cc130db5d | |||
| 67f07b16cb | |||
| 8fe70a1877 | |||
| 5f95827a5f | |||
| ff639d11d4 | |||
| 641f43dd48 | |||
| c230841105 | |||
| 07d519fe88 | |||
| 614e250fd3 | |||
| 22f7002ed2 | |||
| c7a21dc5bf | |||
| e83a7fef9f | |||
| c445a000c9 | |||
| a4ab68f9f4 | |||
| 2d9c0c8592 | |||
| 37c2af63f0 | |||
| 6f8c3b13d8 | |||
| 3fddea2ade | |||
| 3d89824423 | |||
| 6873bdee70 | |||
| 979428d590 | |||
| 1ae304bb83 | |||
| a7bb17b092 | |||
| 9d64e2959f | |||
| 3fac9a9d69 | |||
| 03983549fc | |||
| 286f7524bb | |||
| ef0d83643d | |||
| 5817b562b3 | |||
| 25b67bc99e | |||
| c287423b33 | |||
| 55105719dd | |||
| c3747a6847 | |||
| 9b635da563 | |||
| 853fa9dd40 | |||
| 7a5f12c630 | |||
| df06d2eac2 | |||
| ee95bfe244 | |||
| 65a606966b | |||
| a59a66a2c7 | |||
| ddc03c0769 | |||
| a95658f106 | |||
| cf87380fad | |||
| 725ce48837 | |||
| 04818d6dd5 | |||
| 265a2c39b2 | |||
| 2756c20e3e | |||
| 6a8300c1a0 | |||
| e44e3ab0a7 | |||
| 299aa14c4b | |||
| 7654d06b83 | |||
| 41489f983d | |||
| 0e80a97f87 | |||
| 8791cd147c | |||
| 66a29b422c | |||
| bf7ab8eebd | |||
| a2fa1d49a4 | |||
| 7b0a082dd4 | |||
| f217656916 | |||
| 331d327760 | |||
| 3b01a4d4e9 | |||
| 8a5ec4bf7b | |||
| 29e712ed93 | |||
| dd08328228 | |||
| 24a497acd8 | |||
| 52100328d8 | |||
| 05e7988e9c | |||
| d223e796f5 | |||
| 515b4a2689 | |||
| 3a4c88c33e | |||
| 8e55659afe | |||
| e4bcd46f64 | |||
| 35571be570 | |||
| 331412dfad | |||
| d193554a5f | |||
| 898a2a3811 | |||
| 9fc7ca8ed1 | |||
| 983086411f | |||
| 9f0c3f5b2b | |||
| 57ccbee25d | |||
| 4398e0b62b | |||
| a40ceff215 | |||
| 6648482b69 | |||
| 94d5ad09ff | |||
| e026a5ad8a | |||
| c79b72a838 | |||
| 6e3c5db1c6 | |||
| 2f35847960 | |||
| 35dbf32227 | |||
| 888469a842 | |||
| 9773694527 | |||
| 1696819abb | |||
| 3919f33e21 | |||
| 489df18a13 | |||
| d20c456ab7 | |||
| 8ba76e65e9 | |||
| 3cd57ea09e | |||
| e2f583a9ee | |||
| 12738deaef | |||
| 8e5dbc03fe | |||
| 3c627b0a97 | |||
| 58fac15a98 | |||
| 1909ac8650 | |||
| 45b9398d68 | |||
| 08c6d00d96 | |||
| 5aa45e9053 | |||
| 08f7f13dfa | |||
| 3edcf410b6 | |||
| 70380a7988 | |||
| 0f234209da | |||
| ef98c25d60 | |||
| 4cbb96b396 | |||
| 50f6d54f87 | |||
| 16ea1382f7 | |||
| 687e37e6a8 | |||
| 2a681bbb6b | |||
| 63b5dee274 | |||
| 8ba7389b21 | |||
| 885bbc643f | |||
| dceeb47cd3 | |||
| d0e410da93 | |||
| 69803e7b99 | |||
| e1b06371ad | |||
| e72efd0d32 | |||
| cefde84a76 | |||
| 9dbfba0fd8 | |||
| 7d9014e09e | |||
| 40428d919d | |||
| 28efc21530 | |||
| 26985f1043 | |||
| ebc39adbe0 | |||
| 68a81888ec | |||
| cda9f4197e | |||
| a97c99e49f | |||
| 73d68f3f49 | |||
| fa6d6520c7 | |||
| 254db60667 | |||
| 56673d969a | |||
| ff9820ea5c | |||
| 79e0763d17 | |||
| 91775af2dd | |||
| b03dd764a1 | |||
| 110b701bba | |||
| e375d5786b | |||
| 3901426d85 | |||
| ae1fb8c033 | |||
| 97681bdfce | |||
| 783fe72756 | |||
| ebf11d36f4 | |||
| 73b3b24c56 | |||
| 1aa325a460 | |||
| ae52db549d | |||
| 916fb7df16 | |||
| 292ee28913 | |||
| a669c5cb03 | |||
| b8eed54ced | |||
| 886934dba8 | |||
| 93a882d2e2 | |||
| 807170d5c9 | |||
| 2688248df7 | |||
| 72023951ea | |||
| 6f18a10012 | |||
| 5901170c78 | |||
| 305b57e622 | |||
| 3bcab8db0a | |||
| 658336b366 | |||
| 086b999013 | |||
| 6c743f8e4b | |||
| 6ed4e7acae | |||
| 8a36f119ce | |||
| 679931dcde | |||
| 6dcf6d9dd1 | |||
| 48a48fe11c | |||
| e66d38e15f | |||
| 51ace51ea5 | |||
| 0fa4b0ead2 | |||
| bd26d02908 | |||
| 4a81b4e51f | |||
| f9a297e52c | |||
| 8256ef3321 | |||
| 5c870bd5a2 | |||
| 938dabef0e | |||
| 4d5beef7db | |||
| fe1a4b61bc | |||
| 9daad187af | |||
| 317012e85e | |||
| cb3af0a08f | |||
| 450e741f8d | |||
| a6ec12f58b | |||
| 2529af9719 | |||
| 50eebbd21f | |||
| b2e118ea94 | |||
| 6ef357fd54 | |||
| e823493af1 | |||
| f503890c2b | |||
| e043d5d9d6 | |||
| 881440c6c6 | |||
| ee685017c3 | |||
| aa11a898a4 | |||
| e1fec15627 | |||
| 6308739638 | |||
| bf998429f6 | |||
| 9663245459 | |||
| f143f45fa2 | |||
| c8080aa415 | |||
| 4c81e174bf | |||
| 85923c8f30 | |||
| 46b800f506 | |||
| f8a75bccab | |||
| 7de3a8e960 | |||
| fcfdd311ab | |||
| 976fb3e8d6 | |||
| b574db2cff | |||
| 99bc88c259 | |||
| 073488896e | |||
| 7bdc618697 | |||
| ce5823c5eb | |||
| 8725a7e21c | |||
| 209802c9f6 | |||
| 8263c804de | |||
| 79faf857d9 | |||
| e5790c0241 | |||
| a7d942b681 | |||
| 307dc2a298 | |||
| a18d793dbd | |||
| f8fb3a7f55 | |||
| f73560293f | |||
| 6cc166985d | |||
| 7590813b69 | |||
| babc669dba | |||
| 2a8d4c6025 | |||
| dbd53fe89a | |||
| ea8f091a08 | |||
| b743edd466 | |||
| 06db881ca9 | |||
| c0a0852f05 | |||
| 9ef574a213 | |||
| 76f495dce9 | |||
| 32d3d6fa97 | |||
| 8561f45c2a | |||
| 82da334ff3 | |||
| 88f99edc65 | |||
| e9c3e1acb5 | |||
| 3995ad8458 | |||
| 8b3b19d185 | |||
| e2ba36bf9c | |||
| a735660cc3 | |||
| 0f8bbf4677 | |||
| 960aaa32db | |||
| b72d7e3b05 | |||
| 8def9f75c8 | |||
| 81ab6a3fbd | |||
| 165bf25c46 | |||
| 4d66541999 | |||
| 5b4d1ce6a0 | |||
| a905526f71 | |||
| 2829a6de85 | |||
| e087cc8fd1 | |||
| f156236d17 | |||
| 61f6b6d773 | |||
| bacefd3b8d | |||
| 100db1bc0b | |||
| a17fafc3af | |||
| 766bad0035 | |||
| 18117cf355 | |||
| ea8c9dc2de | |||
| 3803eeecba | |||
| 2d5b0caa77 | |||
| 5638c38d53 | |||
| 9c19a0cdba | |||
| 412c97b411 | |||
| 76bf17a248 | |||
| f4c2e4f872 | |||
| 41097a48ad | |||
| e5b871fa7e | |||
| a3bdbf5553 | |||
| 916724e2a0 | |||
| 6c6d5cd7b2 | |||
| 697512bb9f | |||
| 55d1bf3da9 | |||
| 347d673a87 | |||
| 050085c996 | |||
| 7cf075c392 | |||
| 9dcac41c66 | |||
| 7e3b69e02b | |||
| 7d31463fea | |||
| 8715229e49 | |||
| 79a731aff0 | |||
| 7fe36a3cb2 | |||
| eee383fde8 | |||
| d69db7aac4 | |||
| 45fd4d8217 | |||
| a087a9c47a | |||
| ec2e2da1fe | |||
| a69cd7d6ba | |||
| 7d3d2101f9 | |||
| 24fde08712 | |||
| ae4a11b0c0 | |||
| ebe04a5723 | |||
| de89aa379d | |||
| cb72a2131f | |||
| aa133cd899 | |||
| b5b9b3a279 | |||
| 61d719d2aa | |||
| 78630ddc67 | |||
| 0838920371 | |||
| 95070e61ce | |||
| a8a088d28c | |||
| c340b3b466 | |||
| 93e0c7e53f | |||
| 315f85d4f4 | |||
| 2fcea41f86 | |||
| 37c1acbf19 | |||
| da3debda6d | |||
| 6cd730a02c | |||
| f3cc5a9e1e | |||
| c9df679943 | |||
| 67d0338c9c | |||
| 3f92884520 | |||
| 582a7f32d5 | |||
| d8bcc2c85d | |||
| 7e8f2a1bc4 | |||
| 1acf722e24 | |||
| 9dee2c6e67 | |||
| 49459d46e2 | |||
| 35eba9ca90 | |||
| 333054e05e | |||
| ea2a3cb264 | |||
| ecbff5a20c | |||
| 75fca7d9d0 | |||
| 6ed603e917 | |||
| ab99f87b6a | |||
| 9de2ebbec1 | |||
| 992dc932ee | |||
| a15cd4b63d | |||
| 796974cccc | |||
| 95041f5e65 | |||
| 340a390ea2 | |||
| 35463e079c | |||
| b79b366859 | |||
| b9b2d551ac | |||
| f67d4852bf | |||
| 2db7f8e827 | |||
| 93745245a3 | |||
| 3dcc8c38b4 | |||
| f24e80297a | |||
| ca2d17758f | |||
| 2a333a6c86 | |||
| ae4c67e3a0 | |||
| 89fff355c8 | |||
| 908c59ae25 | |||
| 938b9e4bb7 | |||
| 7d12392a7d | |||
| 99672a2691 | |||
| 1ca526dcdb | |||
| 65853aa783 | |||
| 672a662dff | |||
| be3c519956 | |||
| 5b3f33dd11 | |||
| 0b3dbdd4b3 | |||
| eab21b6106 | |||
| c5de090964 | |||
| 459a9c60ed | |||
| 160879c100 | |||
| 14f9d71dd0 | |||
| c16927605d | |||
| e1b57057bf | |||
| 93b607dc72 | |||
| 38cfea981f | |||
| 44c814e334 | |||
| 012d853474 | |||
| c9b57819b1 | |||
| 89dd4ee137 | |||
| db3654ef51 | |||
| 23b244d3a3 | |||
| 26714f9a34 | |||
| 8ba70194b1 | |||
| b8f5c08306 | |||
| b5ea32158a | |||
| 4dd54bbec9 | |||
| a5dacb5bed | |||
| d892c7b142 | |||
| 325da2b2f4 | |||
| 1125755345 | |||
| 32d81a8bae | |||
| 88f05e49be | |||
| 0020831414 | |||
| 0c2da1dc9b | |||
| bcce38c05a | |||
| 060c24bec9 | |||
| d05047ae41 | |||
| fc9208cff5 | |||
| d1505693dd | |||
| 53a5b85d9f | |||
| 7b176d898b | |||
| 9ebf387850 | |||
| da078c4b75 | |||
| 4842043c6a | |||
| c53c2f6844 | |||
| e90935e81c | |||
| a6b8ea892b | |||
| 04f9e3cd4f | |||
| 81f33103fd | |||
| 420663498f | |||
| e906f0f3b3 | |||
| 15783d6598 | |||
| 3ff97c5580 | |||
| 78195bc3df | |||
| 9aa5f3f1db | |||
| c6ace77e21 | |||
| 50f1ea5c9c | |||
| dc2ce2b856 | |||
| a9d8d45df4 | |||
| 63b9cbc2d0 | |||
| 7dcc305301 | |||
| 35ca2f78d6 | |||
| 06b9db6a71 | |||
| 11fde3bb89 | |||
| b964943517 | |||
| 8d935e2184 | |||
| e962395565 | |||
| e3858cc5a3 | |||
| 31b308f882 | |||
| a54de7d55e | |||
| 1d9ca7160b | |||
| 0b5b40179c | |||
| d7a237aefc | |||
| d30b9450c1 | |||
| cdd8395f68 | |||
| 88b28ee2a0 | |||
| dfbd18e9aa | |||
| 94b7a2d320 | |||
| efbc9f0b66 | |||
| 9f5139b575 | |||
| 6a11847d57 | |||
| 20e72b0b30 | |||
| 5510718381 | |||
| e644ab0b40 | |||
| e28c6eb3b6 | |||
| bd1f9cd1ed | |||
| 48b457f8c7 | |||
| fc85d2a551 | |||
| 99c0a96a2f | |||
| b083d36d68 | |||
| 96a8e6d76c | |||
| 53f51275e4 | |||
| 25fb55601b | |||
| 55a2a945b6 | |||
| aac8bc877a | |||
| bef6c110a4 | |||
| 934e6899f8 | |||
| a7fd9446cf | |||
| 9772ec861b | |||
| a8d1373919 | |||
| fef2c95472 | |||
| b39ca66a5d | |||
| 190eddf8c3 | |||
| 07ec6cb2c2 | |||
| 939cb58cd6 | |||
| 2799c74d50 | |||
| 6e1864e3fc | |||
| 883faf8871 | |||
| 75339a5528 | |||
| 35d9e8ef5c | |||
| fd5efabdd9 | |||
| 3d74d646d8 | |||
| 3abd9f2a28 | |||
| 39a7b3d186 | |||
| 930af15f47 | |||
| 34ed88d7fb | |||
| 25609ef5fd | |||
| 996ed0a2eb | |||
| ce1d840adf | |||
| bbf65a166e | |||
| 1e5407a9ba | |||
| b7c9221b80 | |||
| be00247ca0 | |||
| 855f6cfdd4 | |||
| 310169490a | |||
| aab7239f38 | |||
| 4500eb937f | |||
| 12b8ed1443 | |||
| 786726719f | |||
| 284a79446a | |||
| ee2b0f9d63 | |||
| 445022682e | |||
| fd7cb1be85 | |||
| 719b49ffa9 | |||
| 204d62ae12 | |||
| 26ea34c4cb | |||
| efa4d9176a | |||
| 2179186a51 | |||
| 76a1d26bcd | |||
| 11c69bb171 | |||
| 8be2056cff | |||
| 2028998e00 | |||
| d8c7debe52 | |||
| 3f13ce797b | |||
| acd16e384f | |||
| 5cfa44d2a2 | |||
| 5dc1b39e4c | |||
| 7ef42d7706 | |||
| 57984e689b | |||
| 0cba7020a1 | |||
| a102b24285 | |||
| e7108f48ab | |||
| d1b643a05a | |||
| 766f3f5fc4 | |||
| 553c111c5a | |||
| e3884a9ea8 | |||
| 0fac5d52bc | |||
| 60819979d4 | |||
| b9d2ecb72f | |||
| 860b688cdd | |||
| 24907f35a3 | |||
| 4bf95ac2df | |||
| 0a12c7d9de | |||
| 7ff531b8ab | |||
| 759fc701ab | |||
| 88c6c7d9f7 | |||
| a03b813167 | |||
| 8e9307074c | |||
| 2629688d11 | |||
| 3ea7ed9ebf | |||
| 6623c62f56 | |||
| e1dba2c6d2 | |||
| a2d2ea6536 | |||
| bdf986ee51 | |||
| cc6f85e1ba | |||
| 3282954c2e | |||
| 3700f9e1e9 | |||
| ef3303716e | |||
| bef5a87680 | |||
| adcb070396 | |||
| cbc08514fd | |||
| cbf3b1187d | |||
| 70df023317 | |||
| 0d1ed49d2a | |||
| a5d9c29b12 | |||
| 5dd7b5f0e5 | |||
| 99f32f17b4 | |||
| b77c74b6fc | |||
| 9c05b27ba0 | |||
| 92b588f30b | |||
| 2bb8b2b173 | |||
| d8f0838fa3 | |||
| 3f26664e8d | |||
| 337c183b9d | |||
| 71d3237a09 | |||
| a7e53aa184 | |||
| 1bd5ca1ebe | |||
| 1db6a8a1f3 | |||
| 98b8825031 | |||
| 29f91a08d5 | |||
| 08107957d8 | |||
| ca035e6dae | |||
| 472eba324a | |||
| dcce2b8b24 | |||
| d7f04a9d33 | |||
| f4ebf7c0a6 | |||
| 9ed1d6730f | |||
| 7e9ef4db86 | |||
| 3e3ee106fb | |||
| 2624929ec6 | |||
| 79af357cf4 | |||
| 8709115d9a | |||
| e7bf07786d | |||
| d9421ac148 | |||
| 1668203a1c | |||
| 05e48605a0 | |||
| b6593517c4 | |||
| c5976f7865 | |||
| f1890e384b | |||
| 8955a27577 | |||
| 1fa96b161f | |||
| d97df262f6 | |||
| 7b31cc7314 | |||
| cc49aee04e | |||
| b267f1791c | |||
| f17b122512 | |||
| 8b2783e9ff | |||
| 7e3f6875c1 | |||
| ba28b7d6df | |||
| f85818ba6f | |||
| 28c3000f62 | |||
| 6bee2facf3 | |||
| f1aef892bf | |||
| f5793d26b7 | |||
| de3eb0ec5f | |||
| 4824354e46 | |||
| 6fb3f63331 | |||
| 16b5096ed0 | |||
| 9f1559595b | |||
| f8ad6eb71b | |||
| 500207785a | |||
| f85014534f | |||
| f2c48e5e97 | |||
| e765c9f9c8 | |||
| 28d029c158 | |||
| 5bc450d211 | |||
| 5696413bbc | |||
| 1f874028fb | |||
| 8393885a39 | |||
| 49f80cb3c4 | |||
| e52540162f | |||
| 6feb765ebb | |||
| f676cb3c62 | |||
| 0b39a51be8 | |||
| c71d495273 | |||
| 40faced6c1 | |||
| 23ba63b0be | |||
| d95ff3ac04 | |||
| 69af621ef6 | |||
| 83e32c4d37 | |||
| e05ad56f6e | |||
| 6350bfbf79 | |||
| 8aa129dce1 | |||
| 5f509e2ec1 | |||
| 5e7887897a | |||
| bc0618b688 | |||
| 0044047782 | |||
| 41f08988b4 | |||
| f2d6527a4b | |||
| 9238eb2ab2 | |||
| d29ad2fb71 | |||
| 5f3a505a2d | |||
| 78ed6de518 | |||
| 7d6b6161cc | |||
| 7713c84465 | |||
| 5009109167 | |||
| 76d9f7aaeb | |||
| 68581e7b4a | |||
| c034c46e69 | |||
| 4d4def2d36 | |||
| 2e07ec1f87 | |||
| 6af0394cd2 | |||
| 47a6ffb73c | |||
| 5bdc41964a | |||
| 5260b48695 | |||
| 48c31bddc4 | |||
| 17e6b3f931 | |||
| 03507e06b4 | |||
| 7fc8a490f8 | |||
| f4e5438401 | |||
| 02ad8c284f | |||
| 58e007e183 | |||
| 021e5184bc | |||
| 1614b8df4e | |||
| 3c7e94b275 | |||
| 023d805492 | |||
| 8dc9ff5624 | |||
| 78c9793d5b | |||
| 1d9a4120fa | |||
| 55eebe81c3 | |||
| 1f1ba7e402 | |||
| 5bd64e09a3 | |||
| b637e3a66e | |||
| 4422bc9a7f | |||
| 039cf6592c | |||
| faa259ab34 | |||
| a9e489f149 | |||
| 392fd4edd1 | |||
| ba65d2eb0d | |||
| 8bc90a4bff | |||
| 7127161426 | |||
| d231b4e362 | |||
| 26a5730f0d | |||
| a4486c0e20 | |||
| 70d333d336 | |||
| c43957cbec | |||
| 76f607a44c | |||
| 4081a309bf | |||
| a8df49f170 | |||
| c4ce94232b | |||
| af4531b378 | |||
| b94cb5bc68 | |||
| d8e18f4576 | |||
| 75f3f0fac8 | |||
| ac9a858377 | |||
| 6e5a53c37a | |||
| d9555dbdd1 | |||
| c539cfd31a | |||
| 9fe5615f2f | |||
| 6bf758ecc4 | |||
| 02c3132f02 | |||
| 7ea4364c63 | |||
| bc95f27e56 | |||
| 5aaa570fef | |||
| ed47cce1c5 | |||
| c999cb3c5e | |||
| ce642e994d | |||
| 1c9efbd4be | |||
| f3f29fa62c | |||
| b5cf4f1483 | |||
| 1f6f092a9d | |||
| 22de887c00 | |||
| e3fc850ec2 | |||
| cbf71c380f | |||
| 716826cccd | |||
| 2a2ff55257 | |||
| b1e01970ef | |||
| 6682270b4c | |||
| 12e2cc9502 | |||
| 94f4678d3a | |||
| 357b9abaef | |||
| 8af76698ed | |||
| 72ad06bcf3 | |||
| 8f7e55a60b | |||
| 2cd330486e | |||
| d0978cea39 | |||
| 7b58ffebd0 | |||
| 2225b257cf | |||
| 7bad12c33b | |||
| ebea65777f | |||
| 7e56908306 | |||
| bbe86e6dea | |||
| f08933b051 | |||
| 5b0843728e | |||
| 4f81d78c39 | |||
| 616a913fa2 | |||
| b5ffdd4673 | |||
| ac37f337d0 | |||
| 50b6edc9ba | |||
| ae85e516c0 | |||
| 43d243dd0e | |||
| 096ccd410b | |||
| 3f8b56ec49 | |||
| 65d86b2628 | |||
| fb2af90daa | |||
| 26798e1f7c | |||
| fc5eb101bf | |||
| 882f46e1d3 | |||
| 5da17a4b03 | |||
| a604304e87 | |||
| c28342f7f2 | |||
| 4ef5986d4d | |||
| fb194a4582 | |||
| 18a78988a1 | |||
| 448375d1e7 | |||
| c577b24406 | |||
| b009a63e6b | |||
| 9d14ce3739 | |||
| a1e4444fb5 | |||
| d77dbbe7a0 | |||
| 3d88db02d4 | |||
| b8ec9492b4 | |||
| c317a3ee89 | |||
| c3fdb9769d | |||
| 85673afb47 | |||
| 3def7d09bc | |||
| 05a54b1405 | |||
| f9e9567870 | |||
| 153f147cde | |||
| 577ad0a5ad | |||
| 3cc83c7610 | |||
| 5c1fbc2d0f | |||
| 6b438835eb | |||
| 37ca0308a7 | |||
| a4b4808d9d | |||
| 7c966efcad | |||
| f643964c68 | |||
| f9dd20eb07 | |||
| db3e5620cd | |||
| 68967cf6d7 | |||
| 66fb5021e9 | |||
| e2621f128e | |||
| 6699ca1a40 | |||
| 3e561d8353 | |||
| 4fb0541916 | |||
| c622ffd95f | |||
| 02a74f2e88 | |||
| 869016d8b1 | |||
| 0eef34a670 | |||
| dfb6069ad9 | |||
| 66ab0bee7a | |||
| 0bd066ee58 | |||
| 002d0542dd | |||
| 2eb9e915d9 | |||
| 079e615fbd | |||
| caa09aca36 | |||
| ecbfc1bfd8 | |||
| 06c1c7b5cb | |||
| c081efe3c6 | |||
| 197626a5bf | |||
| 2c5b296ab2 | |||
| 17c7f76da3 | |||
| a10e33979a | |||
| d22d0bd49c | |||
| 9813ea2b7a | |||
| bbd9059334 | |||
| b14ea19466 | |||
| cf3a130be6 | |||
| 282c762ead | |||
| 5bad694b7f | |||
| d0ec39206a | |||
| cf3e90ab91 | |||
| 369760116e | |||
| 0e1d326ed0 | |||
| 9ced486497 | |||
| b3e863fee4 | |||
| 148b2ec3e0 | |||
| cb339ac6d1 | |||
| f37924796f | |||
| 953581a92a | |||
| e4677fbf64 | |||
| 4221ae1d64 | |||
| b0d905864d | |||
| f454303f6a | |||
| a25132986a | |||
| e8a52c7e94 | |||
| e5d530abae | |||
| ab7ab7b6be | |||
| e55cf444cc | |||
| 8ed52cb564 | |||
| e63690a2d9 | |||
| 30889f4a90 | |||
| e80500828c | |||
| f2c3d4dfe3 | |||
| 3b02f3b7ae | |||
| a31f4f4040 | |||
| bfd1504de3 | |||
| 5528e70f3c | |||
| 6b45cccc37 | |||
| a0b28f8b06 | |||
| 5be158a2b6 | |||
| 5121a1bf0d | |||
| e17b8ae8a1 | |||
| 719830959c | |||
| 22b1b1edac | |||
| e1ed422bdb | |||
| e0b7f04fd2 | |||
| 244c771fb6 | |||
| 2e784bc7e6 | |||
| 5f98674fe3 | |||
| 89b91fcb50 | |||
| ba62811cc8 | |||
| 5144766380 | |||
| 87e0246bb0 | |||
| 5196b575fe | |||
| 2b1c8aa4db | |||
| 753e2c1dfa | |||
| e665d2d636 | |||
| 82038be4cd | |||
| 65074651a4 | |||
| bf7208e1ed | |||
| bd819f97f1 | |||
| 56d586aa3e | |||
| b64ce1e7f1 | |||
| 357203facd | |||
| df627e1281 | |||
| 55d7e3f8cc | |||
| d81cd13bb3 | |||
| 2d864c3af9 | |||
| 45587f23db | |||
| c1e2f16f91 | |||
| 13c95efa74 | |||
| 5e09fca0f8 | |||
| cb6d295f15 | |||
| 99cacaaad6 | |||
| eddace4d98 | |||
| fdc7cb6dc1 | |||
| 2eedec7479 | |||
| 93800a85b2 | |||
| eba158fb0c | |||
| 8c540a56af | |||
| 9f123f8d74 | |||
| 95ffabffdd | |||
| 9c8606e0c0 | |||
| 912cf2a028 | |||
| b758897c29 | |||
| 9716bf95ae | |||
| 9fc4b61074 | |||
| cfa42e4338 | |||
| a7d6f105e7 | |||
| 2b9d1a2ff8 | |||
| 01dc010436 | |||
| 7945f2cf40 | |||
| afb91b552e | |||
| 7b9de94003 | |||
| f87e1efd2a | |||
| 7f1140b48b | |||
| 1894426116 | |||
| fd576d9e8e | |||
| a132fd401e | |||
| ff9aeaceb0 | |||
| 43666e1308 | |||
| e3ff6ce0cc | |||
| 5874bce144 | |||
| d664d8d450 | |||
| f36dbef74e | |||
| 4dc461717f | |||
| 1a537ab98f | |||
| 55426ee195 | |||
| 5319772a56 | |||
| accf200408 | |||
| 6e9dcb87c1 | |||
| f0323fdd1e | |||
| a33de44b0b | |||
| 8f4dbdad0e | |||
| eaa88e7bc7 | |||
| fc34554475 | |||
| aa5f7727d8 | |||
| 84a1248b0a | |||
| 4c86b287fd | |||
| 025e7602b9 | |||
| bf2626e4db | |||
| 0b6c9a2123 | |||
| aae77b65a5 | |||
| bbfded21ac | |||
| f8319de976 | |||
| 52f3f5a3f6 | |||
| d188319b82 | |||
| 8e342f8857 | |||
| aa9e80b07b | |||
| f2cf3c8890 | |||
| 3afe8ddaf8 | |||
| aa5ea340f7 | |||
| 8d5dd2e5c2 | |||
| 213e1a4d9d | |||
| 3aefd4862c | |||
| 11eac62ac3 | |||
| 0c6fc763f4 | |||
| 2fd011b6ff | |||
| 6da2ddcf0e | |||
| 0d413068df | |||
| 625eebad54 | |||
| 60ca3d259e | |||
| 372b3fefea | |||
| 6fc926ea4d | |||
| d2d6869a26 | |||
| 85cc02f4de | |||
| 01a4abb2c2 | |||
| 8550c415ef | |||
| 7fe1664bbf | |||
| 50b36ef823 | |||
| 6a370ba9e7 | |||
| ed93384817 | |||
| 1eb061f89d | |||
| ad61e7e21d | |||
| f174363f60 | |||
| 0e524ee95a | |||
| 66ff71085e | |||
| de29223217 | |||
| 0f468a7f35 | |||
| 9f2494da2d | |||
| 7b77ebc8c3 | |||
| 98aed21dd4 | |||
| f2c38eb62f | |||
| b34ec57682 | |||
| bf06e3d09f | |||
| c6776ec136 | |||
| 0f5792a7a1 | |||
| bc82959184 | |||
| 216c6c3da1 | |||
| 8cbdd0c833 | |||
| daa8f7dfc6 | |||
| ef611df09b | |||
| 2d0f928934 | |||
| 5fe3933346 | |||
| c346ee1c29 | |||
| f48c06c0d9 | |||
| 500c55a808 | |||
| 52e280e94b | |||
| deab144e22 | |||
| 1d1faaabef | |||
| e8582f2cf8 | |||
| 396a75f2ea | |||
| 81956ad83e | |||
| 0e47b05106 | |||
| fc98b31c3e | |||
| 010772b492 | |||
| 92b940792a | |||
| a22130fbfa | |||
| 5e5a035c5b | |||
| 5aa5c39210 | |||
| e02d256ff3 | |||
| 161c402f02 | |||
| 40dfe8e8fe | |||
| 8f83540018 | |||
| f9c3c3d666 | |||
| 6722d4a524 | |||
| 0b3232a160 | |||
| 3c712cf77d | |||
| c04750ab57 | |||
| facb66b8a7 | |||
| e0b489e917 | |||
| 843c09bcb0 | |||
| 1c664ff673 | |||
| cb7d38b477 | |||
| 4c549b8707 | |||
| 4a9b0f2bf4 | |||
| 6ca45a9d33 | |||
| faba2d8148 | |||
| 37e056c06c | |||
| 853f7ff904 | |||
| e596680939 | |||
| 6f48cb78b6 | |||
| b5c6956f31 | |||
| ae347ab493 | |||
| cbec3f012d | |||
| a2e23fa988 | |||
| e4ef88c623 | |||
| f9a7d3b90c | |||
| ba483dfbb8 | |||
| d792086ba6 | |||
| 1577ae0839 | |||
| 2d204243af | |||
| 296a90ae01 | |||
| a024d9e996 | |||
| 6c21a80ef7 | |||
| 915e677866 | |||
| 093ed08892 | |||
| e537e1650d | |||
| 5fbf3d85bf | |||
| 02504e2bdb | |||
| a0df2f5328 | |||
| f0e3d2f2f8 | |||
| f8aa2896a1 | |||
| f8ef646312 | |||
| 54be266938 | |||
| fa745553bf | |||
| d84448e25c | |||
| 318b7ec3e6 | |||
| f084a229b4 | |||
| 9e7ec59a41 | |||
| e03231e6aa | |||
| 3473b8a653 | |||
| d4fd5157fa | |||
| 12aa0fe898 | |||
| bd73b7bcf5 | |||
| 7bea25a60c | |||
| b2db959619 | |||
| 3125f9708d | |||
| 68f6c81539 | |||
| 835d6dd731 | |||
| 78a765cb81 | |||
| b87058f7ac | |||
| a9f15d7372 | |||
| 2315bf52a8 | |||
| 32db3f943d | |||
| 0fa538fcc8 | |||
| 12b7aac1a0 | |||
| 0957437bbe | |||
| fefd2e5ce6 | |||
| 08f252d65a | |||
| 201a753e4a | |||
| 52be0b64fb | |||
| 49367b5bec | |||
| 559c0a0eb1 | |||
| b24e365454 | |||
| bf5a01e297 | |||
| 073c2d9964 | |||
| d5ef86c9a4 | |||
| 0424ba57d7 | |||
| b0201ec55f | |||
| fa3f1822ae | |||
| 82914e442c | |||
| f96111ef05 | |||
| 466ad96b1d | |||
| 5ce0acce40 | |||
| 3a55f50133 | |||
| 3b85d5fac7 | |||
| 8d2470c035 | |||
| 51f9ff5b10 | |||
| f300deb569 | |||
| 1d18aba587 | |||
| 3c73557dac | |||
| f5928a5be9 | |||
| bcbc74d4cd | |||
| 02b3518a3b | |||
| 76548e29bd | |||
| 4b35b2f968 | |||
| 77af137285 | |||
| 5abb065b3f | |||
| 28d22d7b84 | |||
| fcaa8ce3c2 | |||
| 8850a8219e | |||
| 250cfe81c5 | |||
| c7021f0bc6 | |||
| fc32903b28 | |||
| 422d519703 | |||
| c0680ae846 | |||
| ea94f7eba9 | |||
| 0c6ff36ba2 | |||
| 85450816b4 | |||
| 1b4c1ff91e | |||
| 145981c526 | |||
| e48b96b926 | |||
| 372b36c1d3 | |||
| ba8915c88c | |||
| 8e43c8f200 | |||
| 87f749277d | |||
| 03994163b5 | |||
| 73acf08844 | |||
| 8ea939f7eb | |||
| 54b7cafd2a | |||
| 8ed0319fee | |||
| 65784dddeb | |||
| a97e66eb84 | |||
| 2ea2483bec | |||
| c9671da732 | |||
| f05ef64df8 | |||
| efc9837df1 | |||
| 37156a4719 | |||
| 40533dbf69 | |||
| ae21368eb9 | |||
| cb92974914 | |||
| 4930c9cebc | |||
| decf6538a2 | |||
| 69772b0260 | |||
| 48ba45f856 | |||
| 37c76b815c | |||
| d6424233f0 | |||
| dcc4dcedba | |||
| f1e1145546 | |||
| 0e6b7f1656 | |||
| 01edb50815 | |||
| 775210e701 | |||
| 4e2c7221f2 | |||
| dc987c094a | |||
| c739117a7c | |||
| e64857c561 | |||
| d066c44bce | |||
| 62ef27ac1e | |||
| e56e500cd9 | |||
| 72f07170f3 | |||
| e4131c0b5b | |||
| d269de0a03 | |||
| bfad61f433 | |||
| d1e4bd8543 | |||
| 6b77f50269 | |||
| 224b9ee33f | |||
| b647e65618 | |||
| ac4c0bffac | |||
| 37b02d170f | |||
| 8ba69562b5 | |||
| 9e001d4df3 | |||
| a865fd6f00 | |||
| dabc325cac | |||
| 985506c251 | |||
| d30bf1bc3c | |||
| cc2955f21c | |||
| 6c39fbc33f | |||
| 1a3ef9ccd4 | |||
| 84bb1cda4e | |||
| 582561fdc3 | |||
| 26cf82a56c | |||
| 99c86bb40c | |||
| 68dc02e302 | |||
| b04de14fbb | |||
| 0de26fd78e | |||
| a289eba357 | |||
| fefc7e3749 | |||
| 2791bb7062 | |||
| a7fa1e6f4b | |||
| 97c418ab86 | |||
| c923c59833 | |||
| 788c7252dc | |||
| 1e190b3094 | |||
| ebc637d07d | |||
| 7db54a7cc7 | |||
| 1bde621a08 | |||
| ef8a5eb620 | |||
| 6eafcbb2e1 | |||
| e2b2c3a35e | |||
| e7ccff9805 | |||
| 83acb656f1 | |||
| 72aa3f2bc5 | |||
| be1373f01a | |||
| fde99e68c0 | |||
| 7fb336322d | |||
| 2beacc07e8 | |||
| 2b579b5a09 | |||
| 75dc334d39 | |||
| c955564cb3 | |||
| 43c1c81c8c | |||
| 26c44aa7c6 | |||
| 5c9ad9d2c9 | |||
| 5c130b1429 | |||
| 105eb95b02 | |||
| e6d5de69fe | |||
| 7919d04a9b | |||
| 3b9794d13e | |||
| 3640217772 | |||
| 9b402cfa59 | |||
| 6c28d7140a | |||
| bb40237498 | |||
| 13127365e2 | |||
| 8ade7f6177 | |||
| 48fd23a02a | |||
| a86e9f161d | |||
| 3b287770b9 | |||
| 9691a2dccf | |||
| 91ec3c0af2 | |||
| 22a8fa0730 | |||
| 1564be2d4c | |||
| b8f2d58f5b | |||
| 9af4ceed98 | |||
| 34a871c855 | |||
| b7d70613e4 | |||
| 2ed97b9ef3 | |||
| 2997b4c5fe | |||
| 63cde0b90d | |||
| 81865b3d52 | |||
| 14e0d43550 | |||
| 19527d79d6 | |||
| a25cfb463d | |||
| 10f6cbf41c | |||
| 7f2c14fc4f | |||
| a8ec658611 | |||
| 9120121dc7 | |||
| 039f68f1b0 | |||
| 21b6f06f9d | |||
| 46b3a504cf | |||
| 3b26e183cb | |||
| 6e3685d733 | |||
| e5d1309fcf | |||
| 2e3ccb4e8e | |||
| dad8af6b17 | |||
| afe7c8b560 | |||
| e5b5984f3c | |||
| 0f1c484ea9 | |||
| 881cd02fe2 | |||
| 49a0877b8c | |||
| 1453e79ecc | |||
| 212795db64 | |||
| e80b7940ef | |||
| c3f75c2952 | |||
| 56aae015cd | |||
| 221b5c086c | |||
| e019a6738d | |||
| 5510e2556a | |||
| 7d681cf80d | |||
| 03d1760dd5 | |||
| 8c22b4b54b | |||
| 46792849d4 | |||
| 43007af42e | |||
| b59eca22ae | |||
| 62f1a7410d | |||
| b407c58b96 | |||
| f978c99523 | |||
| bb5b5bb24d | |||
| 639fd80aa3 | |||
| c38eff62b4 | |||
| dba7186378 | |||
| d9d402916a | |||
| f49b26182b | |||
| 96b894e0e1 | |||
| f8502d45f9 | |||
| 049cd86ddd | |||
| 4884083019 | |||
| 00d7a19ec9 | |||
| 4546f40d8b | |||
| 315d0f581e | |||
| 953dddd26b | |||
| f399bdfa1a | |||
| 2320eef72d | |||
| 938bc4d503 | |||
| 95b84a0a9b | |||
| 4ee4479cd7 | |||
| a050285058 | |||
| 027aee8ad4 | |||
| 4453c157fc | |||
| 53cd921ab4 | |||
| cd00575257 | |||
| 6d2064b32f | |||
| 853e5dfcdf | |||
| 35e2ef8019 | |||
| 3a600db4ab | |||
| f5d8245801 | |||
| 011fd39091 | |||
| 3340c71a2a | |||
| c9bb92d58b | |||
| 99c94d3d83 | |||
| 8fc31ee9df | |||
| 40137b2e9e | |||
| c930f54063 | |||
| f0d3bbddff | |||
| a30c987f87 | |||
| adde942e34 | |||
| b1f67c83af | |||
| 0521a3a384 | |||
| e64c5dc4c6 | |||
| bee183f9bb | |||
| 9434c89ba0 | |||
| 3d9cb5329c | |||
| abbd878eb5 | |||
| 181850e808 | |||
| a61306f79a | |||
| 70b87804cf | |||
| c92815238e | |||
| d20727a5be | |||
| 3e6dcdc0a4 | |||
| fa5ed62a66 | |||
| 465e601e10 | |||
| dfc61fbfaa | |||
| 509c1afb8d | |||
| f1d33410fd | |||
| 283407e1ff | |||
| b6cc74f855 | |||
| baf07f9a03 | |||
| b6ec9b9d8c | |||
| 7892517b3d | |||
| 398611b7e8 | |||
| 70618cb7bf | |||
| bc12e4fe55 | |||
| eb736c272e | |||
| ea3164ac77 | |||
| ccc97b5c46 | |||
| 1cca4bef64 | |||
| 915e39cdf0 | |||
| 1017ea4f83 | |||
| 0735d7b328 | |||
| 6ae1709c6a | |||
| fb9f75c5ba | |||
| 3d1f6465da | |||
| 9a47e1764a | |||
| 14688e95ea | |||
| fdfe64e5f2 | |||
| 500fd453a1 | |||
| 2e37a697b9 | |||
| 42ab298f01 | |||
| 992c527c91 | |||
| 46743c1701 | |||
| 850be1e087 | |||
| 5498f419df | |||
| bf72e9d625 | |||
| 556f539531 | |||
| 9bbc890d96 | |||
| 3c1423c970 | |||
| 9814a514fa | |||
| 6ee71fee88 | |||
| b6b40a85e4 | |||
| b1b59c87b9 | |||
| d3dd2e463c | |||
| 06ff35c9af | |||
| 308f00f158 | |||
| 72a987ef5a | |||
| e5468a88e6 | |||
| 098efb6d3d | |||
| 8b577ab983 | |||
| b13514e33c | |||
| ac4b26a561 | |||
| 850ebec135 | |||
| 55923c8dc7 | |||
| 681ee0ef11 | |||
| d9933c5403 | |||
| b7348e1b65 | |||
| 0bf519dd05 | |||
| 1cfd5acb41 | |||
| 13c2320e38 | |||
| 2146bbb7bd | |||
| 2f0de10120 | |||
| ad079ea5da | |||
| dc0c59fdc6 | |||
| a2edf4d929 | |||
| f5ec92e4ca | |||
| 938951f4f0 | |||
| 22edfd2628 | |||
| 60d7dbb647 | |||
| 55d248941b | |||
| 463affcebf | |||
| b259342737 | |||
| b1441c9d6a | |||
| e70c8e5f0e | |||
| 7f0a094e4e | |||
| 903b66906e | |||
| d36b959dd1 | |||
| 1bf4f2386a | |||
| 7f3b6c177f | |||
| 70e55fd7c6 | |||
| 81656597e9 | |||
| 48e6be822c | |||
| c7ed293484 | |||
| 408730b7ab | |||
| 21d5a41e92 | |||
| 4cfbc5af08 | |||
| 3893936243 | |||
| ac649b2ffd | |||
| 1db23e0f12 | |||
| 9d454fed93 | |||
| e20250139a | |||
| 10c43e5642 | |||
| d97ed516a8 | |||
| 2b85894826 | |||
| 0812659e92 | |||
| 5df28f1eaa | |||
| 79797a3eb6 | |||
| 0a862b5295 | |||
| 7833c63388 | |||
| 34c406ea3a | |||
| 7b1a5fb3de | |||
| 75f619fe00 | |||
| 1ef8175c49 | |||
| 1c4f441507 | |||
| 06f62a3dd1 | |||
| 49463c4420 | |||
| f7d69085af | |||
| 5278560252 | |||
| 9bb0a8d9e9 | |||
| aa6b399b5a | |||
| 07da2c9d10 | |||
| 9517fcf80d | |||
| 88d3e7a7ba | |||
| e9f35610a5 | |||
| d296d29a1c | |||
| 332748dd55 | |||
| 848dd12a1f | |||
| 2830551e89 | |||
| 565bc3aeed | |||
| bae435a5a7 | |||
| ce0516282a | |||
| 258b062295 | |||
| 2c1ec4245d | |||
| d05fb709f9 | |||
| fba3c947ef | |||
| 8bbf08f0de | |||
| a57ea2b775 | |||
| c19adb4953 | |||
| 4b4c130f0a | |||
| ad6f52dc54 | |||
| 607d92858f | |||
| 16928806f9 | |||
| 23481b716b | |||
| b913e73d04 | |||
| a478757483 | |||
| 6c57ce9e09 | |||
| fad0dbb9ac | |||
| 8c10545d3c | |||
| 83d70b0f36 | |||
| 0e151e3c88 | |||
| 024dfd54af | |||
| ec97c38ff9 | |||
| 4a69877eaa | |||
| 5156222a92 | |||
| 4c7d77372e | |||
| 3f013e4cf5 | |||
| adc55608f1 | |||
| 7cd4fc2fb8 | |||
| 9c86d68b4c | |||
| 031846f2e1 | |||
| 9b97c97bd1 | |||
| 960a926055 | |||
| 53f2131681 | |||
| ceebfa1bee | |||
| 93ba5c9175 | |||
| 3af68fa857 | |||
| fefbcfeb0b | |||
| 064fdba120 | |||
| 84590f96e5 | |||
| 53aad98a1a | |||
| b3791dc4be | |||
| bc54f76875 | |||
| b7ec2ebb55 | |||
| 41c335e5a5 | |||
| b203c7c3e2 | |||
| 34f34f6227 | |||
| 8df76fe0cb | |||
| 5b0ad6b5e8 | |||
| b1e0c4d119 | |||
| f85cf5d7f9 | |||
| 9d0c8a9edb | |||
| 81907af74c | |||
| fb352e3098 | |||
| 26f3514992 | |||
| 6079e22523 | |||
| 30549d65c2 | |||
| ee0822dc4d | |||
| 832f738db0 | |||
| ed52f7feea | |||
| e95c0055af | |||
| 6a65678592 | |||
| fa56623458 | |||
| fe4d518d85 | |||
| ea47cb3ffe | |||
| 451ee3991e | |||
| 7c9231ffba | |||
| 2e49bf311a | |||
| f530a24544 | |||
| abc4eeb9a7 | |||
| c91af16fa7 | |||
| e202116b56 | |||
| bd565df379 | |||
| a3ebc0ae7f | |||
| e9e6b1e22c | |||
| 617d7ff575 | |||
| 77a0ffc71d | |||
| 52c33f4af3 | |||
| 0e6430abcb | |||
| b71be65f57 | |||
| 1911c63826 | |||
| 8495910165 | |||
| cac1695099 | |||
| 38bc519e4a | |||
| a3b3a589f9 | |||
| 1fe0fc224c | |||
| 44c254c09d | |||
| 8b47361873 | |||
| 3429c27477 | |||
| 099e002667 | |||
| 3c9c964630 | |||
| 97620c053f | |||
| c2f909fc86 | |||
| d142a796d8 | |||
| 996b6c37c7 | |||
| 1c0ca41b6e | |||
| b44cb33d2f | |||
| 1aa4621777 | |||
| fcdaaabf7c | |||
| c96f48e7c9 | |||
| a9664abb57 | |||
| 5bffcdf7e8 | |||
| f2ef81a179 | |||
| 6e4280ea81 | |||
| ba4d6c859d | |||
| 2f1d529a71 | |||
| 240b245105 | |||
| c6fa9931ed | |||
| 014e8485b5 | |||
| 7757759205 | |||
| 14b21f7271 | |||
| 2f63c58380 | |||
| 3ebcd94535 | |||
| ce2b9f83f7 | |||
| 331763a48b | |||
| d789cb459c | |||
| a287605c3e | |||
| 0507043a55 | |||
| 58285e5468 | |||
| cd7cbe3d41 | |||
| b3d3acf75f | |||
| 5ddf3de4ce | |||
| 3859ac921a | |||
| 7e17f01b7b | |||
| a1028efdcf | |||
| 590f150d5e | |||
| 631f229827 | |||
| 8edf37903d | |||
| fd4af21350 | |||
| 5fb3869775 | |||
| 24fd39538e | |||
| 07bf9cb013 | |||
| 3dcaf1f287 | |||
| 2c92eb3175 | |||
| 0976765c62 | |||
| 33d64d0491 | |||
| 7b6d65cf20 | |||
| 62b5470b78 | |||
| 670c52f75e | |||
| 3a424b7f1c | |||
| 6bcf3d4311 | |||
| 3d0e2cc46c | |||
| d752bac43f | |||
| 1bccc14e05 | |||
| 9f74982a54 | |||
| 00ca8f455e | |||
| 4708d1aed7 | |||
| 9bd14d5417 | |||
| c497fe05a0 | |||
| 4e60392040 | |||
| e5b114e5b8 | |||
| 163d544ecf | |||
| 63819c1e1f | |||
| 2af5815d47 | |||
| f3c724d449 | |||
| 5caee5cc64 | |||
| fb0479da23 | |||
| 8a8c0d285e | |||
| c7ec0d599a | |||
| b8d4ac589d | |||
| 0433fe539c | |||
| 7fa0493ca0 | |||
| 7b399c4248 | |||
| 1baaac295a | |||
| 307324f4ac | |||
| 43036e0031 | |||
| 2b6d0f36f0 | |||
| bb171a0c05 | |||
| 9942757bab | |||
| f2962e5875 | |||
| aa143a3dd1 | |||
| 72e7672a6c | |||
| c5ff405d94 | |||
| c3a37d0fcb | |||
| 3889dcf3f8 | |||
| 865e7cacca | |||
| 419060da84 | |||
| 416bf3253d | |||
| b51a78d439 | |||
| 6295f7d05b | |||
| 219a34261f | |||
| 224dac9427 | |||
| d78637102c | |||
| 60ae973142 | |||
| 799bb0cd18 | |||
| 8a96e34e33 | |||
| 70d7e83dca | |||
| 320c0bf419 | |||
| b870ad46bf | |||
| f617fbe166 | |||
| 8f2e6640e3 | |||
| e16ca08b33 | |||
| 9b5a719d80 | |||
| 157b0e7760 | |||
| 0a53afe8ba | |||
| 6bc369fc56 | |||
| 687fc11626 | |||
| 638c575c73 | |||
| d4cb564ce2 | |||
| 5e9191558d | |||
| 515f119a59 | |||
| 3880d059b3 | |||
| ec1c0608bc | |||
| fa81936a5b | |||
| c5edd20354 | |||
| 1e54e56579 | |||
| 347a1e2913 | |||
| 4790a3732e | |||
| fdab565711 | |||
| eb20bb3b23 | |||
| 97614920ef | |||
| ae1d1b6d55 | |||
| 6694d87a23 | |||
| ee867ead1d | |||
| 62c0556c58 | |||
| 02525abd9f | |||
| c552e9eede | |||
| 5dc5b27858 | |||
| c319735d9b | |||
| 1a8d37d19e | |||
| 91cf0d1843 | |||
| 910db5c9b7 | |||
| e60825e75b | |||
| 5a042af7e3 | |||
| 0367a12b92 | |||
| 757d296382 | |||
| ceeb01dce5 | |||
| e5ff41ec9b | |||
| e8f94182f5 | |||
| 5c9f58e124 | |||
| d0de575aef | |||
| 1ebea1e0f0 | |||
| 5350fba319 | |||
| 8a415c881a | |||
| 674c618471 | |||
| f64738218a | |||
| 494d201fda | |||
| 91808e64a1 | |||
| 178fdbbda8 | |||
| 2c53e3f53d | |||
| af9be78ead | |||
| c9d70d46b1 | |||
| c4c2e2e796 | |||
| cca4ee2e46 | |||
| 21fb10c6a3 | |||
| 639836ebf0 | |||
| 6ae7caaa01 | |||
| f280e3cbd9 | |||
| 9eba360eab | |||
| 84f32bbb24 | |||
| c91c631ae2 | |||
| ca527040e2 | |||
| 114c23e411 | |||
| 748279d5f1 | |||
| e274e72869 | |||
| 4dd755443a | |||
| d19fc1264b | |||
| d3bccd7b23 | |||
| 72bb8bb73c | |||
| c53b3c5f84 | |||
| a308dfca98 | |||
| c20febdbb0 | |||
| 8a1b998b2b | |||
| 4b1a4bdb49 | |||
| 588ddf1b18 | |||
| 81cc89a3ce | |||
| bb43927077 | |||
| a0debc3a9a | |||
| ca0bd70cde | |||
| 613ff7c85d | |||
| d88ad46978 | |||
| bb7c35b99f | |||
| 2b87e78e18 | |||
| 6b3b8c59c3 | |||
| 70a58d7198 | |||
| 4761c28143 | |||
| f5a14532c2 | |||
| d792ebc5d2 | |||
| abda763073 | |||
| 8ad5eb521a | |||
| 8d1c73a912 | |||
| 16681d1080 | |||
| 8e52c0155b | |||
| ace781740c | |||
| ad7ecf1dba | |||
| fb34f36c69 | |||
| a301d1c298 | |||
| 27d718b223 | |||
| a300e7e945 | |||
| 358e3065ab | |||
| 747b7cab6c | |||
| 232c67bf76 | |||
| 5b41134ee7 | |||
| 0dd7769bb1 | |||
| 82de5b3a67 | |||
| 3421b950ce | |||
| 53dfd9536a | |||
| f834736307 | |||
| 4a12707103 | |||
| eccfd98b92 | |||
| 9b5b2540a4 | |||
| ba70ec99b3 | |||
| a6748df587 | |||
| b47704eabc | |||
| 2311c14582 | |||
| 5f5fb11c66 | |||
| b5a189a978 | |||
| 7d59db4ec4 | |||
| afb406f1de | |||
| 87b7ce4415 | |||
| 2ff16d4c45 | |||
| 5466fd2606 | |||
| 4b8aeb1129 | |||
| 518486ed3d | |||
| fa91c1445e | |||
| da28c62855 | |||
| 9ddf1e5c77 | |||
| 285108e2e1 | |||
| 96f23e3da1 | |||
| 802af10e44 | |||
| 7889ed7f80 | |||
| e4ad7e3778 | |||
| 36d688ec10 | |||
| 0245c0cd10 | |||
| 195aad8e6a | |||
| f46f7eff0c | |||
| eab8eb8f3b | |||
| e1d0f07c90 | |||
| 0883c6a913 | |||
| bea0c1b660 | |||
| 9fc83ac544 | |||
| e0e537d94e | |||
| ab8cb6f8a9 | |||
| 68968eda8d | |||
| 6791284994 | |||
| 08d457edcf | |||
| 47188b7c7e | |||
| 0323761ea6 | |||
| 0e8748746f | |||
| 15815fb54d | |||
| 677a28fd2a | |||
| ab6bffc6f8 | |||
| 5fc2564c92 | |||
| 0c5d74ec1a | |||
| 5c090b9eec | |||
| e59b8cd905 | |||
| 95b2820214 | |||
| 91749a284b | |||
| 94de7e5d21 | |||
| dad72fd47b | |||
| a817813b50 | |||
| a25e809da1 | |||
| 46841df978 | |||
| be29c99d5a | |||
| b22c2505a8 | |||
| 4d695cd2f4 | |||
| e5e1a3bfde | |||
| a5ba18c20e | |||
| c9a4775d49 | |||
| 18f280b869 | |||
| 12acf5603a | |||
| 0bcd66d553 | |||
| d69c1d8652 | |||
| d4af868528 | |||
| 2fc7d21971 | |||
| ec7689421d | |||
| d96ff496b4 | |||
| e3cb5f80e7 | |||
| 09d2f4ea46 | |||
| 5261961a6e | |||
| 3cce299a78 | |||
| e41ba90f17 | |||
| 423ab8ddb8 | |||
| 20784d3da2 | |||
| 1794cdc03c | |||
| c792233d9c | |||
| 4c568e6ed3 | |||
| 9519e67ad2 | |||
| 8595066afc | |||
| b0cbd6ef77 | |||
| 23f27d8dbe | |||
| 0519e05432 | |||
| 81f07f001e | |||
| 55906457e6 | |||
| a484f39f47 | |||
| 1f82550cc8 | |||
| e00c904585 | |||
| 1920993525 | |||
| 1a3523d2d8 | |||
| 1f7025f028 | |||
| 4ee0f212cc | |||
| 7819ec784b | |||
| 52d9685cb9 | |||
| 3aeaa34023 | |||
| c12e1ecb86 | |||
| 0fef0f2ae0 | |||
| bd2695f01b | |||
| cea26341a5 | |||
| d60107ab7a | |||
| fdfb875208 | |||
| 85f0074f23 | |||
| 0f17851562 | |||
| 53af876999 | |||
| 9c4c3eadf7 | |||
| 0f665b3f15 | |||
| 3f0707234f | |||
| cd9f85dbda | |||
| 99058ee30b | |||
| 7b4b7ceb7e | |||
| 48c52c8bbb | |||
| 40727c8369 | |||
| e3c1405254 | |||
| 37aa823112 | |||
| ef9d14f181 | |||
| 87f8cdd699 | |||
| a00818047f | |||
| 6af4a02941 | |||
| 6ff5245cf2 | |||
| 2af6775c14 | |||
| f89b705049 | |||
| bb61cc0dba | |||
| 953de60ff0 | |||
| 986e379f28 | |||
| de8e6abd1e | |||
| a6df336477 | |||
| 8097bdc2f4 | |||
| fdc0c12b7f | |||
| 05becd56e5 | |||
| d2951d6d4c | |||
| 09944a83d9 | |||
| e43bc88fc3 | |||
| cb2e831da4 | |||
| 601a159f25 | |||
| 8931f08362 | |||
| 2d92f42878 | |||
| eb717a7e91 | |||
| bd9a3ee161 | |||
| f987bf2961 | |||
| 5af40a0269 | |||
| 10294a84fa | |||
| b8e3bc9dd8 | |||
| 32251c9b04 | |||
| 9f87475129 | |||
| 71796edf95 | |||
| 8839bd572e | |||
| c9d8b541fc | |||
| 356e5d3028 | |||
| a58214f015 | |||
| 67faf1610e | |||
| 377be68d92 | |||
| aea44efaa6 | |||
| 0661aff4a5 | |||
| e9414169a3 | |||
| 64be9c8bf6 | |||
| 50fc68b981 | |||
| 1d9c0d3e12 | |||
| d25d44156b | |||
| bca5868817 | |||
| 7f6c95f2d7 | |||
| 131dab774c | |||
| f9a59f2592 | |||
| b8b8c7c9e5 | |||
| d17507052e | |||
| 49ee4d4ade | |||
| 1eb1d4c370 | |||
| c982be3924 | |||
| 85ea247cc6 | |||
| bf06bc92aa | |||
| aff420329c | |||
| 21d79abb1f | |||
| d9a5603fa3 | |||
| ee97dd5211 | |||
| 29388f80a5 | |||
| e7501b69ea | |||
| c0fda696f3 | |||
| d4f81c6d24 | |||
| 3b264d5877 | |||
| 0866a135c6 | |||
| 2849a774e3 | |||
| affc69bf1f | |||
| 22b747eae2 | |||
| 426b088754 | |||
| 60848519b5 | |||
| 61d48dd0f8 | |||
| eba8450995 | |||
| 1656e7573e | |||
| b7947d861c | |||
| 1db1422fbd | |||
| fc810434de | |||
| fe93724d3f | |||
| 65b957a5b3 | |||
| 9eaa7bd566 | |||
| 94211fb8b0 | |||
| f20edba925 | |||
| fe4f5b539e | |||
| 4e31bc5cf5 | |||
| 06b40aef91 | |||
| c97c22b7cf | |||
| 51702ffd92 | |||
| 805946baaf | |||
| 726ba0210e | |||
| 71790e12ad | |||
| 0cf45b89ec | |||
| 004801f1c5 | |||
| ddcbd2cc26 | |||
| d6d15c136a | |||
| 277b0231f2 | |||
| f2f00259da | |||
| a4a739b99e | |||
| c0d4e16833 | |||
| 94703fc5b0 | |||
| 496474392e | |||
| 433c364456 | |||
| ec95efca10 | |||
| 003d048b0d | |||
| b6d1402361 | |||
| 67fd2d02ef | |||
| 1eaa074a49 | |||
| 024c836462 | |||
| 44881592c3 | |||
| 3c0b71bcec | |||
| a9d547dfee | |||
| 69ebecc54f | |||
| 8762c37c22 | |||
| a3b6a5b606 | |||
| e625b32841 | |||
| 924c01dbec | |||
| 0d7c039ea1 | |||
| 291689a178 | |||
| 1acbeb217b | |||
| 2b3424b536 | |||
| 538b13aeec | |||
| 0dde3b65d5 | |||
| 463cd09811 | |||
| 5859a531e5 | |||
| 8e8638431d | |||
| fc2d933224 | |||
| 52f46589a0 | |||
| 6909fffde1 | |||
| 19f4f2eb92 | |||
| b854d4ecd8 | |||
| b522148bd9 | |||
| 170cc0360b | |||
| a371bdac9d | |||
| 3af6001a75 | |||
| 134d0b74d3 | |||
| 3f4ec3596e | |||
| 843daca26e | |||
| f9d7f47e28 | |||
| e60a7c0d49 | |||
| e9c18c76c7 | |||
| 37459f89c9 | |||
| 4622f1e89b | |||
| dc37883702 | |||
| 6ca697bc12 | |||
| 57da72d444 | |||
| fe14e7ab24 | |||
| 61488885b5 | |||
| 472aad46a6 | |||
| 0c8e6e0e68 | |||
| 60b806f9b8 | |||
| e1ce2146f5 | |||
| eec8a20c33 | |||
| 5d913f4d72 | |||
| b729d8e821 | |||
| 6d2cbc4055 | |||
| 6d0add4285 | |||
| f597838685 | |||
| af95395fe7 | |||
| 5f8e43da85 | |||
| 6b53fe8f7b | |||
| d3e7968927 | |||
| b9ce87e8e2 | |||
| af03e000c7 | |||
| 635bbfe92b | |||
| adab462e42 | |||
| b5ac7ef2f2 | |||
| 983925c685 | |||
| 84457a5dcd | |||
| 385003e9fe | |||
| 9fa014edcd | |||
| 5330112f05 | |||
| 66f86e898c | |||
| 36d6ca529d | |||
| 2104d61d4a | |||
| fe7c5e3f64 | |||
| 0787c31f41 | |||
| 2f805ff7ad | |||
| 6d3dd24622 | |||
| fc5d412ba7 | |||
| 93d490213f | |||
| d24ffe9a65 | |||
| c55aee1e79 | |||
| 0442c6fa81 | |||
| 1457320702 | |||
| ecd2e8ff47 | |||
| 02397ef851 | |||
| f1076541d1 | |||
| b5e9eb742c | |||
| 6ad77b2319 | |||
| 67e0ed93a9 | |||
| 1bffe170e1 | |||
| 7b998c30e7 | |||
| 2083fdc9c0 | |||
| d1b158b9dd | |||
| 380caa1a87 | |||
| 900f17d563 | |||
| c97942cf78 | |||
| 6157db6462 | |||
| a9424868a1 | |||
| 749935866d | |||
| cbda161c39 | |||
| a63636171e | |||
| cf0ba039c3 | |||
| c75d0b8ca3 | |||
| a2b679bc26 | |||
| 45dcd156b7 | |||
| e6282b8ace | |||
| 87331ca1a0 | |||
| 65487946cc | |||
| 4823285b55 | |||
| 26a7b332cb | |||
| f07b01cc34 | |||
| bbda6f4c57 | |||
| 29b2f77b5f | |||
| 537060d96f | |||
| dbd1811d53 | |||
| 4384e77bd1 | |||
| dc714c1181 | |||
| d4861bfd1f | |||
| c07145fe28 | |||
| e09684647a | |||
| 98d678c2d2 | |||
| 4a559bc2ab | |||
| 044a322519 | |||
| e3c5c0906b | |||
| 2e9eb05751 | |||
| b122a4b436 | |||
| d00a96315e | |||
| 04970490ec | |||
| 9976074271 | |||
| 7539abecdb | |||
| d79a6eddf2 | |||
| 3f3c821800 | |||
| 97c021b17a | |||
| c946285a07 | |||
| c92135bdd1 | |||
| 9931da772d | |||
| f2311d1bfd | |||
| 5025f29378 | |||
| 435ccfdd51 | |||
| af14780526 | |||
| 2b9d2c726a | |||
| d847f4f0fd | |||
| 340e999c45 | |||
| d2143bcd44 | |||
| 53b678d5cf | |||
| d2618bfe11 | |||
| ae8c90301f | |||
| 4eec739624 | |||
| eefee8574a | |||
| be84824530 | |||
| 5229312ad2 | |||
| 99ef35a353 | |||
| 05084aa63e | |||
| 001a2c5195 | |||
| bcb49d71b4 | |||
| 59ca444b26 | |||
| 04d71da6e7 | |||
| fa5c5f4105 | |||
| 91b6c8507a | |||
| 4e27fc93f8 | |||
| 0800574c12 | |||
| 2c4079fa4b | |||
| fc43e51331 | |||
| a8d3d1f6f9 | |||
| 46991bcd62 | |||
| 85b04f0b4d | |||
| 233478e689 | |||
| 676afdc494 | |||
| 8baabdfb57 | |||
| e5e4424f11 | |||
| a44a6f6c87 | |||
| 85cc4086c8 | |||
| 97d7a4a86e | |||
| 4ed07411c3 | |||
| d6dc91b4d4 | |||
| f7bee7883b | |||
| f7e52076b6 | |||
| 88bb007d2b | |||
| ee9449c504 | |||
| 25c28c5da4 | |||
| 0513741a85 | |||
| 351589e5fb | |||
| dabf960b32 | |||
| a2be9e9fc1 | |||
| 6160104fd7 | |||
| e55784a1e8 | |||
| 868787c364 | |||
| 27e10efa66 | |||
| 3c76b33532 | |||
| 685a47b2e2 | |||
| 658f18c713 | |||
| 8be93a6de7 | |||
| 6dd8a9b6ad | |||
| 23b819efb8 | |||
| 9161e40aa0 | |||
| 5ccb4e0487 | |||
| 6dbc5e032f | |||
| af1c63c0a0 | |||
| 4ba06c3ed0 | |||
| 46e2b67ecb | |||
| 58e4a880a2 | |||
| df99e4e88d | |||
| a174a6c0b5 | |||
| d4f29a6361 | |||
| 3b1ee0549b | |||
| 871f931e95 | |||
| e3e1f704a4 | |||
| d19a05734e | |||
| 38e35d5137 | |||
| aa57833ad5 | |||
| e4e774d42b | |||
| 89c5a7584a | |||
| a4a9f56c8b | |||
| e4360294c5 | |||
| 1d02146810 | |||
| 9ab0ff6cf2 | |||
| 601778e0e6 | |||
| 810096c276 | |||
| e4a29d93fe | |||
| 54e1a8709d | |||
| 4c06a721ef | |||
| 3113b49159 | |||
| 3c1fcd5deb | |||
| b3a2444bcf | |||
| 277d64af88 | |||
| 7bd9dae53d | |||
| a33b2bed52 | |||
| b0eddeba2d | |||
| cfa5a270d3 | |||
| a7c6fedebd | |||
| b68aa12572 | |||
| 47bea69322 | |||
| aa2fabcba5 | |||
| 8512deb3cc | |||
| 7867da47cf | |||
| a788cc526b | |||
| aa17f881b1 | |||
| 4f99e5ab37 | |||
| 88cacd35c5 | |||
| 61d255887c | |||
| f1dbc7d724 | |||
| 24387c25db | |||
| 1a5820aa01 | |||
| 097891e311 | |||
| 1af084cb65 | |||
| 136121f6ee | |||
| ebde9a5e6d | |||
| 66abbf4122 | |||
| 0f984ea0f0 | |||
| 3f02c9d5b9 | |||
| 4f77434da1 | |||
| 51281f8d69 | |||
| d2dbaa4cd1 | |||
| 88a7e8cdf5 | |||
| f9ce3f4b91 | |||
| daf9de7463 | |||
| 8a95f4f0e6 | |||
| d30830d0a6 | |||
| f5a92cb43f | |||
| 3bcc3e70f1 | |||
| fd8b346c3e | |||
| 4c2584d729 | |||
| 72c715ff4f | |||
| ce01123db2 | |||
| 3a83a35ab0 | |||
| 8336a96cb9 | |||
| 9742c73254 | |||
| 793c966c40 | |||
| dafd9e3408 | |||
| b12c14514a | |||
| b4e3359448 | |||
| bac7180e02 | |||
| 2b32eee3f4 | |||
| 51f5ee6f19 | |||
| 66a5ecb7ec | |||
| 4e050e85ad | |||
| b34fc422a2 | |||
| 3871984028 | |||
| 3ac06bf063 | |||
| 20eee64426 | |||
| 85a04185d3 | |||
| 57460b1e30 | |||
| d8c80ff5a4 | |||
| 26ca124150 | |||
| 6d93a0e42c | |||
| 3f7d319fff | |||
| 3cf367c9c4 | |||
| c643af0b85 | |||
| 5e1d33329b | |||
| 9cfced4650 | |||
| a809ae4e88 | |||
| 1c6c3dfa8d | |||
| 83a49b4f6a | |||
| 352f92e437 | |||
| f5fd3e7d65 | |||
| ee302b063f | |||
| d7dd014a6e | |||
| b56a52c49b | |||
| 0bb84096a2 | |||
| 36a03dbdbf | |||
| 02bdc10062 | |||
| d3cc507380 | |||
| 1af790ecc3 | |||
| 67a3d35b4e | |||
| 8c64adb000 | |||
| 6ffe686ba8 | |||
| a94cd6d6e8 | |||
| ea7efd57d8 | |||
| c9e42c5050 | |||
| 6033599c88 | |||
| a924bbfc30 | |||
| 0d2f21b51e | |||
| 5c5ef9746c | |||
| 42793e16dd | |||
| a4ff46aab7 | |||
| e6bd4c9f85 | |||
| 0d082ce6fd | |||
| 5df6b4a756 | |||
| 8483f2ef2f | |||
| a60408cda5 | |||
| 68926d595c | |||
| da3a4dcbc1 | |||
| abfa5c586a | |||
| a1b4aa5e88 | |||
| c4226f0457 | |||
| aef1fc087d | |||
| 752ac19a2f | |||
| a2e04718ec | |||
| 94b3bad3c9 | |||
| 2e927c2dbd | |||
| 69fd82fc46 | |||
| 68e2df56e7 | |||
| 86fa0308fc | |||
| 0d455e05c1 | |||
| 924a65413a | |||
| 0c55ed0ca8 | |||
| 6bac5453d1 | |||
| ccbc784195 | |||
| 56a4877e30 | |||
| b204c39815 | |||
| bb917c8391 | |||
| 386be97ce2 | |||
| 7d032de7e8 | |||
| de2f7666fb | |||
| 95f087cd0b | |||
| 22a52766dc | |||
| b94e13c8ae | |||
| ee3740af00 | |||
| 9f2182abbb | |||
| 6c763e1ea5 | |||
| e03e2e7f94 | |||
| c6e5f60525 | |||
| 29cc675375 | |||
| a792252b55 | |||
| 7ea6b356c7 | |||
| 8ad8ec679f | |||
| 0052d46b8e | |||
| a035608100 | |||
| fe59a5695f | |||
| a5f04f9e17 | |||
| b3c9842a98 | |||
| 9eb5e39ff3 | |||
| 5a227352b4 | |||
| bdff0949bb | |||
| f7ce715596 | |||
| 4262127854 | |||
| ca48e217f1 | |||
| f48939c2d7 | |||
| 39e2ebbde4 | |||
| 903ec0ec60 | |||
| 20dac7ea48 | |||
| 642942a72f | |||
| 923dbcc58f | |||
| 2ab7b7c09e | |||
| 6b5be4f1a7 | |||
| 6c235c8edb | |||
| a87b9fb4b6 | |||
| 58d8a2702a | |||
| f1f14ce403 | |||
| 76350cd30f | |||
| 47293f28cf | |||
| 325fe7e663 | |||
| 56102737d7 | |||
| c2b7c1f13b | |||
| c8f5e228fc | |||
| d3c6b85638 | |||
| 96a45e842e | |||
| c280cd7290 | |||
| 44290af516 | |||
| 649841e6bf | |||
| 606c80344a | |||
| 6ea22535e2 | |||
| e4acd74e87 | |||
| b07031b594 | |||
| 0981814473 | |||
| 3d635cb4a7 | |||
| b0aace31ec | |||
| 9eb78eeb18 | |||
| 6dfa647f05 | |||
| f8f425e34c | |||
| 206a3fcea8 | |||
| 23dec329b4 | |||
| c855dcc52f | |||
| cb2052dbfe | |||
| 400572b19f | |||
| a6b178a3d9 | |||
| 4718a4bf81 | |||
| 9efaa3cce7 | |||
| 29dc07b1f3 | |||
| ff8af10cfe | |||
| e880d51e1c | |||
| 3c8e97ff6a | |||
| 1d530eb2e2 | |||
| 4500a5369c | |||
| f33598f55e | |||
| cd44aa0bb1 | |||
| d3ae175bca | |||
| deaf632881 | |||
| c67d4fc633 | |||
| f45a12439a | |||
| 285218915c | |||
| bd9d60c4c6 | |||
| 4d918ba40b | |||
| bf29a4d746 | |||
| 8329c09ba8 | |||
| 743d4ecf7b | |||
| 52855a39ad | |||
| cb7fe597a5 | |||
| 8ffc06ff72 | |||
| 186c18668c | |||
| 4009bca59a | |||
| 18cbfa4a4f | |||
| b71a168937 | |||
| 35c17f35be | |||
| 3085fc6345 | |||
| 17e860a288 | |||
| e200b88a5a | |||
| 1833b034fe | |||
| 69020666fe | |||
| 53144ee0eb | |||
| a42d879925 | |||
| 952962a111 | |||
| c664cf3717 | |||
| dbdd357b0a | |||
| f3a03aefad | |||
| 6904207b60 | |||
| 44c46e545a | |||
| c1e5c16ff3 | |||
| c63d79c5b1 | |||
| a9d02f096e | |||
| 6a7d54f550 | |||
| 3d5e3a910f | |||
| ef0fcb9238 | |||
| b5bf756ca0 | |||
| ad8f8b0c8c | |||
| 840b1d5c94 | |||
| 974102bc7f | |||
| 5bacd8753b | |||
| cbc9745b79 | |||
| 65c2d6a2be | |||
| b16a4ba25b | |||
| 927aa1e617 | |||
| fdf2151d9f | |||
| e0aa677388 | |||
| 593a376566 | |||
| 2ab46d9553 | |||
| 36815fe3f3 | |||
| a64b51dd94 | |||
| 55534eeb06 | |||
| b5a0d2b580 | |||
| 82616eec41 | |||
| 7e52003533 | |||
| 7b7774476e | |||
| 4df6e39bab | |||
| 54449b614b | |||
| a2fc479c0b | |||
| 9208dcb07c | |||
| 725e440d27 | |||
| 121034876d | |||
| 9627ab9462 | |||
| 499035c6ea | |||
| 71765858dc | |||
| 9a2a34f94e | |||
| 838c34eee1 | |||
| 253429d3f1 | |||
| 38f7cd7173 | |||
| eab7faf536 | |||
| 83391ac59d | |||
| a8a93a57e7 | |||
| f637629c5a | |||
| 93aa94e71e | |||
| 86b46a27cf | |||
| 1bc3077890 | |||
| fc27a343e9 | |||
| 692d6168b3 | |||
| de9787a6ac | |||
| d2bf2be8e6 | |||
| b7292bc899 | |||
| dbd4a0e5e6 | |||
| b361209d52 | |||
| 4abe6dc48d | |||
| 26f36f2ff9 | |||
| b42c11de82 | |||
| a494c75bfe | |||
| bc8c912c7a | |||
| 5247237bf0 | |||
| 8e6aae0d7a | |||
| 8681686d8f | |||
| 9012e6dd9b | |||
| 139bd30247 | |||
| 4930516652 | |||
| ad568edd7f | |||
| 62b3a20da5 | |||
| 1f41d06f9a | |||
| 1339c7f30c | |||
| 734fb18c4d | |||
| 71c6339af0 | |||
| 34a0897f90 | |||
| a32100d9ba | |||
| b5400902a7 | |||
| d35fbe6bfc | |||
| 645930387c | |||
| 44dfe62af0 | |||
| 4acb267cf4 | |||
| 8676d19dc3 | |||
| 6b4f3e5fab | |||
| dafc4e456d | |||
| 2a884cc179 | |||
| b774753922 | |||
| 5e03305da5 | |||
| 3ff1ec99ac | |||
| bc8d494617 | |||
| 35e771daab | |||
| 1ab259df9a | |||
| 0bd54a60e9 | |||
| 63b6b24cd0 | |||
| 8e49560709 | |||
| b8f57c9a96 | |||
| c6a15e1835 | |||
| 05f4416ba0 | |||
| 91ac790249 | |||
| 3cfe737581 | |||
| a2b3acfc6e | |||
| f4b23de9dd | |||
| a08c98cdfb | |||
| 279e2be56b | |||
| cdbb893b27 | |||
| 41d172f22d | |||
| 3f7ec99166 | |||
| 1102b7eff8 | |||
| da43778c1f | |||
| 9aa5ab7557 | |||
| d44c58a1fb | |||
| 7463e9b8bb | |||
| 9f201a8ebe | |||
| 91998d6424 | |||
| 420db56ffd | |||
| 07ed5e5346 | |||
| 4824ce300f | |||
| 5855eba9f3 | |||
| cdaf4c7321 | |||
| eace6adb6d | |||
| 6db9fcbc30 | |||
| b4b35cff15 | |||
| 47fb79bd8c | |||
| 6b50410336 | |||
| 6e3700593f | |||
| 6a8c5a1d27 | |||
| 50da209dc4 | |||
| b7b08fa0c3 | |||
| b1288dad40 | |||
| ac6fb17784 | |||
| 3f22f4727c | |||
| 0153e796cc | |||
| 4891818114 | |||
| db4a557187 | |||
| 04c3a534af | |||
| a32143003d | |||
| 8bd17163c7 | |||
| 8a62b03761 | |||
| 81aaca8c04 | |||
| 189e1b228d | |||
| 52709c7771 | |||
| 7dbb125a34 | |||
| aff375808d | |||
| 3f5f09e730 | |||
| 332ff4bf1c | |||
| 253a4c113e | |||
| 1788c93aea | |||
| c2ecbc76ce | |||
| 4203c903f8 | |||
| 727feda935 | |||
| 39087fecdc | |||
| d49958141e | |||
| c725771e11 | |||
| 103212f209 | |||
| be326ff752 | |||
| ebaee3ea21 | |||
| 423bc515e5 | |||
| 941d89e06d | |||
| 281b790618 | |||
| f5d7c5f103 | |||
| 93c4bca04d | |||
| 726f0adde3 | |||
| 24d7eb0ca5 | |||
| 8ba44e7d55 | |||
| 49f539cb46 | |||
| 0a650b573b | |||
| 7e3c53b9d3 | |||
| ab912329b6 | |||
| 6ad216576d | |||
| c5a4df30c6 | |||
| 86c6e07326 | |||
| cb8f1dca3b | |||
| d1ff87d94d | |||
| b16f76eede | |||
| 4792837f2e | |||
| 416830fb59 | |||
| 07b1bc2e88 | |||
| d16b3b2487 | |||
| 74d0b4cc78 | |||
| 8832a9dbd5 | |||
| c55613ccf7 | |||
| 6c399aa62a | |||
| 5862b50217 | |||
| 5696629b13 | |||
| 3a15152be5 | |||
| f1055a7e91 | |||
| d4dc6b509b | |||
| 1192779d05 | |||
| 2eb7bf4cfa | |||
| 71a1150c95 | |||
| e14ca39fd7 | |||
| 421ba8730a | |||
| 0d56524b72 | |||
| 9fded9ca53 | |||
| 441624a5fb | |||
| 25ac77e010 | |||
| 77d887898d | |||
| a32f2cd24a | |||
| eb68de9268 | |||
| ed3810f7a5 | |||
| 1c3e287d32 | |||
| 5044af69d1 | |||
| bc6544c0bc | |||
| a462f49b99 | |||
| 7622fbf895 | |||
| 3f371fe2dd | |||
| a423b07149 | |||
| 6ca205a029 | |||
| aba2167d9c | |||
| 5db4f1f7df | |||
| 2407ab4e61 | |||
| a0a8d2160d | |||
| 2a5da50902 | |||
| 51758b2dd6 | |||
| 90b144cf0a | |||
| 529bd0425e | |||
| 6c36cd5d6e | |||
| c102720af4 | |||
| c63a6c472d | |||
| 5b3f721efa | |||
| e5bea2bde4 | |||
| e9d64e0a8c | |||
| f0df78b7e7 | |||
| e93d976d00 | |||
| 64aad34cb4 | |||
| 7592d58f0c | |||
| 08906ddd4b | |||
| d21761c0fd | |||
| 277ead95d9 | |||
| a9d98bfb34 | |||
| 5d14cc68b7 | |||
| ce80e0dc57 | |||
| 4c74e6d89d | |||
| 45d04175d4 | |||
| 687c9b7b29 | |||
| d9f66413ee | |||
| 1b1bbe4262 | |||
| 3edf7c25d4 | |||
| 54531f8e3b | |||
| b5a68f235a | |||
| 5bf64e7dfe | |||
| 51b897b672 | |||
| da4ac6b7ef | |||
| 1ba0984203 | |||
| f5e852cdf0 | |||
| ef2677b0a6 | |||
| 2aad039b4f | |||
| 8a90948a1c | |||
| 63bff33e85 | |||
| 21133a2091 | |||
| 39f995e319 | |||
| d976272d23 | |||
| 91624e87ab | |||
| 11d492b0b9 | |||
| 17f2b56291 | |||
| d1d8ac57f3 | |||
| b418eb112c | |||
| ee9137f176 | |||
| 903bf0147e | |||
| 540aa13300 | |||
| bbbf1168dc | |||
| 18fbb72f7d | |||
| 0b5fd4f6bb | |||
| 87360c2ae5 | |||
| 17b98dd005 | |||
| 1293e99ad8 | |||
| 028d4d83d3 | |||
| be670e168a | |||
| b619477be9 | |||
| 778faddbd8 | |||
| f644634aa6 | |||
| 547f4c2c5a | |||
| 5462a6be6e | |||
| a60496f9df | |||
| 7e3d56e2ff | |||
| 733fb673c8 | |||
| acd8d3a617 | |||
| a09bb3c2f6 | |||
| 0c92305a4b | |||
| 1ecfff0fa0 | |||
| b00ac7b07a | |||
| d933034ad4 | |||
| a6fadfe1c2 | |||
| 95ab8517ae | |||
| a1820ff3d4 | |||
| 097b0245da | |||
| 52d82bb44a | |||
| aae317c017 | |||
| 37683aca56 | |||
| 22f8fb4d5c | |||
| 8b7e586faa | |||
| 7d1589d407 | |||
| b35018d955 | |||
| c29a3aa0a0 | |||
| eae5fd81e5 | |||
| 23edec83fb | |||
| e4cd430710 | |||
| 35b2cff295 | |||
| 8e5f37f87c | |||
| cee8c86b6e | |||
| c0a84dcc85 | |||
| e80b443cd9 | |||
| e309a06b47 | |||
| 86dad3aebe | |||
| 5a9fe9dedb | |||
| c7d24c0fb3 | |||
| 5d292826b2 | |||
| f378f02954 | |||
| c8561eae2d | |||
| ba575fd4ad | |||
| dd14cf6a9c | |||
| 2c81cb2f76 | |||
| 6eb34716b8 | |||
| 8358efaca1 | |||
| 3aaa9251e9 | |||
| 871bc98933 | |||
| ec7fc5adca | |||
| c0c3f4cbac | |||
| 02143cd0e2 | |||
| 1c5dcbcac8 | |||
| d24d8f2abe | |||
| 584ea43b2f | |||
| 292f62c5cc | |||
| 762481411d | |||
| d816442e4d | |||
| ea5ca16036 | |||
| 2991717191 | |||
| 0fa43e3aac | |||
| 085fb78e85 | |||
| a565aa6db9 | |||
| 2763f988da | |||
| 6c2eba2877 | |||
| 82ac7ea236 | |||
| f89dee4f3e | |||
| 70779d4e66 | |||
| c0ecf08ca0 | |||
| 35f43cc429 | |||
| 67be6a334f | |||
| cfafd0493c | |||
| 9119692bb8 | |||
| 8b0aa6a64d | |||
| ec26541771 | |||
| 1c825dd509 | |||
| d9eff7daeb | |||
| 3419e64dcf | |||
| 1e2ceca4df | |||
| 347246901e | |||
| 68bd156a71 | |||
| 9821fae59d | |||
| 43b2bb2c25 | |||
| a3ebafbdeb | |||
| 5b97f6abec | |||
| 5cd07006f6 | |||
| 3d350a002e | |||
| f18b8cd569 | |||
| 5389d9e0d4 | |||
| 07c795408d | |||
| 07b62376af | |||
| 5f50e7bafe | |||
| e92716a1b6 | |||
| bbcc1752b1 | |||
| 40ae06091d | |||
| d480e2e51b | |||
| 839321642e | |||
| 9f88a65873 | |||
| b77330bafc | |||
| 4a4b2a0ce6 | |||
| 0ae126d3b8 | |||
| af9332dfaf | |||
| 4103567776 | |||
| 8f0edf6a1c | |||
| ab5279f4ad | |||
| 1113c9ab10 | |||
| bf5d7c0c10 | |||
| fef8d4c990 | |||
| 5a0c85b3ef | |||
| 9fd877acc9 | |||
| ed3b56d763 | |||
| 2f79b1b087 | |||
| 7208f63221 | |||
| 572d4f4491 | |||
| 0cd4396180 | |||
| aafb7567c1 | |||
| 468431cd8f | |||
| cf5db9b94f | |||
| 589b6c15f0 | |||
| 2af0813634 | |||
| 15d2a5faf8 | |||
| b1d28d5b4a | |||
| a6fbd8287c | |||
| b0b77b3047 | |||
| 96844b0ca5 | |||
| 7fc6146973 | |||
| 6cf0910842 | |||
| 692c536ac5 | |||
| 1646a21197 | |||
| 4557971481 | |||
| 8baf46c0a8 | |||
| 0c0083ba72 | |||
| d18362c726 | |||
| b403d37267 | |||
| 2d189e24ee | |||
| c8c29b0f1a | |||
| 784dd55d88 | |||
| adb916ce82 | |||
| 15cfafb360 | |||
| d43cb4fe7c | |||
| 38c9c20a35 | |||
| 935acc500f | |||
| c189f31f23 | |||
| cbf43a54fb | |||
| 2918071a3e | |||
| 1829eba584 | |||
| 3a64607d94 | |||
| 64649a1207 | |||
| 4dfbbabf8b | |||
| 72f1ce6550 | |||
| c34c4b50d0 | |||
| 4521d66103 | |||
| 0c238c9e72 | |||
| 3d9f27b877 | |||
| 50e66a2e53 | |||
| a682f02f59 | |||
| df24bd295d | |||
| 04ebedb6f0 | |||
| 71ae1cac5f | |||
| e0b21dccf1 | |||
| 3857173845 | |||
| bfeeb0ad70 | |||
| 2273af0166 | |||
| 604192337f | |||
| 752e5fdc26 | |||
| ccfc34b13f | |||
| 3f4abcb228 | |||
| f2ccce23f3 | |||
| 7d96ef2671 | |||
| 2882725927 | |||
| 062cee2933 | |||
| fcf9f117b0 | |||
| 0f1cb5ad7c | |||
| 0ab4872032 | |||
| a6274647a4 | |||
| 65f71ce2eb | |||
| 6aefb8e86f | |||
| 4aef9b1c93 | |||
| 0ac67ee8d9 | |||
| 520bf4697e | |||
| f92a1aa07d | |||
| 66b3155a48 | |||
| b3adffe437 | |||
| ec92f3fefa | |||
| fb85a83108 | |||
| 41ef2bfb16 | |||
| 1ae801554d | |||
| 65998d8076 | |||
| 45a7b71cac | |||
| e1e9261450 | |||
| 819e5b19b3 | |||
| 44d6872837 | |||
| 9ba4bb7355 | |||
| a3cb2020bc | |||
| a6017ac550 | |||
| 7faeb82585 | |||
| 48e50a7674 | |||
| dc9d775f88 | |||
| 66cbb7b911 | |||
| 9ca3a3139a | |||
| 6fb465cb4e | |||
| 8ae03fcd6e | |||
| 122250b554 | |||
| eb8883160d | |||
| 8af4fe9ed3 | |||
| adb5971494 | |||
| 377fdf5ae5 | |||
| e1272d73fe | |||
| e3e61078a5 | |||
| 13823f117b | |||
| 2e15582799 | |||
| 65bdb3a544 | |||
| ac91c45b0f | |||
| 6481cfd048 | |||
| 0f6b01a531 | |||
| 364b3f181d | |||
| 04849f26b2 | |||
| 26a7647e0e | |||
| 8eb036fb3c | |||
| fce8349c99 | |||
| 5ea912e778 | |||
| c2c8da2517 | |||
| 1be40554af | |||
| d717de5719 | |||
| bcc19a622d | |||
| fb3fc5322c | |||
| 2eff70fbf4 | |||
| d885242b61 | |||
| 46d988e2cb | |||
| 7a5122121b | |||
| 7fc14504b1 | |||
| cb1a1e9a51 | |||
| 619e038de9 | |||
| 4154bd0667 | |||
| f199cf91f3 | |||
| b1020639f1 | |||
| 5408949951 | |||
| 866191478f | |||
| c9060b053d | |||
| 9dc844a6e1 | |||
| e2a9cff3dc | |||
| c3b83b8354 | |||
| e24382691f | |||
| 9074b3e980 | |||
| 65d66a05dd | |||
| 7de7891c4d | |||
| 4bec43cf79 | |||
| 6cc0107693 | |||
| ca7f964104 | |||
| b26fc6f31b | |||
| 8bfb419b0f | |||
| 5fa624f35e | |||
| 7955469f7c | |||
| ce62fc8371 | |||
| 2e40b7f113 | |||
| 2ac62bccec | |||
| a8b4ffac50 | |||
| 8a43956a1b | |||
| bfc4bdd9d0 | |||
| 96e2d32618 | |||
| 487619e5fe | |||
| 22eb91a7e0 | |||
| 448e3a7e58 | |||
| bf54a370e5 | |||
| 337452b4c0 | |||
| 5bb098ba5d | |||
| 4159842195 | |||
| b69b1eae8f | |||
| c4a6e1fd4d | |||
| 3456d28cc2 | |||
| f376bfe95d | |||
| a72074b33f | |||
| 5185544864 | |||
| 7834a465d5 | |||
| 1f0bfc8d83 | |||
| a122f0f248 | |||
| a31fb88fd0 | |||
| 70fb1cd603 | |||
| d2c48b898c | |||
| 2d837efba7 | |||
| 1852d0b9b8 | |||
| 837e41f9a7 | |||
| 1fd45a1b85 | |||
| 2cd7e17b65 | |||
| 8eb4f72531 | |||
| 2619099fe5 | |||
| 2959286eb5 | |||
| a4b191a7e0 | |||
| 3929e26276 | |||
| a1d5565e65 | |||
| 9638e34ab0 | |||
| ed9d4c0b2b | |||
| bb64db98d8 | |||
| 88115811a9 | |||
| 67fa8a2f47 | |||
| 560eba91e5 | |||
| 42561e1233 | |||
| 7e2c8cc9f4 | |||
| eea05f5078 | |||
| 7eaec9dd22 | |||
| e1305e8d05 | |||
| 2dd3408caa | |||
| 3651831e7e | |||
| a1d752bfc0 | |||
| 335d7bd16e | |||
| 3a02561c40 | |||
| d10832074e | |||
| eb571b500b | |||
| a001ab3a44 | |||
| 505bbab75b | |||
| 3cf3e3f6f7 | |||
| ef570e4e13 | |||
| 232a83ecb8 | |||
| 7831aae5dd | |||
| 1336da9450 | |||
| 6432f02996 | |||
| 1fb8d60fd2 | |||
| 5e92bf8e41 | |||
| c25f776151 | |||
| 7e5d012f75 | |||
| 925ff6241f | |||
| 48c10620cb | |||
| e14c3cff85 | |||
| 984e42b0bc | |||
| 0702685e7e | |||
| 7deb8f568f | |||
| d8434e6875 | |||
| b9a1039566 | |||
| 03130548ea | |||
| 11c5a6bb4d | |||
| 8dc332721f | |||
| 189f647264 | |||
| 56baf4ed87 | |||
| 7ffb103758 | |||
| 9fcf015214 | |||
| 27bfab4e6e | |||
| ffccfa2ee9 | |||
| d3dcef4b8b | |||
| 3cd36ebc7b | |||
| 2ebdc04787 | |||
| cc8add9f66 | |||
| c2c539e3cc | |||
| 0cdff46725 | |||
| d0d115321d | |||
| 99683e958a | |||
| f572ae3474 | |||
| e65ad44b32 | |||
| 3d8614cb47 | |||
| d09cc0f30c | |||
| 80c82e10aa | |||
| 2fb652ce09 | |||
| 1bab920cf5 | |||
| bb71cb200e | |||
| 48afe1586a | |||
| e7e814fa8c | |||
| 496eed950f | |||
| f0d29cd33c | |||
| 75bb6aa9a1 | |||
| 44b2f9637a | |||
| 0643165519 | |||
| cde18648dc | |||
| 04e01e2b31 | |||
| 348b7383f9 | |||
| b2b7193374 | |||
| 47a59d72c9 | |||
| 163770f99a | |||
| 4c1e064a2b | |||
| 88555948d0 | |||
| 1893b37e23 | |||
| c3cbd302cb | |||
| 2ffa7ac0da | |||
| 885a446b10 | |||
| 8bfe620fcc | |||
| 99d216c8d4 | |||
| 129319b0bc | |||
| 7ce83f2a95 | |||
| 4b05765174 | |||
| 3390da6beb | |||
| 50707a2741 | |||
| 0614c40b42 | |||
| facd07a732 | |||
| 26ac81df3e | |||
| 1ec10ca565 | |||
| a2593a392f | |||
| 26a39c733b | |||
| 15f0e2e7cb | |||
| d4640f4647 | |||
| 4c9364a803 | |||
| e951edeed3 | |||
| e7a787aa41 | |||
| 500e24d6cd | |||
| 4c1f9fb042 | |||
| 759cbd7486 | |||
| 57545653b1 | |||
| 3c5377ca1b | |||
| a89868928b | |||
| 5bf3991f55 | |||
| 08696d92ea | |||
| 2c2466fb25 | |||
| fc3e393516 | |||
| ebaf8cc06c | |||
| 0862d69a6e | |||
| b8106e4ba4 | |||
| 869123d6f9 | |||
| 02d864070a | |||
| 0b34d90dfa | |||
| 7bdacb8098 | |||
| d4e28f27b7 | |||
| 6ce2f1316f | |||
| 294348939b | |||
| e2db95184f | |||
| f8597fc150 | |||
| 85b0b0cd77 | |||
| 2bd72af2ef | |||
| f729202272 | |||
| 47f30a04d2 | |||
| 638a0788fe | |||
| a42b35598e | |||
| db53f4533e | |||
| 7ea095cc38 | |||
| 71e33265f5 | |||
| a016f6022c | |||
| 3e3b53f815 | |||
| e2bfe0ce76 | |||
| 98c33c605d | |||
| b3269b08a1 | |||
| e59cff47d4 | |||
| 47912431e6 | |||
| 0ef803950b | |||
| d2603cbf94 | |||
| 3c23a44786 | |||
| 701d0d9905 | |||
| d4e1d89901 | |||
| 14aa9eaadd | |||
| 1feabf4275 | |||
| c2ab4c052d | |||
| 65c173f2a3 | |||
| 697acf7f6a | |||
| ed69bcae2d | |||
| 728545468c | |||
| 33b1e76e48 | |||
| 1d134025a5 | |||
| 96a9cfab36 | |||
| c9e10e1d0b | |||
| 60846b2b7a | |||
| 6fe7886e2b | |||
| 199c2d2fd0 | |||
| bd54ba911d | |||
| a9354fc743 | |||
| b4b69ae484 | |||
| 1c7b71bf9e | |||
| 1377f0147e | |||
| d2b1e38207 | |||
| 5acf351e4b | |||
| 9ffb67478f | |||
| 1dee848d3e | |||
| afe1c70f2d | |||
| 1b8fba8e26 | |||
| 45fbb67aba | |||
| 914005174f | |||
| 2a82467a6f | |||
| a233232b7d | |||
| ed4bf13960 | |||
| 3135063100 | |||
| 87ef6a9cc1 | |||
| ff31f90b7e | |||
| 2b2ba534e2 | |||
| 3635b3dee7 | |||
| fa613e393f | |||
| 7d3dbcb027 | |||
| db70676933 | |||
| b3b235ebc0 | |||
| 70492c2127 | |||
| f562264674 | |||
| 0a88f84847 | |||
| 139c443770 | |||
| a630ad73cb | |||
| 366e8217c2 | |||
| 01226cb8ac | |||
| 3891b72f33 | |||
| a80fcacd90 | |||
| c54ccaac31 | |||
| 79731cb0ff | |||
| 16b5fd4bf2 | |||
| 8d38922571 | |||
| fb9463c55f | |||
| 2920a8e0ec | |||
| 6a4c3b61e6 | |||
| 6360c3bf46 | |||
| e313603aac | |||
| 0f3de805f4 | |||
| 3bf22d0024 | |||
| 66567933d7 | |||
| 56e19e3494 | |||
| d2f5a10f5d | |||
| 32bb4fa950 | |||
| ee8b414a1e | |||
| 8ae06b4648 | |||
| 652396678d | |||
| 59b870a87a | |||
| 0f067fd0a6 | |||
| b91f173680 | |||
| 75a8e3e956 | |||
| 3c3eba868a | |||
| 2ae7438c6b | |||
| 2b767f9bc8 | |||
| 9c78dc2490 | |||
| a311d1bdc0 | |||
| 94e5ae6043 | |||
| fd14b959cf | |||
| 492d9dba1e | |||
| 44c0b58258 | |||
| eb7add1828 | |||
| b152b8cbcd | |||
| 2336b0706d | |||
| 300b57dd70 | |||
| 6b2d1033bd | |||
| 162bd5be4c | |||
| d56e8f053f | |||
| 0769bf416f | |||
| 90f2e1f8b5 | |||
| 2a4926f417 | |||
| 5e1c9099e8 | |||
| 397e9bc8d6 | |||
| 2366f2cb2e | |||
| 35f1a90df7 | |||
| 9faefa0c96 | |||
| b5adffd5c2 | |||
| 82010bf5c1 | |||
| 6234f01a6d | |||
| bf8f7b4e57 | |||
| 4e1ce3e0eb | |||
| 770c0d1416 | |||
| c12d4c82df | |||
| bee410c748 | |||
| 44c2519d75 | |||
| ef94275eb6 | |||
| a6ca48a1c2 | |||
| 24a66a44bf | |||
| 2411b825b4 | |||
| dd7b9000ad | |||
| f1328c7395 | |||
| 9d06e58c3c | |||
| 711b136191 | |||
| a04f9e7a59 | |||
| db5b22e895 | |||
| 0d52c37e11 | |||
| 734e309b3e | |||
| 3efc645975 | |||
| 572812217b | |||
| 83cfeb9f14 | |||
| 008507327c | |||
| 66fee4a8d2 | |||
| f4a6c3e7ea | |||
| ff41fbc5c1 | |||
| df490c6399 | |||
| cac864192c | |||
| b19683eb41 | |||
| 7a46d7efde | |||
| d09bd6f862 | |||
| 7676be5570 | |||
| ed9524e125 | |||
| 533bb035cf | |||
| dda2e9374b | |||
| 14754deb21 | |||
| b0dc474160 | |||
| adf89bbb33 | |||
| c103b63fe1 | |||
| a3d0882317 | |||
| 583bd1a6e2 | |||
| 53eda42da7 | |||
| c26c4a61c6 | |||
| ea2527c2d1 | |||
| 65fcf22670 | |||
| d0572538ff | |||
| 3577265508 | |||
| f28e191d70 | |||
| 38b6c44b4c | |||
| 1a24e316d5 | |||
| 9da9e8244b | |||
| 8d51ef0f35 | |||
| 9cfae823a7 | |||
| d6151eae23 | |||
| 4a0a3281c6 | |||
| 1230075011 | |||
| 7459954377 | |||
| cf38098ba8 | |||
| 8ca394efaf | |||
| f9c7931800 | |||
| 24547f40ff | |||
| 72debee125 | |||
| a3d6994afa | |||
| 08c270f65a | |||
| e585453c2e | |||
| 86f4524010 | |||
| 6d098cc230 | |||
| 434c96e625 | |||
| d6e9616256 | |||
| e9187ae38c | |||
| 978dc76653 | |||
| b409fd32ac | |||
| a2ad997e97 | |||
| e9428726ca | |||
| 400906b433 | |||
| 50d7c61c01 | |||
| d9bf522b27 | |||
| 93dc0679ec | |||
| b06544bd54 | |||
| 1ddc51cfd1 | |||
| 50bf0e10f5 | |||
| d1ccb7e47f | |||
| 6a22c5b2b5 | |||
| 6e9ab70359 | |||
| 7e845a3b87 | |||
| ea1c970190 | |||
| 3d207ccf11 | |||
| 2f65a1b501 | |||
| aaf7f5ae02 | |||
| 50e8ad285b | |||
| bb5462e327 | |||
| df2e7fa6eb | |||
| 11f36bdf9a | |||
| bc0d4585b3 | |||
| 8b3d2a57ad | |||
| 70917f291c | |||
| 9f6f0c7424 | |||
| 4722a8df3c | |||
| 7be8a71c60 | |||
| ce859edba8 | |||
| 90820cd044 | |||
| c929f1b62f | |||
| ff88132620 | |||
| 89f8d4ae12 | |||
| 3f4ffe7844 | |||
| ed567a2dd1 | |||
| 22a00036e2 | |||
| 2aac0a5a26 | |||
| 07ad6a437e | |||
| d9a444ca1a | |||
| 766f58ed7e | |||
| 1099b4c881 | |||
| 7c0f49fc36 | |||
| 761e796201 | |||
| 8d0fbc6a1e | |||
| a99b4071a2 | |||
| affcea8822 | |||
| 53f0be00a9 | |||
| 602caa9cd6 | |||
| f35ec8c955 | |||
| 1316491e50 | |||
| 2cc4309bf8 | |||
| 612d43f284 | |||
| 56824d1769 | |||
| 2238ac7d59 | |||
| 2b5b192cd7 | |||
| 64e1d23cba | |||
| 40d2904f3d | |||
| 9712cc479b | |||
| 0ef1fb0b67 | |||
| 2b67bc448d | |||
| a3f81b79ed | |||
| 8d0dae4cec | |||
| dda96264df | |||
| 4af8e5c5c4 | |||
| eff5605be5 | |||
| 2b53ab23c0 | |||
| 2010de9104 | |||
| 280a99b3b6 | |||
| 646025589b | |||
| 4502003e61 | |||
| 07abb6240e | |||
| dea0815199 | |||
| e4ed2d2e42 | |||
| 627e6a0447 | |||
| c8228e5789 | |||
| 667e5e4f89 | |||
| ada703a73a | |||
| 2b8094f915 | |||
| 9e1e960116 | |||
| 82ae9ef541 | |||
| 1b07274e34 | |||
| 15ac54d5d6 | |||
| 1cdd8510fd | |||
| 039f3d01a0 | |||
| f63feea05e | |||
| fbac38d98b | |||
| ca2ab3387f | |||
| 64ded50bbf | |||
| d44ac61033 | |||
| 18ada77d8a | |||
| 6d0f1275c2 | |||
| a848eccfc6 | |||
| 2402fa4824 | |||
| 6bffbe4938 | |||
| 2bf4135afc | |||
| c677f132cd | |||
| ec4015d73c | |||
| 8c42dbf71c | |||
| 4ca679180d | |||
| d5c45116cd | |||
| c4c47d91e4 | |||
| 64da959619 | |||
| 08c268bfc5 | |||
| 88123e2512 | |||
| 87e98e8788 | |||
| 0fbd58bef9 | |||
| 767857c516 | |||
| 2b60166e5c | |||
| 2e41db39f5 | |||
| a55fa8389e | |||
| d23142027f | |||
| 438fe3f9db | |||
| 5cc154147f | |||
| 9cd5a0a1e6 | |||
| 2958142e31 | |||
| 27c15bed60 | |||
| 2985739b8c | |||
| 2465d93330 | |||
| 556d211136 | |||
| 0ee2a58cdc | |||
| 7daf84fb44 | |||
| 9aff01c9a9 | |||
| a2b84e9897 | |||
| 66f3c2673c | |||
| 554d08c3a1 | |||
| 3a595ea5c4 | |||
| 03c9648f2e | |||
| e3a55af336 | |||
| be4a432bea | |||
| 0d32a24cba | |||
| e36948cfbc | |||
| 9aa647068b | |||
| 092030c1ca | |||
| 0bd261ded4 | |||
| 7ed557497d | |||
| d793ec2ffe | |||
| 271f7df343 | |||
| 08d44f588f | |||
| 84b4a5a495 | |||
| 3d12581798 | |||
| b2e20a82ba | |||
| 1b3a06a02a | |||
| 91a5e75151 | |||
| 4754b0e253 | |||
| 84b517f5a0 | |||
| 8ac88cf069 | |||
| 13a995cc1d | |||
| a93fb52632 | |||
| 4d927e73f1 | |||
| 38228709c8 | |||
| 38788a3161 | |||
| 46b6973c05 | |||
| af2b7708a8 | |||
| a233982931 | |||
| ed1439fbc6 | |||
| b379b67a32 | |||
| f3945fbddb | |||
| 8b44ee2ce1 | |||
| 7b582b71ba | |||
| 4e8c507276 | |||
| 9390c56831 | |||
| abebbf04b1 | |||
| 5e434073d4 | |||
| 3e4a566e46 | |||
| 6f5cf8c15f | |||
| b687bc807a | |||
| 5440fd6cb4 | |||
| b060151625 | |||
| be38d4ea93 | |||
| 56f21c4fd5 | |||
| 386df457a9 | |||
| e4abf6e723 | |||
| 1339ebaa84 | |||
| c9b90884da | |||
| 9b2b2c88df | |||
| e5bdab0355 | |||
| 4d46958c82 | |||
| 9dd8e4df7f | |||
| d98e07c3d3 | |||
| 78bc11465b | |||
| 8e8e4bbabc | |||
| 90671233c6 | |||
| 12bae51384 | |||
| 7b848e215f | |||
| 21872e2fb0 | |||
| 2a218b96c4 | |||
| e76cda6923 | |||
| 9d16612a9b | |||
| 63c865ace6 | |||
| 0a62de0d4f | |||
| 593996216f | |||
| 4eae23a2cc | |||
| f3699b5ac8 | |||
| 9ce0e51305 | |||
| 4c79318694 | |||
| f7ac724c5d | |||
| ee9fe1239a | |||
| b6b5c27cec | |||
| 632e07b749 | |||
| 48cd2d190f | |||
| 685797f403 | |||
| ef6f421f89 | |||
| e0ffd3e8a5 | |||
| 0d16b5fc38 | |||
| ac8a27cba9 | |||
| e5f2a8ebf2 | |||
| 54733eba6f | |||
| 93353aea70 | |||
| e16cb8b4a2 | |||
| 5bf3c1df24 | |||
| 419918076e | |||
| fb768c420d | |||
| eb067fee55 | |||
| 6390b50d6e | |||
| 5d8134ed32 | |||
| 852904e1a4 | |||
| a120adde63 | |||
| a80af177b6 | |||
| 8db7d435b9 | |||
| 901e0ddfe4 | |||
| ecb30409f6 | |||
| 44c2c77548 | |||
| 5be5efdacf | |||
| 057c3da82a | |||
| 8fa429caef | |||
| 87f526d82f | |||
| 1ae2320e09 | |||
| 54693cf7b1 | |||
| a082375d57 | |||
| 9c7adb7248 | |||
| ccebbbc0ac | |||
| ebb6915e58 | |||
| 5cc27fd3b5 | |||
| a332509e02 | |||
| 375fe81311 | |||
| d354ad1c34 | |||
| 119d8b3aca | |||
| cd9edba26f | |||
| 8f1c502d2b | |||
| aa5055261f | |||
| 899b4d1452 | |||
| 92312fbc0c | |||
| 2efcaa9e8e | |||
| aa53541235 | |||
| b863c25d21 | |||
| f77c3574af | |||
| f5105bac65 | |||
| 5a86592e93 | |||
| 2c83cfc14c | |||
| 863546e125 | |||
| 9198e30688 | |||
| e5d648d2d0 | |||
| 1890157faa | |||
| 0898f372b1 | |||
| 9c87d8bf9c | |||
| b9e5256cf9 | |||
| 6b6d89b911 | |||
| d3e0193c8a | |||
| 31881209d6 | |||
| 5c7e893393 | |||
| 3c814ebf87 | |||
| 5cf1dca36e | |||
| 12338c1dc4 | |||
| 5b23752205 | |||
| 4e53f301d8 | |||
| 2b7803dbac | |||
| 446a278f3d | |||
| 0047d3f81a | |||
| 4e1f17d65b | |||
| f9b1dbe2ac | |||
| a251474144 | |||
| 8d88bb06b2 | |||
| 9f2ff3ed22 | |||
| 45cbf70265 | |||
| 59e16b88ae | |||
| 33f219dfe6 | |||
| 44db2eea70 | |||
| 12ab54648c | |||
| 19926e2979 | |||
| 1620a1e014 | |||
| 888546b6f5 | |||
| 3215db26aa | |||
| 76aff84788 | |||
| fc28ba3156 | |||
| effce0573b | |||
| e8db363431 | |||
| 9603b6877d | |||
| d5ecb5ff5a | |||
| dae73938e8 | |||
| 619b6dfae3 | |||
| 8f9c36b730 | |||
| 3eeec4faae | |||
| 972a4b95b6 | |||
| ffee1a4126 | |||
| 96e23c2ff6 | |||
| 08356007c9 | |||
| 4ba2b05df8 | |||
| 5064b6f747 | |||
| 57d3002ee1 | |||
| a00a0dbfcd | |||
| b41d2c5c14 | |||
| 1da48beeec | |||
| b57ff73086 | |||
| 67978b5746 | |||
| 062f305d1a | |||
| 1f70d4e2a5 | |||
| aa5bc20c83 | |||
| 09af10f635 | |||
| 4d7953aa56 | |||
| 46e1560678 | |||
| 4d0148b417 | |||
| 1605d1d24d | |||
| 5190043e56 | |||
| f66a2ffa1e | |||
| d1e76a34a0 | |||
| 5b3d5f9f3c | |||
| 415a42f327 | |||
| 09f6e55338 | |||
| a351e05a17 | |||
| d37bcbdc92 | |||
| 437af37b13 | |||
| c62367612d | |||
| a92cba8484 | |||
| 5f7d922b10 | |||
| dc29632d4e | |||
| f4a7754cc0 | |||
| 6811d3d80b | |||
| 245f6273bd | |||
| 870c8d3c4e | |||
| d573472a86 | |||
| 441b6dbda0 | |||
| a7e6a1059c | |||
| 85719a0a5d | |||
| b5b52afd35 | |||
| dc35633aa4 | |||
| 9e3ba487fa | |||
| aee8425b68 | |||
| 94229bb262 | |||
| 1f6444fbea | |||
| 439ef6447d | |||
| 9cab808c5d | |||
| d41fcf7345 | |||
| ac51ba38f9 | |||
| ef85b24a78 | |||
| d88730685e | |||
| 16661847a7 | |||
| 7f782a1a24 | |||
| 9188ce68aa | |||
| 2b79a6ff8f | |||
| 70b0274c8e | |||
| 83ce1de8e7 | |||
| b1d484f827 | |||
| 123519165d | |||
| 30ff9c6775 | |||
| 906f5f7e96 | |||
| 9238316cf1 | |||
| 5e89b9a455 | |||
| e3a4ff33d2 | |||
| 5d9ea394ba | |||
| abb5c9fd92 | |||
| 266835cd2e | |||
| 92af03579c | |||
| 2e20f2b89f | |||
| e67593673f | |||
| d1b533d399 | |||
| 2647902fee | |||
| 574320ec3f | |||
| 3f2377017c | |||
| 2b5bb02817 | |||
| 302d14adef | |||
| 0a0714bd1b | |||
| b796ededae | |||
| f811ba8777 | |||
| eb7b45d26b | |||
| 17b2d92a3d | |||
| 22f0bcaf8f | |||
| e61277002c | |||
| ca5258f140 | |||
| 8f4473b3e3 | |||
| 51e8af9e5f | |||
| 82818e7324 | |||
| 6ae8103022 | |||
| eca2d92791 | |||
| 6778e19710 | |||
| 25f25275cd | |||
| 7e746ad2a6 | |||
| 6ffa2b01e1 | |||
| ed6ca0d7fa | |||
| 8e2a3c1d2f | |||
| 7f6dcc2745 | |||
| 76e34d6f2c | |||
| e613b17c05 | |||
| 5ba9a089e1 | |||
| f2d5d6d24e | |||
| a1ec4ea3a9 | |||
| 0fe7420638 | |||
| b304730225 | |||
| 4801526f35 | |||
| f1857030b5 | |||
| b5b3f4e1c6 | |||
| 172bb7887c | |||
| 60228d30d1 | |||
| 9592537840 | |||
| 8768a80242 | |||
| d5f73f89d8 | |||
| 19bbe6c67d | |||
| aebb65e983 | |||
| 5e327af327 | |||
| bc1f8813c2 | |||
| 80d9f624d0 | |||
| e9c46f38fc | |||
| ecfbaa267d | |||
| c25fd3349b | |||
| c3e27bcf87 | |||
| a5894f3e6b | |||
| 4db3a388dd | |||
| 6fd1a2ef52 | |||
| fe2a259eb1 | |||
| 1ba7c2f276 | |||
| 649f747f8a | |||
| 05dbaf7672 | |||
| 742a08229e | |||
| 5602d2c7bb | |||
| f3e0479a8f | |||
| a1143c4ea0 | |||
| 0314d1dd01 | |||
| 751b3f502d | |||
| bf5e09d5ab | |||
| 14e4a10312 | |||
| 53b89e1ee4 | |||
| 370f878a36 | |||
| 2c2d7774b9 | |||
| 6e4d61c1fd | |||
| f6fe5c07f6 | |||
| c685293297 | |||
| 0e6a2c0491 | |||
| c2209ad5e4 | |||
| a0d5277e0d | |||
| 80c5d18f9c | |||
| 5f249a3e67 | |||
| 76fb3652fc | |||
| 92925e846d | |||
| 43c04c29ce | |||
| 06b74c87da | |||
| 7f075b0b15 | |||
| c5a86c22a4 | |||
| 3621c6234c | |||
| 7d05f92855 | |||
| 80c2fefc43 | |||
| a47952146a | |||
| 9d6f388809 | |||
| a55950865e | |||
| ab181ac329 | |||
| db172d1053 | |||
| 523c3cd50b | |||
| 631126c77a | |||
| c68fec7e97 | |||
| 9c61d80bc4 | |||
| 4d9365990a | |||
| 5714868726 | |||
| 196e6aaa50 | |||
| b167115b5b | |||
| 5d04e5b063 | |||
| 6ab4659840 | |||
| 0cf0a5e9d4 | |||
| 4f0fe1de96 | |||
| 1470f90c2a | |||
| 6544c7b787 | |||
| fce4a19d0d | |||
| 7ba26ada12 | |||
| 91a7a4523a | |||
| 8c7dc1f6b7 | |||
| 14dedda023 | |||
| 19116471fe | |||
| bae9cef0b5 | |||
| 6b199bd1bb | |||
| ee893a08ef | |||
| 7a5f554bc4 | |||
| 4dc811946d | |||
| 5c0ac37163 | |||
| 958d3e8c60 | |||
| eff6d32337 | |||
| b91e0dca90 | |||
| b754406352 | |||
| fa73b91e39 | |||
| c105402dfc | |||
| fc628014bb | |||
| 4e691587ef | |||
| 263de1f86e | |||
| 703dea4817 | |||
| 178240ccf1 | |||
| c073e09956 | |||
| 71be47e04a | |||
| ed8696566b | |||
| 9668831c13 | |||
| 89e059d8ac | |||
| 6d06368760 | |||
| 65b0383059 | |||
| d6c699c014 | |||
| 9d2eabaaa2 | |||
| 3268cc46ba | |||
| d42665d9e2 | |||
| 1088d95c50 | |||
| 2ee9d21dae | |||
| 690725980c | |||
| d0310c2a6a | |||
| 9794ff1398 | |||
| 53e6a25b6f | |||
| 61d7d67c39 |
@@ -0,0 +1,3 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: opencv
|
||||
@@ -34,11 +34,11 @@ This is a template helping you to create an issue which can be processed as quic
|
||||
- [ ] I report the issue, it's not a question
|
||||
<!--
|
||||
OpenCV team works with forum.opencv.org, Stack Overflow and other communities
|
||||
to discuss problems. Tickets with question without real issue statement will be
|
||||
to discuss problems. Tickets with questions without a real issue statement will be
|
||||
closed.
|
||||
-->
|
||||
- [ ] I checked the problem with documentation, FAQ, open issues,
|
||||
forum.opencv.org, Stack Overflow, etc and have not found solution
|
||||
forum.opencv.org, Stack Overflow, etc and have not found any solution
|
||||
<!--
|
||||
Places to check:
|
||||
* OpenCV documentation: https://docs.opencv.org
|
||||
@@ -47,11 +47,11 @@ This is a template helping you to create an issue which can be processed as quic
|
||||
* OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
|
||||
* Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
|
||||
-->
|
||||
- [ ] I updated to latest OpenCV version and the issue is still there
|
||||
- [ ] I updated to the latest OpenCV version and the issue is still there
|
||||
<!--
|
||||
master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
|
||||
OpenCV team supports only latest release for each branch.
|
||||
The ticket is closed, if the problem is not reproduced with modern version.
|
||||
OpenCV team supports only the latest release for each branch.
|
||||
The ticket is closed if the problem is not reproduced with the modern version.
|
||||
-->
|
||||
- [ ] There is reproducer code and related data files: videos, images, onnx, etc
|
||||
<!--
|
||||
@@ -61,9 +61,9 @@ This is a template helping you to create an issue which can be processed as quic
|
||||
to reduce attachment size
|
||||
* Use PNG for images, if you report some CV related bug, but not image reader
|
||||
issue
|
||||
* Attach the image as archive to the ticket, if you report some reader issue.
|
||||
* Attach the image as an archive to the ticket, if you report some reader issue.
|
||||
Image hosting services compress images and it breaks the repro code.
|
||||
* Provide ONNX file for some public model or ONNX file with with random weights,
|
||||
* Provide ONNX file for some public model or ONNX file with random weights,
|
||||
if you report ONNX parsing or handling issue. Architecture details diagram
|
||||
from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
|
||||
-->
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
name: Bug Report
|
||||
description: Create a report to help us reproduce and fix the bug
|
||||
labels: ["bug"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
#### Thank you for contributing! Before reporting a bug, please have a look at the [FAQ](https://github.com/opencv/opencv/wiki/FAQ), make sure the issue has no duplicate and hasn't been already addressed by searching through [the existing and past issues](https://github.com/opencv/opencv/issues?page=1&q=is%3Aissue+sort%3Acreated-desc).
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: System Information
|
||||
description: |
|
||||
Please provide the following system information to help us diagnose the bug. For example:
|
||||
|
||||
// example for c++ user
|
||||
OpenCV version: 4.8.0
|
||||
Operating System / Platform: Ubuntu 20.04
|
||||
Compiler & compiler version: GCC 9.3.0
|
||||
|
||||
// example for python user
|
||||
OpenCV python version: 4.8.0.74
|
||||
Operating System / Platform: Ubuntu 20.04
|
||||
Python version: 3.9.6
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Detailed description
|
||||
description: |
|
||||
Please provide a clear and concise description of what the bug is and paste the error log below. It helps improving readability if the error log is wrapped in ```` ```triple quotes blocks``` ````.
|
||||
placeholder: |
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
```
|
||||
# error log
|
||||
```
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: |
|
||||
Please provide a minimal example to help us reproduce the bug. Code should be wrapped with ```` ```triple quotes blocks``` ```` to improve readability. If the code is too long, please attach as a file or create and link a public gist: https://gist.github.com.
|
||||
|
||||
Related data files (images, onnx, etc) should be attached below as well. If the data files are too big, feel free to upload them to a online drive, share them and put the link below.
|
||||
placeholder: |
|
||||
```cpp (replace cpp with python if python code)
|
||||
# sample code to reproduce the bug
|
||||
```
|
||||
|
||||
Test data: [image](https://link/to/the/image), [model.onnx](htts://link/to/the/onnx/model)
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Issue submission checklist
|
||||
options:
|
||||
- label: I report the issue, it's not a question
|
||||
required: true
|
||||
- label: I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
|
||||
- label: I updated to the latest OpenCV version and the issue is still there
|
||||
- label: There is reproducer code and related data files (videos, images, onnx, etc)
|
||||
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Questions
|
||||
url: https://forum.opencv.org/
|
||||
about: Ask questions and discuss with OpenCV community members
|
||||
@@ -0,0 +1,26 @@
|
||||
name: Documentation
|
||||
description: Report an issue related to https://docs.opencv.org/
|
||||
labels: ["category: documentation"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
#### Thank you for contributing! Before submitting a doc issue, please make sure it has no duplicate by searching through [the existing and past issues](https://github.com/opencv/opencv/issues?page=1&q=is%3Aissue+sort%3Acreated-desc)
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the doc issue
|
||||
description: >
|
||||
Please provide a clear and concise description of what content in https://docs.opencv.org/ is an issue. Note that there are multiple active branches, such as 4.x and 5.x, so please specify the branch with the problem.
|
||||
placeholder: |
|
||||
A clear and concise description of what content in https://docs.opencv.org/ is an issue.
|
||||
|
||||
Link to the doc: https://docs.opencv.org/4.x/d3/d63/classcv_1_1Mat.html
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Fix suggestion
|
||||
description: >
|
||||
Tell us how we could improve the documentation in this regard.
|
||||
@@ -0,0 +1,22 @@
|
||||
name: Feature request
|
||||
description: Submit a request for a new OpenCV feature
|
||||
labels: ["feature"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
#### Thank you for contributing! Before submitting a feature request, please make sure the request has no duplicate by searching through [the existing and past issues](https://github.com/opencv/opencv/issues?page=1&q=is%3Aissue+sort%3Acreated-desc)
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the feature and motivation
|
||||
description: |
|
||||
Please provide a clear and concise proposal of the feature and outline the motivation.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: |
|
||||
Add any other context, such as pseudo code, links, diagram, screenshots, to help the community better understand the feature request.
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
|
||||
|
||||
- [ ] I agree to contribute to the project under Apache 2 License.
|
||||
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
|
||||
- [ ] The PR is proposed to proper branch
|
||||
- [ ] There is reference to original bug report and related work
|
||||
- [x] I agree to contribute to the project under Apache 2 License.
|
||||
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
|
||||
- [ ] The PR is proposed to the proper branch
|
||||
- [ ] There is a reference to the original bug report and related work
|
||||
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
|
||||
Patch to opencv_extra has the same branch name.
|
||||
- [ ] The feature is well documented and sample code can be built with the project CMake
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
name: PR:5.x
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- 5.x
|
||||
|
||||
jobs:
|
||||
Ubuntu2004-ARM64:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-ARM64.yaml@main
|
||||
|
||||
Ubuntu2004-ARM64-Debug:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-ARM64-Debug.yaml@main
|
||||
|
||||
Ubuntu2004-x64:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-U20.yaml@main
|
||||
|
||||
Ubuntu2004-x64-OpenVINO:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-U20-OpenVINO.yaml@main
|
||||
|
||||
Ubuntu2204-x64:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-U22.yaml@main
|
||||
|
||||
Ubuntu2404-x64:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-U24.yaml@main
|
||||
|
||||
Ubuntu2004-x64-CUDA:
|
||||
if: "${{ contains(github.event.pull_request.labels.*.name, 'category: dnn') }} || ${{ contains(github.event.pull_request.labels.*.name, 'category: dnn (onnx)') }}"
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-U20-Cuda.yaml@main
|
||||
|
||||
Windows10-x64:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-W10.yaml@main
|
||||
|
||||
Windows10-x64-UWP:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-W10-UWP.yaml@main
|
||||
|
||||
Windows10-ARM64:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-W10-ARM64.yaml@main
|
||||
|
||||
# Vulkan configuration disabled as Vulkan backend for DNN does not support int/int64 for now
|
||||
# Details: https://github.com/opencv/opencv/issues/25110
|
||||
# Windows10-x64-Vulkan:
|
||||
# uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-W10-Vulkan.yaml@main
|
||||
|
||||
macOS-ARM64:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-macOS-ARM64.yaml@main
|
||||
|
||||
# macOS-ARM64-Vulkan:
|
||||
# uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-macOS-ARM64-Vulkan.yaml@main
|
||||
|
||||
macOS-x64:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-macOS-x86_64.yaml@main
|
||||
|
||||
iOS:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-iOS.yaml@main
|
||||
|
||||
Android:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-Android.yaml@main
|
||||
|
||||
TIM-VX:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-timvx-backend-tests-4.x.yml@main
|
||||
|
||||
docs:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-docs.yaml@main
|
||||
|
||||
Linux-RISC-V-Clang:
|
||||
uses: opencv/ci-gha-workflow/.github/workflows/OCV-PR-5.x-RISCV.yaml@main
|
||||
@@ -2,6 +2,9 @@ name: arm64 build checks
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -18,7 +21,6 @@ jobs:
|
||||
crossbuild-essential-arm64 \
|
||||
git \
|
||||
cmake \
|
||||
libpython-dev:arm64 \
|
||||
libpython3-dev:arm64 \
|
||||
python-numpy \
|
||||
python3-numpy
|
||||
@@ -31,10 +33,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DPYTHON2_INCLUDE_PATH=/usr/include/python2.7/ \
|
||||
-DPYTHON2_LIBRARIES=/usr/lib/aarch64-linux-gnu/libpython2.7.so \
|
||||
-DPYTHON2_NUMPY_INCLUDE_DIRS=/usr/lib/python2.7/dist-packages/numpy/core/include \
|
||||
-DPYTHON3_INCLUDE_PATH=/usr/include/python3.6m/ \
|
||||
cmake -DPYTHON3_INCLUDE_PATH=/usr/include/python3.6m/ \
|
||||
-DPYTHON3_LIBRARIES=/usr/lib/aarch64-linux-gnu/libpython3.6m.so \
|
||||
-DPYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3/dist-packages/numpy/core/include \
|
||||
-DCMAKE_TOOLCHAIN_FILE=../platforms/linux/aarch64-gnu.toolchain.cmake \
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
name: lint_python
|
||||
on: workflow_dispatch
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
jobs:
|
||||
lint_python:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Vendored
+9
-1
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION ${MIN_VER_CMAKE} FATAL_ERROR)
|
||||
|
||||
project(Carotene)
|
||||
|
||||
@@ -27,6 +27,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE AND CV_CLANG AND WITH_NEON)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-unused-function)
|
||||
endif()
|
||||
|
||||
add_library(carotene_objs OBJECT EXCLUDE_FROM_ALL
|
||||
${carotene_headers}
|
||||
${carotene_sources}
|
||||
@@ -40,5 +44,9 @@ if(WITH_NEON)
|
||||
target_compile_definitions(carotene_objs PRIVATE "-DWITH_NEON")
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
target_compile_definitions(carotene_objs PRIVATE "-D_USE_MATH_DEFINES=1")
|
||||
endif()
|
||||
|
||||
# we add dummy file to fix XCode build
|
||||
add_library(carotene STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} "$<TARGET_OBJECTS:carotene_objs>" "${CAROTENE_SOURCE_DIR}/dummy.cpp")
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION ${MIN_VER_CMAKE} FATAL_ERROR)
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
Vendored
+122
-3
@@ -1286,7 +1286,6 @@ inline int TEGRA_SEPFILTERFREE(cvhalFilter2D *context)
|
||||
#undef cv_hal_sepFilterFree
|
||||
#define cv_hal_sepFilterFree TEGRA_SEPFILTERFREE
|
||||
|
||||
|
||||
struct MorphCtx
|
||||
{
|
||||
int operation;
|
||||
@@ -1296,13 +1295,13 @@ struct MorphCtx
|
||||
CAROTENE_NS::BORDER_MODE border;
|
||||
uchar borderValues[4];
|
||||
};
|
||||
inline int TEGRA_MORPHINIT(cvhalFilter2D **context, int operation, int src_type, int dst_type, int, int,
|
||||
inline int TEGRA_MORPHINIT(cvhalFilter2D **context, int operation, int src_type, int dst_type, int width, int height,
|
||||
int kernel_type, uchar *kernel_data, size_t kernel_step, int kernel_width, int kernel_height, int anchor_x, int anchor_y,
|
||||
int borderType, const double borderValue[4], int iterations, bool allowSubmatrix, bool allowInplace)
|
||||
{
|
||||
if(!context || !kernel_data || src_type != dst_type ||
|
||||
CV_MAT_DEPTH(src_type) != CV_8U || src_type < 0 || (src_type >> CV_CN_SHIFT) > 3 ||
|
||||
|
||||
width < kernel_width || height < kernel_height ||
|
||||
allowSubmatrix || allowInplace || iterations != 1 ||
|
||||
!CAROTENE_NS::isSupportedConfiguration())
|
||||
return CV_HAL_ERROR_NOT_IMPLEMENTED;
|
||||
@@ -1857,6 +1856,126 @@ TegraCvtColor_Invoker(bgrx2hsvf, bgrx2hsv, src_data + static_cast<size_t>(range.
|
||||
#define cv_hal_cvtTwoPlaneYUVtoBGREx TEGRA_CVT2PYUVTOBGR_EX
|
||||
#endif
|
||||
|
||||
// The optimized branch was developed for old armv7 processors and leads to perf degradation on armv8
|
||||
#if defined(__ARM_ARCH) && (__ARM_ARCH == 7)
|
||||
inline CAROTENE_NS::BORDER_MODE borderCV2Carotene(int borderType)
|
||||
{
|
||||
switch(borderType)
|
||||
{
|
||||
case CV_HAL_BORDER_CONSTANT:
|
||||
return CAROTENE_NS::BORDER_MODE_CONSTANT;
|
||||
case CV_HAL_BORDER_REPLICATE:
|
||||
return CAROTENE_NS::BORDER_MODE_REPLICATE;
|
||||
case CV_HAL_BORDER_REFLECT:
|
||||
return CAROTENE_NS::BORDER_MODE_REFLECT;
|
||||
case CV_HAL_BORDER_WRAP:
|
||||
return CAROTENE_NS::BORDER_MODE_WRAP;
|
||||
case CV_HAL_BORDER_REFLECT_101:
|
||||
return CAROTENE_NS::BORDER_MODE_REFLECT101;
|
||||
}
|
||||
|
||||
return CAROTENE_NS::BORDER_MODE_UNDEFINED;
|
||||
}
|
||||
|
||||
inline int TEGRA_GaussianBlurBinomial(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step,
|
||||
int width, int height, int depth, int cn, size_t margin_left, size_t margin_top,
|
||||
size_t margin_right, size_t margin_bottom, size_t ksize, int border_type)
|
||||
{
|
||||
CAROTENE_NS::Size2D sz(width, height);
|
||||
CAROTENE_NS::BORDER_MODE border = borderCV2Carotene(border_type);
|
||||
CAROTENE_NS::Margin mg(margin_left, margin_right, margin_top, margin_bottom);
|
||||
|
||||
if (ksize == 3)
|
||||
{
|
||||
if ((depth != CV_8U) || (cn != 1))
|
||||
return CV_HAL_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
if (CAROTENE_NS::isGaussianBlur3x3MarginSupported(sz, border, mg))
|
||||
{
|
||||
CAROTENE_NS::gaussianBlur3x3Margin(sz, src_data, src_step, dst_data, dst_step,
|
||||
border, 0, mg);
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
}
|
||||
else if (ksize == 5)
|
||||
{
|
||||
if (!CAROTENE_NS::isGaussianBlur5x5Supported(sz, cn, border))
|
||||
return CV_HAL_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
if (depth == CV_8U)
|
||||
{
|
||||
CAROTENE_NS::gaussianBlur5x5(sz, cn, (uint8_t*)src_data, src_step,
|
||||
(uint8_t*)dst_data, dst_step, border, 0, mg);
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
else if (depth == CV_16U)
|
||||
{
|
||||
CAROTENE_NS::gaussianBlur5x5(sz, cn, (uint16_t*)src_data, src_step,
|
||||
(uint16_t*)dst_data, dst_step, border, 0, mg);
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
else if (depth == CV_16S)
|
||||
{
|
||||
CAROTENE_NS::gaussianBlur5x5(sz, cn, (int16_t*)src_data, src_step,
|
||||
(int16_t*)dst_data, dst_step, border, 0, mg);
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return CV_HAL_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
#undef cv_hal_gaussianBlurBinomial
|
||||
#define cv_hal_gaussianBlurBinomial TEGRA_GaussianBlurBinomial
|
||||
|
||||
#endif // __ARM_ARCH=7
|
||||
|
||||
#endif // OPENCV_IMGPROC_HAL_INTERFACE_H
|
||||
|
||||
// The optimized branch was developed for old armv7 processors
|
||||
#if defined(__ARM_ARCH) && (__ARM_ARCH == 7)
|
||||
inline int TEGRA_LKOpticalFlowLevel(const uchar *prev_data, size_t prev_data_step,
|
||||
const short* prev_deriv_data, size_t prev_deriv_step,
|
||||
const uchar* next_data, size_t next_step,
|
||||
int width, int height, int cn,
|
||||
const float *prev_points, float *next_points, size_t point_count,
|
||||
uchar *status, float *err,
|
||||
const int win_width, const int win_height,
|
||||
int termination_count, double termination_epsilon,
|
||||
bool get_min_eigen_vals,
|
||||
float min_eigen_vals_threshold)
|
||||
{
|
||||
if (!CAROTENE_NS::isSupportedConfiguration())
|
||||
return CV_HAL_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
CAROTENE_NS::pyrLKOptFlowLevel(CAROTENE_NS::Size2D(width, height), cn,
|
||||
prev_data, prev_data_step, prev_deriv_data, prev_deriv_step,
|
||||
next_data, next_step,
|
||||
point_count, prev_points, next_points,
|
||||
status, err, CAROTENE_NS::Size2D(win_width, win_height),
|
||||
termination_count, termination_epsilon,
|
||||
get_min_eigen_vals, min_eigen_vals_threshold);
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
|
||||
#undef cv_hal_LKOpticalFlowLevel
|
||||
#define cv_hal_LKOpticalFlowLevel TEGRA_LKOpticalFlowLevel
|
||||
#endif // __ARM_ARCH=7
|
||||
|
||||
#if 0 // OpenCV provides fater parallel implementation
|
||||
inline int TEGRA_ScharrDeriv(const uchar* src_data, size_t src_step,
|
||||
short* dst_data, size_t dst_step,
|
||||
int width, int height, int cn)
|
||||
{
|
||||
if (!CAROTENE_NS::isSupportedConfiguration())
|
||||
return CV_HAL_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
CAROTENE_NS::ScharrDeriv(CAROTENE_NS::Size2D(width, height), cn, src_data, src_step, dst_data, dst_step);
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
|
||||
#undef cv_hal_ScharrDeriv
|
||||
#define cv_hal_ScharrDeriv TEGRA_ScharrDeriv
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -2485,7 +2485,7 @@ namespace CAROTENE_NS {
|
||||
u8 *status, f32 *err,
|
||||
const Size2D &winSize,
|
||||
u32 terminationCount, f64 terminationEpsilon,
|
||||
u32 level, u32 maxLevel, bool useInitialFlow, bool getMinEigenVals,
|
||||
bool getMinEigenVals,
|
||||
f32 minEigThreshold);
|
||||
}
|
||||
|
||||
|
||||
+25
-24
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "common.hpp"
|
||||
#include "vtransform.hpp"
|
||||
#include "vround_helper.hpp"
|
||||
|
||||
namespace CAROTENE_NS {
|
||||
|
||||
@@ -106,31 +107,31 @@ template <> struct wAdd<s32>
|
||||
{
|
||||
valpha = vdupq_n_f32(_alpha);
|
||||
vbeta = vdupq_n_f32(_beta);
|
||||
vgamma = vdupq_n_f32(_gamma + 0.5);
|
||||
vgamma = vdupq_n_f32(_gamma);
|
||||
}
|
||||
|
||||
void operator() (const typename VecTraits<s32>::vec128 & v_src0,
|
||||
const typename VecTraits<s32>::vec128 & v_src1,
|
||||
typename VecTraits<s32>::vec128 & v_dst) const
|
||||
void operator() (const VecTraits<s32>::vec128 & v_src0,
|
||||
const VecTraits<s32>::vec128 & v_src1,
|
||||
VecTraits<s32>::vec128 & v_dst) const
|
||||
{
|
||||
float32x4_t vs1 = vcvtq_f32_s32(v_src0);
|
||||
float32x4_t vs2 = vcvtq_f32_s32(v_src1);
|
||||
|
||||
vs1 = vmlaq_f32(vgamma, vs1, valpha);
|
||||
vs1 = vmlaq_f32(vs1, vs2, vbeta);
|
||||
v_dst = vcvtq_s32_f32(vs1);
|
||||
v_dst = vroundq_s32_f32(vs1);
|
||||
}
|
||||
|
||||
void operator() (const typename VecTraits<s32>::vec64 & v_src0,
|
||||
const typename VecTraits<s32>::vec64 & v_src1,
|
||||
typename VecTraits<s32>::vec64 & v_dst) const
|
||||
void operator() (const VecTraits<s32>::vec64 & v_src0,
|
||||
const VecTraits<s32>::vec64 & v_src1,
|
||||
VecTraits<s32>::vec64 & v_dst) const
|
||||
{
|
||||
float32x2_t vs1 = vcvt_f32_s32(v_src0);
|
||||
float32x2_t vs2 = vcvt_f32_s32(v_src1);
|
||||
|
||||
vs1 = vmla_f32(vget_low(vgamma), vs1, vget_low(valpha));
|
||||
vs1 = vmla_f32(vs1, vs2, vget_low(vbeta));
|
||||
v_dst = vcvt_s32_f32(vs1);
|
||||
v_dst = vround_s32_f32(vs1);
|
||||
}
|
||||
|
||||
void operator() (const s32 * src0, const s32 * src1, s32 * dst) const
|
||||
@@ -150,31 +151,31 @@ template <> struct wAdd<u32>
|
||||
{
|
||||
valpha = vdupq_n_f32(_alpha);
|
||||
vbeta = vdupq_n_f32(_beta);
|
||||
vgamma = vdupq_n_f32(_gamma + 0.5);
|
||||
vgamma = vdupq_n_f32(_gamma);
|
||||
}
|
||||
|
||||
void operator() (const typename VecTraits<u32>::vec128 & v_src0,
|
||||
const typename VecTraits<u32>::vec128 & v_src1,
|
||||
typename VecTraits<u32>::vec128 & v_dst) const
|
||||
void operator() (const VecTraits<u32>::vec128 & v_src0,
|
||||
const VecTraits<u32>::vec128 & v_src1,
|
||||
VecTraits<u32>::vec128 & v_dst) const
|
||||
{
|
||||
float32x4_t vs1 = vcvtq_f32_u32(v_src0);
|
||||
float32x4_t vs2 = vcvtq_f32_u32(v_src1);
|
||||
|
||||
vs1 = vmlaq_f32(vgamma, vs1, valpha);
|
||||
vs1 = vmlaq_f32(vs1, vs2, vbeta);
|
||||
v_dst = vcvtq_u32_f32(vs1);
|
||||
v_dst = vroundq_u32_f32(vs1);
|
||||
}
|
||||
|
||||
void operator() (const typename VecTraits<u32>::vec64 & v_src0,
|
||||
const typename VecTraits<u32>::vec64 & v_src1,
|
||||
typename VecTraits<u32>::vec64 & v_dst) const
|
||||
void operator() (const VecTraits<u32>::vec64 & v_src0,
|
||||
const VecTraits<u32>::vec64 & v_src1,
|
||||
VecTraits<u32>::vec64 & v_dst) const
|
||||
{
|
||||
float32x2_t vs1 = vcvt_f32_u32(v_src0);
|
||||
float32x2_t vs2 = vcvt_f32_u32(v_src1);
|
||||
|
||||
vs1 = vmla_f32(vget_low(vgamma), vs1, vget_low(valpha));
|
||||
vs1 = vmla_f32(vs1, vs2, vget_low(vbeta));
|
||||
v_dst = vcvt_u32_f32(vs1);
|
||||
v_dst = vround_u32_f32(vs1);
|
||||
}
|
||||
|
||||
void operator() (const u32 * src0, const u32 * src1, u32 * dst) const
|
||||
@@ -197,17 +198,17 @@ template <> struct wAdd<f32>
|
||||
vgamma = vdupq_n_f32(_gamma + 0.5);
|
||||
}
|
||||
|
||||
void operator() (const typename VecTraits<f32>::vec128 & v_src0,
|
||||
const typename VecTraits<f32>::vec128 & v_src1,
|
||||
typename VecTraits<f32>::vec128 & v_dst) const
|
||||
void operator() (const VecTraits<f32>::vec128 & v_src0,
|
||||
const VecTraits<f32>::vec128 & v_src1,
|
||||
VecTraits<f32>::vec128 & v_dst) const
|
||||
{
|
||||
float32x4_t vs1 = vmlaq_f32(vgamma, v_src0, valpha);
|
||||
v_dst = vmlaq_f32(vs1, v_src1, vbeta);
|
||||
}
|
||||
|
||||
void operator() (const typename VecTraits<f32>::vec64 & v_src0,
|
||||
const typename VecTraits<f32>::vec64 & v_src1,
|
||||
typename VecTraits<f32>::vec64 & v_dst) const
|
||||
void operator() (const VecTraits<f32>::vec64 & v_src0,
|
||||
const VecTraits<f32>::vec64 & v_src1,
|
||||
VecTraits<f32>::vec64 & v_dst) const
|
||||
{
|
||||
float32x2_t vs1 = vmla_f32(vget_low(vgamma), v_src0, vget_low(valpha));
|
||||
v_dst = vmla_f32(vs1, v_src1, vget_low(vbeta));
|
||||
|
||||
Vendored
+8
-9
@@ -41,6 +41,7 @@
|
||||
|
||||
#include "common.hpp"
|
||||
#include "saturate_cast.hpp"
|
||||
#include "vround_helper.hpp"
|
||||
|
||||
namespace CAROTENE_NS {
|
||||
|
||||
@@ -198,7 +199,6 @@ void blur3x3(const Size2D &size, s32 cn,
|
||||
//#define FLOAT_VARIANT_1_9
|
||||
#ifdef FLOAT_VARIANT_1_9
|
||||
float32x4_t v1_9 = vdupq_n_f32 (1.0/9.0);
|
||||
float32x4_t v0_5 = vdupq_n_f32 (.5);
|
||||
#else
|
||||
const int16x8_t vScale = vmovq_n_s16(3640);
|
||||
#endif
|
||||
@@ -283,8 +283,8 @@ void blur3x3(const Size2D &size, s32 cn,
|
||||
uint32x4_t tres2 = vmovl_u16(vget_high_u16(t0));
|
||||
float32x4_t vf1 = vmulq_f32(v1_9, vcvtq_f32_u32(tres1));
|
||||
float32x4_t vf2 = vmulq_f32(v1_9, vcvtq_f32_u32(tres2));
|
||||
tres1 = vcvtq_u32_f32(vaddq_f32(vf1, v0_5));
|
||||
tres2 = vcvtq_u32_f32(vaddq_f32(vf2, v0_5));
|
||||
tres1 = internal::vroundq_u32_f32(vf1);
|
||||
tres2 = internal::vroundq_u32_f32(vf2);
|
||||
t0 = vcombine_u16(vmovn_u32(tres1),vmovn_u32(tres2));
|
||||
vst1_u8(drow + x - 8, vmovn_u16(t0));
|
||||
#else
|
||||
@@ -391,9 +391,9 @@ void blur3x3(const Size2D &size, s32 cn,
|
||||
}
|
||||
else if (borderType == BORDER_MODE_REFLECT101)
|
||||
{
|
||||
tcurr = vsetq_lane_u16(vgetq_lane_u16(tcurr, 3),tcurr, 5);
|
||||
tcurr = vsetq_lane_u16(vgetq_lane_u16(tcurr, 4),tcurr, 6);
|
||||
tcurr = vsetq_lane_u16(vgetq_lane_u16(tcurr, 5),tcurr, 7);
|
||||
tcurr = vsetq_lane_u16(vgetq_lane_u16(tcurr, 3),tcurr, 5);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -445,8 +445,8 @@ void blur3x3(const Size2D &size, s32 cn,
|
||||
uint32x4_t tres2 = vmovl_u16(vget_high_u16(t0));
|
||||
float32x4_t vf1 = vmulq_f32(v1_9, vcvtq_f32_u32(tres1));
|
||||
float32x4_t vf2 = vmulq_f32(v1_9, vcvtq_f32_u32(tres2));
|
||||
tres1 = vcvtq_u32_f32(vaddq_f32(vf1, v0_5));
|
||||
tres2 = vcvtq_u32_f32(vaddq_f32(vf2, v0_5));
|
||||
tres1 = internal::vroundq_u32_f32(vf1);
|
||||
tres2 = internal::vroundq_u32_f32(vf2);
|
||||
t0 = vcombine_u16(vmovn_u32(tres1),vmovn_u32(tres2));
|
||||
vst1_u8(drow + x - 8, vmovn_u16(t0));
|
||||
#else
|
||||
@@ -508,7 +508,6 @@ void blur5x5(const Size2D &size, s32 cn,
|
||||
#define FLOAT_VARIANT_1_25
|
||||
#ifdef FLOAT_VARIANT_1_25
|
||||
float32x4_t v1_25 = vdupq_n_f32 (1.0f/25.0f);
|
||||
float32x4_t v0_5 = vdupq_n_f32 (.5f);
|
||||
#else
|
||||
const int16x8_t vScale = vmovq_n_s16(1310);
|
||||
#endif
|
||||
@@ -752,8 +751,8 @@ void blur5x5(const Size2D &size, s32 cn,
|
||||
uint32x4_t tres2 = vmovl_u16(vget_high_u16(t0));
|
||||
float32x4_t vf1 = vmulq_f32(v1_25, vcvtq_f32_u32(tres1));
|
||||
float32x4_t vf2 = vmulq_f32(v1_25, vcvtq_f32_u32(tres2));
|
||||
tres1 = vcvtq_u32_f32(vaddq_f32(vf1, v0_5));
|
||||
tres2 = vcvtq_u32_f32(vaddq_f32(vf2, v0_5));
|
||||
tres1 = internal::vroundq_u32_f32(vf1);
|
||||
tres2 = internal::vroundq_u32_f32(vf2);
|
||||
t0 = vcombine_u16(vmovn_u32(tres1),vmovn_u32(tres2));
|
||||
vst1_u8(drow + x - 8, vmovn_u16(t0));
|
||||
#else
|
||||
|
||||
+5
-11
@@ -40,6 +40,7 @@
|
||||
#include "common.hpp"
|
||||
|
||||
#include "saturate_cast.hpp"
|
||||
#include "vround_helper.hpp"
|
||||
|
||||
namespace CAROTENE_NS {
|
||||
|
||||
@@ -1166,17 +1167,10 @@ inline uint8x8x3_t convertToHSV(const uint8x8_t vR, const uint8x8_t vG, const ui
|
||||
vSt3 = vmulq_f32(vHF1, vDivTab);
|
||||
vSt4 = vmulq_f32(vHF2, vDivTab);
|
||||
|
||||
float32x4_t bias = vdupq_n_f32(0.5f);
|
||||
|
||||
vSt1 = vaddq_f32(vSt1, bias);
|
||||
vSt2 = vaddq_f32(vSt2, bias);
|
||||
vSt3 = vaddq_f32(vSt3, bias);
|
||||
vSt4 = vaddq_f32(vSt4, bias);
|
||||
|
||||
uint32x4_t vRes1 = vcvtq_u32_f32(vSt1);
|
||||
uint32x4_t vRes2 = vcvtq_u32_f32(vSt2);
|
||||
uint32x4_t vRes3 = vcvtq_u32_f32(vSt3);
|
||||
uint32x4_t vRes4 = vcvtq_u32_f32(vSt4);
|
||||
uint32x4_t vRes1 = internal::vroundq_u32_f32(vSt1);
|
||||
uint32x4_t vRes2 = internal::vroundq_u32_f32(vSt2);
|
||||
uint32x4_t vRes3 = internal::vroundq_u32_f32(vSt3);
|
||||
uint32x4_t vRes4 = internal::vroundq_u32_f32(vSt4);
|
||||
|
||||
int32x4_t vH_L = vmovl_s16(vget_low_s16(vDiff4));
|
||||
int32x4_t vH_H = vmovl_s16(vget_high_s16(vDiff4));
|
||||
|
||||
+108
-107
@@ -38,6 +38,7 @@
|
||||
*/
|
||||
|
||||
#include "common.hpp"
|
||||
#include "vround_helper.hpp"
|
||||
|
||||
namespace CAROTENE_NS {
|
||||
|
||||
@@ -185,7 +186,7 @@ CVTS_FUNC1(u8, 16,
|
||||
#else
|
||||
CVTS_FUNC1(u8, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 16)
|
||||
{
|
||||
@@ -209,10 +210,10 @@ CVTS_FUNC1(u8, 16,
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline3_f32 = vaddq_f32(vline3_f32, vshift);
|
||||
vline4_f32 = vaddq_f32(vline4_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline3_s32 = vcvtq_s32_f32(vline3_f32);
|
||||
int32x4_t vline4_s32 = vcvtq_s32_f32(vline4_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int32x4_t vline3_s32 = internal::vroundq_s32_f32(vline3_f32);
|
||||
int32x4_t vline4_s32 = internal::vroundq_s32_f32(vline4_f32);
|
||||
uint16x8_t vRes1_u16 = vcombine_u16(vqmovun_s32(vline1_s32), vqmovun_s32(vline2_s32));
|
||||
uint16x8_t vRes2_u16 = vcombine_u16(vqmovun_s32(vline3_s32), vqmovun_s32(vline4_s32));
|
||||
vst1q_u8(_dst + i, vcombine_u8(vqmovn_u16(vRes1_u16), vqmovn_u16(vRes2_u16)));
|
||||
@@ -270,7 +271,7 @@ CVTS_FUNC(u8, s8, 16,
|
||||
#else
|
||||
CVTS_FUNC(u8, s8, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 16)
|
||||
{
|
||||
@@ -294,10 +295,10 @@ CVTS_FUNC(u8, s8, 16,
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline3_f32 = vaddq_f32(vline3_f32, vshift);
|
||||
vline4_f32 = vaddq_f32(vline4_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline3_s32 = vcvtq_s32_f32(vline3_f32);
|
||||
int32x4_t vline4_s32 = vcvtq_s32_f32(vline4_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int32x4_t vline3_s32 = internal::vroundq_s32_f32(vline3_f32);
|
||||
int32x4_t vline4_s32 = internal::vroundq_s32_f32(vline4_f32);
|
||||
int16x8_t vRes1_u16 = vcombine_s16(vqmovn_s32(vline1_s32), vqmovn_s32(vline2_s32));
|
||||
int16x8_t vRes2_u16 = vcombine_s16(vqmovn_s32(vline3_s32), vqmovn_s32(vline4_s32));
|
||||
vst1q_s8(_dst + i, vcombine_s8(vqmovn_s16(vRes1_u16), vqmovn_s16(vRes2_u16)));
|
||||
@@ -355,7 +356,7 @@ CVTS_FUNC(u8, u16, 16,
|
||||
#else
|
||||
CVTS_FUNC(u8, u16, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 16)
|
||||
{
|
||||
@@ -379,10 +380,10 @@ CVTS_FUNC(u8, u16, 16,
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline3_f32 = vaddq_f32(vline3_f32, vshift);
|
||||
vline4_f32 = vaddq_f32(vline4_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline3_s32 = vcvtq_s32_f32(vline3_f32);
|
||||
int32x4_t vline4_s32 = vcvtq_s32_f32(vline4_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int32x4_t vline3_s32 = internal::vroundq_s32_f32(vline3_f32);
|
||||
int32x4_t vline4_s32 = internal::vroundq_s32_f32(vline4_f32);
|
||||
vst1q_u16(_dst + i + 0, vcombine_u16(vqmovun_s32(vline1_s32), vqmovun_s32(vline2_s32)));
|
||||
vst1q_u16(_dst + i + 8, vcombine_u16(vqmovun_s32(vline3_s32), vqmovun_s32(vline4_s32)));
|
||||
}
|
||||
@@ -439,7 +440,7 @@ CVTS_FUNC(u8, s16, 16,
|
||||
#else
|
||||
CVTS_FUNC(u8, s16, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 16)
|
||||
{
|
||||
@@ -463,10 +464,10 @@ CVTS_FUNC(u8, s16, 16,
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline3_f32 = vaddq_f32(vline3_f32, vshift);
|
||||
vline4_f32 = vaddq_f32(vline4_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline3_s32 = vcvtq_s32_f32(vline3_f32);
|
||||
int32x4_t vline4_s32 = vcvtq_s32_f32(vline4_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int32x4_t vline3_s32 = internal::vroundq_s32_f32(vline3_f32);
|
||||
int32x4_t vline4_s32 = internal::vroundq_s32_f32(vline4_f32);
|
||||
vst1q_s16(_dst + i + 0, vcombine_s16(vqmovn_s32(vline1_s32), vqmovn_s32(vline2_s32)));
|
||||
vst1q_s16(_dst + i + 8, vcombine_s16(vqmovn_s32(vline3_s32), vqmovn_s32(vline4_s32)));
|
||||
}
|
||||
@@ -526,7 +527,7 @@ CVTS_FUNC(u8, s32, 16,
|
||||
#else
|
||||
CVTS_FUNC(u8, s32, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 16)
|
||||
{
|
||||
@@ -550,10 +551,10 @@ CVTS_FUNC(u8, s32, 16,
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline3_f32 = vaddq_f32(vline3_f32, vshift);
|
||||
vline4_f32 = vaddq_f32(vline4_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline3_s32 = vcvtq_s32_f32(vline3_f32);
|
||||
int32x4_t vline4_s32 = vcvtq_s32_f32(vline4_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int32x4_t vline3_s32 = internal::vroundq_s32_f32(vline3_f32);
|
||||
int32x4_t vline4_s32 = internal::vroundq_s32_f32(vline4_f32);
|
||||
vst1q_s32(_dst + i + 0, vline1_s32);
|
||||
vst1q_s32(_dst + i + 4, vline2_s32);
|
||||
vst1q_s32(_dst + i + 8, vline3_s32);
|
||||
@@ -693,7 +694,7 @@ CVTS_FUNC(s8, u8, 16,
|
||||
#else
|
||||
CVTS_FUNC(s8, u8, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 16)
|
||||
{
|
||||
@@ -717,10 +718,10 @@ CVTS_FUNC(s8, u8, 16,
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline3_f32 = vaddq_f32(vline3_f32, vshift);
|
||||
vline4_f32 = vaddq_f32(vline4_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline3_s32 = vcvtq_s32_f32(vline3_f32);
|
||||
vline4_s32 = vcvtq_s32_f32(vline4_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
vline3_s32 = internal::vroundq_s32_f32(vline3_f32);
|
||||
vline4_s32 = internal::vroundq_s32_f32(vline4_f32);
|
||||
uint16x8_t vRes1_u16 = vcombine_u16(vqmovun_s32(vline1_s32), vqmovun_s32(vline2_s32));
|
||||
uint16x8_t vRes2_u16 = vcombine_u16(vqmovun_s32(vline3_s32), vqmovun_s32(vline4_s32));
|
||||
vst1q_u8(_dst + i, vcombine_u8(vqmovn_u16(vRes1_u16), vqmovn_u16(vRes2_u16)));
|
||||
@@ -778,7 +779,7 @@ CVTS_FUNC1(s8, 16,
|
||||
#else
|
||||
CVTS_FUNC1(s8, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 16)
|
||||
{
|
||||
@@ -802,10 +803,10 @@ CVTS_FUNC1(s8, 16,
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline3_f32 = vaddq_f32(vline3_f32, vshift);
|
||||
vline4_f32 = vaddq_f32(vline4_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline3_s32 = vcvtq_s32_f32(vline3_f32);
|
||||
vline4_s32 = vcvtq_s32_f32(vline4_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
vline3_s32 = internal::vroundq_s32_f32(vline3_f32);
|
||||
vline4_s32 = internal::vroundq_s32_f32(vline4_f32);
|
||||
int16x8_t vRes1_s16 = vcombine_s16(vqmovn_s32(vline1_s32), vqmovn_s32(vline2_s32));
|
||||
int16x8_t vRes2_s16 = vcombine_s16(vqmovn_s32(vline3_s32), vqmovn_s32(vline4_s32));
|
||||
vst1q_s8(_dst + i, vcombine_s8(vqmovn_s16(vRes1_s16), vqmovn_s16(vRes2_s16)));
|
||||
@@ -863,7 +864,7 @@ CVTS_FUNC(s8, u16, 16,
|
||||
#else
|
||||
CVTS_FUNC(s8, u16, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 16)
|
||||
{
|
||||
@@ -887,10 +888,10 @@ CVTS_FUNC(s8, u16, 16,
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline3_f32 = vaddq_f32(vline3_f32, vshift);
|
||||
vline4_f32 = vaddq_f32(vline4_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline3_s32 = vcvtq_s32_f32(vline3_f32);
|
||||
vline4_s32 = vcvtq_s32_f32(vline4_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
vline3_s32 = internal::vroundq_s32_f32(vline3_f32);
|
||||
vline4_s32 = internal::vroundq_s32_f32(vline4_f32);
|
||||
uint16x8_t vRes1_u16 = vcombine_u16(vqmovun_s32(vline1_s32), vqmovun_s32(vline2_s32));
|
||||
uint16x8_t vRes2_u16 = vcombine_u16(vqmovun_s32(vline3_s32), vqmovun_s32(vline4_s32));
|
||||
vst1q_u16(_dst + i + 0, vRes1_u16);
|
||||
@@ -949,7 +950,7 @@ CVTS_FUNC(s8, s16, 16,
|
||||
#else
|
||||
CVTS_FUNC(s8, s16, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 16)
|
||||
{
|
||||
@@ -973,10 +974,10 @@ CVTS_FUNC(s8, s16, 16,
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline3_f32 = vaddq_f32(vline3_f32, vshift);
|
||||
vline4_f32 = vaddq_f32(vline4_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline3_s32 = vcvtq_s32_f32(vline3_f32);
|
||||
vline4_s32 = vcvtq_s32_f32(vline4_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
vline3_s32 = internal::vroundq_s32_f32(vline3_f32);
|
||||
vline4_s32 = internal::vroundq_s32_f32(vline4_f32);
|
||||
int16x8_t vRes1_s16 = vcombine_s16(vqmovn_s32(vline1_s32), vqmovn_s32(vline2_s32));
|
||||
int16x8_t vRes2_s16 = vcombine_s16(vqmovn_s32(vline3_s32), vqmovn_s32(vline4_s32));
|
||||
vst1q_s16(_dst + i + 0, vRes1_s16);
|
||||
@@ -1038,7 +1039,7 @@ CVTS_FUNC(s8, s32, 16,
|
||||
#else
|
||||
CVTS_FUNC(s8, s32, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 16)
|
||||
{
|
||||
@@ -1062,10 +1063,10 @@ CVTS_FUNC(s8, s32, 16,
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline3_f32 = vaddq_f32(vline3_f32, vshift);
|
||||
vline4_f32 = vaddq_f32(vline4_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline3_s32 = vcvtq_s32_f32(vline3_f32);
|
||||
vline4_s32 = vcvtq_s32_f32(vline4_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
vline3_s32 = internal::vroundq_s32_f32(vline3_f32);
|
||||
vline4_s32 = internal::vroundq_s32_f32(vline4_f32);
|
||||
vst1q_s32(_dst + i + 0, vline1_s32);
|
||||
vst1q_s32(_dst + i + 4, vline2_s32);
|
||||
vst1q_s32(_dst + i + 8, vline3_s32);
|
||||
@@ -1190,7 +1191,7 @@ CVTS_FUNC(u16, u8, 16,
|
||||
#else
|
||||
CVTS_FUNC(u16, u8, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1204,8 +1205,8 @@ CVTS_FUNC(u16, u8, 16,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int16x4_t vRes1 = vqmovn_s32(vline1_s32);
|
||||
int16x4_t vRes2 = vqmovn_s32(vline2_s32);
|
||||
uint8x8_t vRes = vqmovun_s16(vcombine_s16(vRes1, vRes2));
|
||||
@@ -1249,7 +1250,7 @@ CVTS_FUNC(u16, s8, 16,
|
||||
#else
|
||||
CVTS_FUNC(u16, s8, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1263,8 +1264,8 @@ CVTS_FUNC(u16, s8, 16,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int16x4_t vRes1 = vqmovn_s32(vline1_s32);
|
||||
int16x4_t vRes2 = vqmovn_s32(vline2_s32);
|
||||
int8x8_t vRes = vqmovn_s16(vcombine_s16(vRes1, vRes2));
|
||||
@@ -1307,7 +1308,7 @@ CVTS_FUNC1(u16, 16,
|
||||
#else
|
||||
CVTS_FUNC1(u16, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1321,8 +1322,8 @@ CVTS_FUNC1(u16, 16,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
uint16x4_t vRes1 = vqmovun_s32(vline1_s32);
|
||||
uint16x4_t vRes2 = vqmovun_s32(vline2_s32);
|
||||
vst1q_u16(_dst + i, vcombine_u16(vRes1, vRes2));
|
||||
@@ -1364,7 +1365,7 @@ CVTS_FUNC(u16, s16, 8,
|
||||
#else
|
||||
CVTS_FUNC(u16, s16, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1378,8 +1379,8 @@ CVTS_FUNC(u16, s16, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int16x4_t vRes1 = vqmovn_s32(vline1_s32);
|
||||
int16x4_t vRes2 = vqmovn_s32(vline2_s32);
|
||||
vst1q_s16(_dst + i, vcombine_s16(vRes1, vRes2));
|
||||
@@ -1421,7 +1422,7 @@ CVTS_FUNC(u16, s32, 8,
|
||||
#else
|
||||
CVTS_FUNC(u16, s32, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1435,8 +1436,8 @@ CVTS_FUNC(u16, s32, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
vst1q_s32(_dst + i + 0, vline1_s32);
|
||||
vst1q_s32(_dst + i + 4, vline2_s32);
|
||||
}
|
||||
@@ -1530,7 +1531,7 @@ CVTS_FUNC(s16, u8, 16,
|
||||
#else
|
||||
CVTS_FUNC(s16, u8, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1544,8 +1545,8 @@ CVTS_FUNC(s16, u8, 16,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int16x4_t vRes1 = vqmovn_s32(vline1_s32);
|
||||
int16x4_t vRes2 = vqmovn_s32(vline2_s32);
|
||||
uint8x8_t vRes = vqmovun_s16(vcombine_s16(vRes1, vRes2));
|
||||
@@ -1589,7 +1590,7 @@ CVTS_FUNC(s16, s8, 16,
|
||||
#else
|
||||
CVTS_FUNC(s16, s8, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1603,8 +1604,8 @@ CVTS_FUNC(s16, s8, 16,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int16x4_t vRes1 = vqmovn_s32(vline1_s32);
|
||||
int16x4_t vRes2 = vqmovn_s32(vline2_s32);
|
||||
int8x8_t vRes = vqmovn_s16(vcombine_s16(vRes1, vRes2));
|
||||
@@ -1647,7 +1648,7 @@ CVTS_FUNC(s16, u16, 8,
|
||||
#else
|
||||
CVTS_FUNC(s16, u16, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1661,8 +1662,8 @@ CVTS_FUNC(s16, u16, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
uint16x4_t vRes1 = vqmovun_s32(vline1_s32);
|
||||
uint16x4_t vRes2 = vqmovun_s32(vline2_s32);
|
||||
vst1q_u16(_dst + i, vcombine_u16(vRes1, vRes2));
|
||||
@@ -1704,7 +1705,7 @@ CVTS_FUNC1(s16, 16,
|
||||
#else
|
||||
CVTS_FUNC1(s16, 16,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1718,8 +1719,8 @@ CVTS_FUNC1(s16, 16,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int16x4_t vRes1 = vqmovn_s32(vline1_s32);
|
||||
int16x4_t vRes2 = vqmovn_s32(vline2_s32);
|
||||
vst1q_s16(_dst + i, vcombine_s16(vRes1, vRes2));
|
||||
@@ -1761,7 +1762,7 @@ CVTS_FUNC(s16, s32, 8,
|
||||
#else
|
||||
CVTS_FUNC(s16, s32, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1775,8 +1776,8 @@ CVTS_FUNC(s16, s32, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
vst1q_s32(_dst + i + 0, vline1_s32);
|
||||
vst1q_s32(_dst + i + 4, vline2_s32);
|
||||
}
|
||||
@@ -1870,7 +1871,7 @@ CVTS_FUNC(s32, u8, 8,
|
||||
#else
|
||||
CVTS_FUNC(s32, u8, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1883,8 +1884,8 @@ CVTS_FUNC(s32, u8, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
uint16x4_t vRes1 = vqmovun_s32(vline1_s32);
|
||||
uint16x4_t vRes2 = vqmovun_s32(vline2_s32);
|
||||
uint8x8_t vRes = vqmovn_u16(vcombine_u16(vRes1, vRes2));
|
||||
@@ -1928,7 +1929,7 @@ CVTS_FUNC(s32, s8, 8,
|
||||
#else
|
||||
CVTS_FUNC(s32, s8, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1941,8 +1942,8 @@ CVTS_FUNC(s32, s8, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int16x4_t vRes1 = vqmovn_s32(vline1_s32);
|
||||
int16x4_t vRes2 = vqmovn_s32(vline2_s32);
|
||||
int8x8_t vRes = vqmovn_s16(vcombine_s16(vRes1, vRes2));
|
||||
@@ -1985,7 +1986,7 @@ CVTS_FUNC(s32, u16, 8,
|
||||
#else
|
||||
CVTS_FUNC(s32, u16, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -1998,8 +1999,8 @@ CVTS_FUNC(s32, u16, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
uint16x4_t vRes1 = vqmovun_s32(vline1_s32);
|
||||
uint16x4_t vRes2 = vqmovun_s32(vline2_s32);
|
||||
vst1q_u16(_dst + i, vcombine_u16(vRes1, vRes2));
|
||||
@@ -2041,7 +2042,7 @@ CVTS_FUNC(s32, s16, 8,
|
||||
#else
|
||||
CVTS_FUNC(s32, s16, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -2054,8 +2055,8 @@ CVTS_FUNC(s32, s16, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int16x4_t vRes1 = vqmovn_s32(vline1_s32);
|
||||
int16x4_t vRes2 = vqmovn_s32(vline2_s32);
|
||||
vst1q_s16(_dst + i, vcombine_s16(vRes1, vRes2));
|
||||
@@ -2097,7 +2098,7 @@ CVTS_FUNC1(s32, 8,
|
||||
#else
|
||||
CVTS_FUNC1(s32, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -2110,8 +2111,8 @@ CVTS_FUNC1(s32, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
vst1q_s32(_dst + i + 0, vline1_s32);
|
||||
vst1q_s32(_dst + i + 4, vline2_s32);
|
||||
}
|
||||
@@ -2272,7 +2273,7 @@ CVTS_FUNC(f32, s8, 8,
|
||||
#else
|
||||
CVTS_FUNC(f32, s8, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -2283,8 +2284,8 @@ CVTS_FUNC(f32, s8, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int16x4_t vRes1 = vqmovn_s32(vline1_s32);
|
||||
int16x4_t vRes2 = vqmovn_s32(vline2_s32);
|
||||
int8x8_t vRes = vqmovn_s16(vcombine_s16(vRes1, vRes2));
|
||||
@@ -2325,7 +2326,7 @@ CVTS_FUNC(f32, u16, 8,
|
||||
#else
|
||||
CVTS_FUNC(f32, u16, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -2336,8 +2337,8 @@ CVTS_FUNC(f32, u16, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
uint32x4_t vline1_u32 = vcvtq_u32_f32(vline1_f32);
|
||||
uint32x4_t vline2_u32 = vcvtq_u32_f32(vline2_f32);
|
||||
uint32x4_t vline1_u32 = internal::vroundq_u32_f32(vline1_f32);
|
||||
uint32x4_t vline2_u32 = internal::vroundq_u32_f32(vline2_f32);
|
||||
uint16x4_t vRes1 = vqmovn_u32(vline1_u32);
|
||||
uint16x4_t vRes2 = vqmovn_u32(vline2_u32);
|
||||
vst1q_u16(_dst + i, vcombine_u16(vRes1, vRes2));
|
||||
@@ -2377,7 +2378,7 @@ CVTS_FUNC(f32, s16, 8,
|
||||
#else
|
||||
CVTS_FUNC(f32, s16, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -2388,8 +2389,8 @@ CVTS_FUNC(f32, s16, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
int16x4_t vRes1 = vqmovn_s32(vline1_s32);
|
||||
int16x4_t vRes2 = vqmovn_s32(vline2_s32);
|
||||
vst1q_s16(_dst + i, vcombine_s16(vRes1, vRes2));
|
||||
@@ -2429,7 +2430,7 @@ CVTS_FUNC(f32, s32, 8,
|
||||
#else
|
||||
CVTS_FUNC(f32, s32, 8,
|
||||
float32x4_t vscale = vdupq_n_f32((f32)alpha);
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta + 0.5f);,
|
||||
float32x4_t vshift = vdupq_n_f32((f32)beta);,
|
||||
{
|
||||
for (size_t i = 0; i < w; i += 8)
|
||||
{
|
||||
@@ -2440,8 +2441,8 @@ CVTS_FUNC(f32, s32, 8,
|
||||
vline2_f32 = vmulq_f32(vline2_f32, vscale);
|
||||
vline1_f32 = vaddq_f32(vline1_f32, vshift);
|
||||
vline2_f32 = vaddq_f32(vline2_f32, vshift);
|
||||
int32x4_t vline1_s32 = vcvtq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = vcvtq_s32_f32(vline2_f32);
|
||||
int32x4_t vline1_s32 = internal::vroundq_s32_f32(vline1_f32);
|
||||
int32x4_t vline2_s32 = internal::vroundq_s32_f32(vline2_f32);
|
||||
vst1q_s32(_dst + i + 0, vline1_s32);
|
||||
vst1q_s32(_dst + i + 4, vline2_s32);
|
||||
}
|
||||
|
||||
Vendored
+7
-20
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "common.hpp"
|
||||
#include "vtransform.hpp"
|
||||
#include "vround_helper.hpp"
|
||||
|
||||
#include <cstring>
|
||||
#include <cfloat>
|
||||
@@ -51,13 +52,6 @@ namespace {
|
||||
|
||||
#ifdef CAROTENE_NEON
|
||||
|
||||
inline float32x4_t vroundq(const float32x4_t& v)
|
||||
{
|
||||
const int32x4_t signMask = vdupq_n_s32(1 << 31), half = vreinterpretq_s32_f32(vdupq_n_f32(0.5f));
|
||||
float32x4_t v_addition = vreinterpretq_f32_s32(vorrq_s32(half, vandq_s32(signMask, vreinterpretq_s32_f32(v))));
|
||||
return vaddq_f32(v, v_addition);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T divSaturateQ(const T &v1, const T &v2, const float scale)
|
||||
{
|
||||
@@ -69,17 +63,10 @@ inline T divSaturateQ(const T &v1, const T &v2, const float scale)
|
||||
}
|
||||
template <>
|
||||
inline int32x4_t divSaturateQ<int32x4_t>(const int32x4_t &v1, const int32x4_t &v2, const float scale)
|
||||
{ return vcvtq_s32_f32(vroundq(vmulq_f32(vmulq_n_f32(vcvtq_f32_s32(v1), scale), internal::vrecpq_f32(vcvtq_f32_s32(v2))))); }
|
||||
{ return internal::vroundq_s32_f32(vmulq_f32(vmulq_n_f32(vcvtq_f32_s32(v1), scale), internal::vrecpq_f32(vcvtq_f32_s32(v2)))); }
|
||||
template <>
|
||||
inline uint32x4_t divSaturateQ<uint32x4_t>(const uint32x4_t &v1, const uint32x4_t &v2, const float scale)
|
||||
{ return vcvtq_u32_f32(vroundq(vmulq_f32(vmulq_n_f32(vcvtq_f32_u32(v1), scale), internal::vrecpq_f32(vcvtq_f32_u32(v2))))); }
|
||||
|
||||
inline float32x2_t vround(const float32x2_t& v)
|
||||
{
|
||||
const int32x2_t signMask = vdup_n_s32(1 << 31), half = vreinterpret_s32_f32(vdup_n_f32(0.5f));
|
||||
float32x2_t v_addition = vreinterpret_f32_s32(vorr_s32(half, vand_s32(signMask, vreinterpret_s32_f32(v))));
|
||||
return vadd_f32(v, v_addition);
|
||||
}
|
||||
{ return internal::vroundq_u32_f32(vmulq_f32(vmulq_n_f32(vcvtq_f32_u32(v1), scale), internal::vrecpq_f32(vcvtq_f32_u32(v2)))); }
|
||||
|
||||
template <typename T>
|
||||
inline T divSaturate(const T &v1, const T &v2, const float scale)
|
||||
@@ -88,10 +75,10 @@ inline T divSaturate(const T &v1, const T &v2, const float scale)
|
||||
}
|
||||
template <>
|
||||
inline int32x2_t divSaturate<int32x2_t>(const int32x2_t &v1, const int32x2_t &v2, const float scale)
|
||||
{ return vcvt_s32_f32(vround(vmul_f32(vmul_n_f32(vcvt_f32_s32(v1), scale), internal::vrecp_f32(vcvt_f32_s32(v2))))); }
|
||||
{ return internal::vround_s32_f32(vmul_f32(vmul_n_f32(vcvt_f32_s32(v1), scale), internal::vrecp_f32(vcvt_f32_s32(v2)))); }
|
||||
template <>
|
||||
inline uint32x2_t divSaturate<uint32x2_t>(const uint32x2_t &v1, const uint32x2_t &v2, const float scale)
|
||||
{ return vcvt_u32_f32(vround(vmul_f32(vmul_n_f32(vcvt_f32_u32(v1), scale), internal::vrecp_f32(vcvt_f32_u32(v2))))); }
|
||||
{ return internal::vround_u32_f32(vmul_f32(vmul_n_f32(vcvt_f32_u32(v1), scale), internal::vrecp_f32(vcvt_f32_u32(v2)))); }
|
||||
|
||||
|
||||
template <typename T>
|
||||
@@ -157,8 +144,8 @@ void div(const Size2D &size,
|
||||
|
||||
if (scale == 0.0f ||
|
||||
(std::numeric_limits<T>::is_integer &&
|
||||
(scale * std::numeric_limits<T>::max()) < 1.0f &&
|
||||
(scale * std::numeric_limits<T>::max()) > -1.0f))
|
||||
(scale * static_cast<float>(std::numeric_limits<T>::max())) < 1.0f &&
|
||||
(scale * static_cast<float>(std::numeric_limits<T>::max())) > -1.0f))
|
||||
{
|
||||
for (size_t y = 0; y < size.height; ++y)
|
||||
{
|
||||
|
||||
+12
-41
@@ -58,7 +58,7 @@ void pyrLKOptFlowLevel(const Size2D &size, s32 cn,
|
||||
u8 *status, f32 *err,
|
||||
const Size2D &winSize,
|
||||
u32 terminationCount, f64 terminationEpsilon,
|
||||
u32 level, u32 maxLevel, bool useInitialFlow, bool getMinEigenVals,
|
||||
bool getMinEigenVals,
|
||||
f32 minEigThreshold)
|
||||
{
|
||||
internal::assertSupportedConfiguration();
|
||||
@@ -74,32 +74,11 @@ void pyrLKOptFlowLevel(const Size2D &size, s32 cn,
|
||||
|
||||
for( u32 ptidx = 0; ptidx < ptCount; ptidx++ )
|
||||
{
|
||||
f32 levscale = (1./(1 << level));
|
||||
u32 ptref = ptidx << 1;
|
||||
f32 prevPtX = prevPts[ptref+0]*levscale;
|
||||
f32 prevPtY = prevPts[ptref+1]*levscale;
|
||||
f32 nextPtX;
|
||||
f32 nextPtY;
|
||||
if( level == maxLevel )
|
||||
{
|
||||
if( useInitialFlow )
|
||||
{
|
||||
nextPtX = nextPts[ptref+0]*levscale;
|
||||
nextPtY = nextPts[ptref+1]*levscale;
|
||||
}
|
||||
else
|
||||
{
|
||||
nextPtX = prevPtX;
|
||||
nextPtY = prevPtY;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nextPtX = nextPts[ptref+0]*2.f;
|
||||
nextPtY = nextPts[ptref+1]*2.f;
|
||||
}
|
||||
nextPts[ptref+0] = nextPtX;
|
||||
nextPts[ptref+1] = nextPtY;
|
||||
f32 prevPtX = prevPts[ptref+0];
|
||||
f32 prevPtY = prevPts[ptref+1];
|
||||
f32 nextPtX = nextPts[ptref+0];
|
||||
f32 nextPtY = nextPts[ptref+1];
|
||||
|
||||
s32 iprevPtX, iprevPtY;
|
||||
s32 inextPtX, inextPtY;
|
||||
@@ -111,13 +90,10 @@ void pyrLKOptFlowLevel(const Size2D &size, s32 cn,
|
||||
if( iprevPtX < -(s32)winSize.width || iprevPtX >= (s32)size.width ||
|
||||
iprevPtY < -(s32)winSize.height || iprevPtY >= (s32)size.height )
|
||||
{
|
||||
if( level == 0 )
|
||||
{
|
||||
if( status )
|
||||
status[ptidx] = false;
|
||||
if( err )
|
||||
err[ptidx] = 0;
|
||||
}
|
||||
if( status )
|
||||
status[ptidx] = false;
|
||||
if( err )
|
||||
err[ptidx] = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -333,7 +309,7 @@ void pyrLKOptFlowLevel(const Size2D &size, s32 cn,
|
||||
|
||||
if( minEig < minEigThreshold || D < FLT_EPSILON )
|
||||
{
|
||||
if( level == 0 && status )
|
||||
if( status )
|
||||
status[ptidx] = false;
|
||||
continue;
|
||||
}
|
||||
@@ -353,7 +329,7 @@ void pyrLKOptFlowLevel(const Size2D &size, s32 cn,
|
||||
if( inextPtX < -(s32)winSize.width || inextPtX >= (s32)size.width ||
|
||||
inextPtY < -(s32)winSize.height || inextPtY >= (s32)size.height )
|
||||
{
|
||||
if( level == 0 && status )
|
||||
if( status )
|
||||
status[ptidx] = false;
|
||||
break;
|
||||
}
|
||||
@@ -469,8 +445,7 @@ void pyrLKOptFlowLevel(const Size2D &size, s32 cn,
|
||||
prevDeltaX = deltaX;
|
||||
prevDeltaY = deltaY;
|
||||
}
|
||||
|
||||
if( status && status[ptidx] && err && level == 0 && !getMinEigenVals )
|
||||
if( status && status[ptidx] && err && !getMinEigenVals )
|
||||
{
|
||||
f32 nextPointX = nextPts[ptref+0] - halfWinX;
|
||||
f32 nextPointY = nextPts[ptref+1] - halfWinY;
|
||||
@@ -526,9 +501,6 @@ void pyrLKOptFlowLevel(const Size2D &size, s32 cn,
|
||||
(void)winSize;
|
||||
(void)terminationCount;
|
||||
(void)terminationEpsilon;
|
||||
(void)level;
|
||||
(void)maxLevel;
|
||||
(void)useInitialFlow;
|
||||
(void)getMinEigenVals;
|
||||
(void)minEigThreshold;
|
||||
(void)ptCount;
|
||||
@@ -536,4 +508,3 @@ void pyrLKOptFlowLevel(const Size2D &size, s32 cn,
|
||||
}
|
||||
|
||||
}//CAROTENE_NS
|
||||
|
||||
|
||||
Vendored
+7
-8
@@ -41,6 +41,7 @@
|
||||
#include <cmath>
|
||||
|
||||
#include "common.hpp"
|
||||
#include "vround_helper.hpp"
|
||||
|
||||
namespace CAROTENE_NS {
|
||||
|
||||
@@ -121,8 +122,6 @@ void phase(const Size2D &size,
|
||||
size_t roiw16 = size.width >= 15 ? size.width - 15 : 0;
|
||||
size_t roiw8 = size.width >= 7 ? size.width - 7 : 0;
|
||||
|
||||
float32x4_t v_05 = vdupq_n_f32(0.5f);
|
||||
|
||||
for (size_t i = 0; i < size.height; ++i)
|
||||
{
|
||||
const s16 * src0 = internal::getRowPtr(src0Base, src0Stride, i);
|
||||
@@ -149,8 +148,8 @@ void phase(const Size2D &size,
|
||||
float32x4_t v_dst32f1;
|
||||
FASTATAN2VECTOR(v_src1_p, v_src0_p, v_dst32f1)
|
||||
|
||||
uint16x8_t v_dst16s0 = vcombine_u16(vmovn_u32(vcvtq_u32_f32(vaddq_f32(v_dst32f0, v_05))),
|
||||
vmovn_u32(vcvtq_u32_f32(vaddq_f32(v_dst32f1, v_05))));
|
||||
uint16x8_t v_dst16s0 = vcombine_u16(vmovn_u32(internal::vroundq_u32_f32(v_dst32f0)),
|
||||
vmovn_u32(internal::vroundq_u32_f32(v_dst32f1)));
|
||||
|
||||
// 1
|
||||
v_src0_p = vcvtq_f32_s32(vmovl_s16(vget_low_s16(v_src01)));
|
||||
@@ -161,8 +160,8 @@ void phase(const Size2D &size,
|
||||
v_src1_p = vcvtq_f32_s32(vmovl_s16(vget_high_s16(v_src11)));
|
||||
FASTATAN2VECTOR(v_src1_p, v_src0_p, v_dst32f1)
|
||||
|
||||
uint16x8_t v_dst16s1 = vcombine_u16(vmovn_u32(vcvtq_u32_f32(vaddq_f32(v_dst32f0, v_05))),
|
||||
vmovn_u32(vcvtq_u32_f32(vaddq_f32(v_dst32f1, v_05))));
|
||||
uint16x8_t v_dst16s1 = vcombine_u16(vmovn_u32(internal::vroundq_u32_f32(v_dst32f0)),
|
||||
vmovn_u32(internal::vroundq_u32_f32(v_dst32f1)));
|
||||
|
||||
vst1q_u8(dst + j, vcombine_u8(vmovn_u16(v_dst16s0),
|
||||
vmovn_u16(v_dst16s1)));
|
||||
@@ -182,8 +181,8 @@ void phase(const Size2D &size,
|
||||
float32x4_t v_dst32f1;
|
||||
FASTATAN2VECTOR(v_src1_p, v_src0_p, v_dst32f1)
|
||||
|
||||
uint16x8_t v_dst = vcombine_u16(vmovn_u32(vcvtq_u32_f32(vaddq_f32(v_dst32f0, v_05))),
|
||||
vmovn_u32(vcvtq_u32_f32(vaddq_f32(v_dst32f1, v_05))));
|
||||
uint16x8_t v_dst = vcombine_u16(vmovn_u32(internal::vroundq_u32_f32(v_dst32f0)),
|
||||
vmovn_u32(internal::vroundq_u32_f32(v_dst32f1)));
|
||||
|
||||
vst1_u8(dst + j, vmovn_u16(v_dst));
|
||||
}
|
||||
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* By downloading, copying, installing or using the software you agree to this license.
|
||||
* If you do not agree to this license, do not download, install,
|
||||
* copy or use the software.
|
||||
*
|
||||
*
|
||||
* License Agreement
|
||||
* For Open Source Computer Vision Library
|
||||
* (3-clause BSD License)
|
||||
*
|
||||
* Copyright (C) 2014-2015, NVIDIA Corporation, all rights reserved.
|
||||
* Third party copyrights are property of their respective owners.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* * Neither the names of the copyright holders nor the names of the contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* This software is provided by the copyright holders and contributors "as is" and
|
||||
* any express or implied warranties, including, but not limited to, the implied
|
||||
* warranties of merchantability and fitness for a particular purpose are disclaimed.
|
||||
* In no event shall copyright holders or contributors be liable for any direct,
|
||||
* indirect, incidental, special, exemplary, or consequential damages
|
||||
* (including, but not limited to, procurement of substitute goods or services;
|
||||
* loss of use, data, or profits; or business interruption) however caused
|
||||
* and on any theory of liability, whether in contract, strict liability,
|
||||
* or tort (including negligence or otherwise) arising in any way out of
|
||||
* the use of this software, even if advised of the possibility of such damage.
|
||||
*/
|
||||
|
||||
#ifndef CAROTENE_SRC_VROUND_HELPER_HPP
|
||||
#define CAROTENE_SRC_VROUND_HELPER_HPP
|
||||
|
||||
#include "common.hpp"
|
||||
#include "vtransform.hpp"
|
||||
|
||||
#ifdef CAROTENE_NEON
|
||||
|
||||
/**
|
||||
* This helper header is for rounding from float32xN to uin32xN or int32xN to nearest, ties to even.
|
||||
* See https://en.wikipedia.org/wiki/Rounding#Rounding_half_to_even
|
||||
*/
|
||||
|
||||
// See https://github.com/opencv/opencv/pull/24271#issuecomment-1867318007
|
||||
#define CAROTENE_ROUND_DELTA (12582912.0f)
|
||||
|
||||
namespace CAROTENE_NS { namespace internal {
|
||||
|
||||
inline uint32x4_t vroundq_u32_f32(const float32x4_t val)
|
||||
{
|
||||
#if defined(__ARM_ARCH) && (__ARM_ARCH >= 8)
|
||||
return vcvtnq_u32_f32(val);
|
||||
#else
|
||||
const float32x4_t delta = vdupq_n_f32(CAROTENE_ROUND_DELTA);
|
||||
return vcvtq_u32_f32(vsubq_f32(vaddq_f32(val, delta), delta));
|
||||
#endif
|
||||
}
|
||||
|
||||
inline uint32x2_t vround_u32_f32(const float32x2_t val)
|
||||
{
|
||||
#if defined(__ARM_ARCH) && (__ARM_ARCH >= 8)
|
||||
return vcvtn_u32_f32(val);
|
||||
#else
|
||||
const float32x2_t delta = vdup_n_f32(CAROTENE_ROUND_DELTA);
|
||||
return vcvt_u32_f32(vsub_f32(vadd_f32(val, delta), delta));
|
||||
#endif
|
||||
}
|
||||
|
||||
inline int32x4_t vroundq_s32_f32(const float32x4_t val)
|
||||
{
|
||||
#if defined(__ARM_ARCH) && (__ARM_ARCH >= 8)
|
||||
return vcvtnq_s32_f32(val);
|
||||
#else
|
||||
const float32x4_t delta = vdupq_n_f32(CAROTENE_ROUND_DELTA);
|
||||
return vcvtq_s32_f32(vsubq_f32(vaddq_f32(val, delta), delta));
|
||||
#endif
|
||||
}
|
||||
|
||||
inline int32x2_t vround_s32_f32(const float32x2_t val)
|
||||
{
|
||||
#if defined(__ARM_ARCH) && (__ARM_ARCH >= 8)
|
||||
return vcvtn_s32_f32(val);
|
||||
#else
|
||||
const float32x2_t delta = vdup_n_f32(CAROTENE_ROUND_DELTA);
|
||||
return vcvt_s32_f32(vsub_f32(vadd_f32(val, delta), delta));
|
||||
#endif
|
||||
}
|
||||
|
||||
} }
|
||||
|
||||
#endif // CAROTENE_NEON
|
||||
|
||||
#endif
|
||||
Vendored
+49
@@ -0,0 +1,49 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# CMake file for opencv_lapack. See root CMakeLists.txt
|
||||
#
|
||||
# ----------------------------------------------------------------------------
|
||||
project(clapack)
|
||||
|
||||
# TODO: extract it from sources somehow
|
||||
set(CLAPACK_VERSION "3.9.0" PARENT_SCOPE)
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
|
||||
# The .cpp files:
|
||||
file(GLOB lapack_srcs src/*.c)
|
||||
file(GLOB runtime_srcs runtime/*.c)
|
||||
file(GLOB lib_hdrs include/*.h)
|
||||
|
||||
# ----------------------------------------------------------------------------------
|
||||
# Define the library target:
|
||||
# ----------------------------------------------------------------------------------
|
||||
|
||||
set(the_target "libclapack")
|
||||
|
||||
add_library(${the_target} STATIC ${lapack_srcs} ${runtime_srcs} ${lib_hdrs})
|
||||
|
||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-parentheses -Wno-uninitialized -Wno-array-bounds
|
||||
-Wno-implicit-function-declaration -Wno-unused -Wunused-parameter -Wstringop-truncation
|
||||
-Wtautological-negation-compare) # gcc/clang warnings
|
||||
ocv_warnings_disable(CMAKE_C_FLAGS /wd4244 /wd4554 /wd4723 /wd4819) # visual studio warnings
|
||||
|
||||
set_target_properties(${the_target}
|
||||
PROPERTIES OUTPUT_NAME ${the_target}
|
||||
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME ${the_target}
|
||||
COMPILE_PDB_NAME_DEBUG "${the_target}${OPENCV_DEBUG_POSTFIX}"
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
|
||||
)
|
||||
|
||||
set(CLAPACK_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" PARENT_SCOPE)
|
||||
set(CLAPACK_LIBRARIES ${the_target} PARENT_SCOPE)
|
||||
|
||||
if(ENABLE_SOLUTION_FOLDERS)
|
||||
set_target_properties(${the_target} PROPERTIES FOLDER "3rdparty")
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
ocv_install_target(${the_target} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
||||
endif()
|
||||
|
||||
ocv_install_3rdparty_licenses(clapack lapack_LICENSE)
|
||||
Vendored
+102
@@ -0,0 +1,102 @@
|
||||
#ifndef __CBLAS_H__
|
||||
#define __CBLAS_H__
|
||||
|
||||
/* most of the stuff is in lapacke.h */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct lapack_complex
|
||||
{
|
||||
float r, i;
|
||||
} lapack_complex;
|
||||
|
||||
typedef struct lapack_doublecomplex
|
||||
{
|
||||
double r, i;
|
||||
} lapack_doublecomplex;
|
||||
|
||||
typedef enum {CblasRowMajor=101, CblasColMajor=102} CBLAS_LAYOUT;
|
||||
typedef enum {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113} CBLAS_TRANSPOSE;
|
||||
|
||||
void cblas_xerbla(const CBLAS_LAYOUT layout, int info,
|
||||
const char *rout, const char *form, ...);
|
||||
|
||||
void cblas_sgemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA,
|
||||
CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||
const int K, const float alpha, const float *A,
|
||||
const int lda, const float *B, const int ldb,
|
||||
const float beta, float *C, const int ldc);
|
||||
|
||||
void cblas_dgemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA,
|
||||
CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||
const int K, const double alpha, const double *A,
|
||||
const int lda, const double *B, const int ldb,
|
||||
const double beta, double *C, const int ldc);
|
||||
|
||||
void cblas_cgemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA,
|
||||
CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||
const int K, const void *alpha, const void *A,
|
||||
const int lda, const void *B, const int ldb,
|
||||
const void *beta, void *C, const int ldc);
|
||||
|
||||
void cblas_zgemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA,
|
||||
CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||
const int K, const void *alpha, const void *A,
|
||||
const int lda, const void *B, const int ldb,
|
||||
const void *beta, void *C, const int ldc);
|
||||
|
||||
int xerbla_(char *, int *);
|
||||
int lsame_(char *, char *);
|
||||
double slamch_(char* cmach);
|
||||
double slamc3_(float *a, float *b);
|
||||
double dlamch_(char* cmach);
|
||||
double dlamc3_(double *a, double *b);
|
||||
|
||||
int dgels_(char *trans, int *m, int *n, int *nrhs, double *a,
|
||||
int *lda, double *b, int *ldb, double *work, int *lwork, int *info);
|
||||
|
||||
int dgesv_(int *n, int *nrhs, double *a, int *lda, int *ipiv,
|
||||
double *b, int *ldb, int *info);
|
||||
|
||||
int dgetrf_(int *m, int *n, double *a, int *lda, int *ipiv,
|
||||
int *info);
|
||||
|
||||
int dposv_(char *uplo, int *n, int *nrhs, double *a, int *
|
||||
lda, double *b, int *ldb, int *info);
|
||||
|
||||
int dpotrf_(char *uplo, int *n, double *a, int *lda, int *
|
||||
info);
|
||||
|
||||
int sgels_(char *trans, int *m, int *n, int *nrhs, float *a,
|
||||
int *lda, float *b, int *ldb, float *work, int *lwork, int *info);
|
||||
|
||||
int sgeev_(char *jobvl, char *jobvr, int *n, float *a, int *
|
||||
lda, float *wr, float *wi, float *vl, int *ldvl, float *vr, int *
|
||||
ldvr, float *work, int *lwork, int *info);
|
||||
|
||||
int sgeqrf_(int *m, int *n, float *a, int *lda, float *tau,
|
||||
float *work, int *lwork, int *info);
|
||||
|
||||
int sgesv_(int *n, int *nrhs, float *a, int *lda, int *ipiv,
|
||||
float *b, int *ldb, int *info);
|
||||
|
||||
int sgetrf_(int *m, int *n, float *a, int *lda, int *ipiv,
|
||||
int *info);
|
||||
|
||||
int sposv_(char *uplo, int *n, int *nrhs, float *a, int *
|
||||
lda, float *b, int *ldb, int *info);
|
||||
|
||||
int spotrf_(char *uplo, int *n, float *a, int *lda, int *
|
||||
info);
|
||||
|
||||
int sgesdd_(char *jobz, int *m, int *n, float *a, int *lda,
|
||||
float *s, float *u, int *ldu, float *vt, int *ldvt, float *work,
|
||||
int *lwork, int *iwork, int *info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CBLAS_H__ */
|
||||
Vendored
+129
@@ -0,0 +1,129 @@
|
||||
/* f2c.h -- Standard Fortran to C header file */
|
||||
|
||||
/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
|
||||
|
||||
- From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
|
||||
|
||||
#ifndef __F2C_H__
|
||||
#define __F2C_H__
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cblas.h"
|
||||
#include "lapack.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef complex
|
||||
|
||||
typedef int integer;
|
||||
typedef unsigned int uinteger;
|
||||
typedef char *address;
|
||||
typedef short int shortint;
|
||||
typedef float real;
|
||||
typedef double doublereal;
|
||||
typedef lapack_complex complex;
|
||||
typedef lapack_doublecomplex doublecomplex;
|
||||
typedef int logical;
|
||||
typedef short int shortlogical;
|
||||
typedef char logical1;
|
||||
typedef char integer1;
|
||||
|
||||
#define TRUE_ (1)
|
||||
#define FALSE_ (0)
|
||||
|
||||
#ifndef abs
|
||||
#define abs(x) ((x) >= 0 ? (x) : -(x))
|
||||
#endif
|
||||
#define dabs(x) (double)abs(x)
|
||||
#ifndef min
|
||||
#define min(a,b) ((a) <= (b) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef max
|
||||
#define max(a,b) ((a) >= (b) ? (a) : (b))
|
||||
#endif
|
||||
#define dmin(a,b) (double)min(a,b)
|
||||
#define dmax(a,b) (double)max(a,b)
|
||||
#define bit_test(a,b) ((a) >> (b) & 1)
|
||||
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
|
||||
#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
|
||||
|
||||
static __inline double r_lg10(float *x)
|
||||
{
|
||||
return 0.43429448190325182765*log(*x);
|
||||
}
|
||||
|
||||
static __inline double d_lg10(double *x)
|
||||
{
|
||||
return 0.43429448190325182765*log(*x);
|
||||
}
|
||||
|
||||
static __inline double d_sign(double *a, double *b)
|
||||
{
|
||||
double x = fabs(*a);
|
||||
return *b >= 0 ? x : -x;
|
||||
}
|
||||
|
||||
static __inline double r_sign(float *a, float *b)
|
||||
{
|
||||
double x = fabs((double)*a);
|
||||
return *b >= 0 ? x : -x;
|
||||
}
|
||||
|
||||
static __inline int i_nint(float *x)
|
||||
{
|
||||
return (int)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x));
|
||||
}
|
||||
|
||||
int pow_ii(int *ap, int *bp);
|
||||
double pow_di(double *ap, int *bp);
|
||||
static __inline double pow_ri(float *ap, int *bp)
|
||||
{
|
||||
double apd = *ap;
|
||||
return pow_di(&apd, bp);
|
||||
}
|
||||
static __inline double pow_dd(double *ap, double *bp)
|
||||
{
|
||||
return pow(*ap, *bp);
|
||||
}
|
||||
|
||||
static __inline void d_cnjg(doublecomplex *r, doublecomplex *z)
|
||||
{
|
||||
double zi = z->i;
|
||||
r->r = z->r;
|
||||
r->i = -zi;
|
||||
}
|
||||
|
||||
static __inline void r_cnjg(complex *r, complex *z)
|
||||
{
|
||||
float zi = z->i;
|
||||
r->r = z->r;
|
||||
r->i = -zi;
|
||||
}
|
||||
|
||||
static __inline int s_copy(char *a, char *b, int maxlen)
|
||||
{
|
||||
strncpy(a, b, maxlen);
|
||||
a[maxlen] = '\0';
|
||||
return 0;
|
||||
}
|
||||
|
||||
int s_cat(char *lp, char **rpp, int* rnp, int *np);
|
||||
int s_cmp(char *a0, char *b0);
|
||||
static __inline int i_len(char* s)
|
||||
{
|
||||
return (int)strlen(s);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Vendored
+386
@@ -0,0 +1,386 @@
|
||||
// this is auto-generated header for Lapack subset
|
||||
#ifndef __CLAPACK_H__
|
||||
#define __CLAPACK_H__
|
||||
|
||||
#include "cblas.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int cgemm_(char *transa, char *transb, int *m, int *n, int *
|
||||
k, lapack_complex *alpha, lapack_complex *a, int *lda, lapack_complex *b, int *ldb,
|
||||
lapack_complex *beta, lapack_complex *c__, int *ldc);
|
||||
|
||||
int daxpy_(int *n, double *da, double *dx, int *incx, double
|
||||
*dy, int *incy);
|
||||
|
||||
int dbdsdc_(char *uplo, char *compq, int *n, double *d__,
|
||||
double *e, double *u, int *ldu, double *vt, int *ldvt, double *q, int
|
||||
*iq, double *work, int *iwork, int *info);
|
||||
|
||||
int dbdsqr_(char *uplo, int *n, int *ncvt, int *nru, int *
|
||||
ncc, double *d__, double *e, double *vt, int *ldvt, double *u, int *
|
||||
ldu, double *c__, int *ldc, double *work, int *info);
|
||||
|
||||
int dcombssq_(double *v1, double *v2);
|
||||
|
||||
int dcopy_(int *n, double *dx, int *incx, double *dy, int *
|
||||
incy);
|
||||
|
||||
double ddot_(int *n, double *dx, int *incx, double *dy, int *incy);
|
||||
|
||||
int dgebak_(char *job, char *side, int *n, int *ilo, int *
|
||||
ihi, double *scale, int *m, double *v, int *ldv, int *info);
|
||||
|
||||
int dgebal_(char *job, int *n, double *a, int *lda, int *ilo,
|
||||
int *ihi, double *scale, int *info);
|
||||
|
||||
int dgebd2_(int *m, int *n, double *a, int *lda, double *d__,
|
||||
double *e, double *tauq, double *taup, double *work, int *info);
|
||||
|
||||
int dgebrd_(int *m, int *n, double *a, int *lda, double *d__,
|
||||
double *e, double *tauq, double *taup, double *work, int *lwork, int
|
||||
*info);
|
||||
|
||||
int dgeev_(char *jobvl, char *jobvr, int *n, double *a, int *
|
||||
lda, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *
|
||||
ldvr, double *work, int *lwork, int *info);
|
||||
|
||||
int dgehd2_(int *n, int *ilo, int *ihi, double *a, int *lda,
|
||||
double *tau, double *work, int *info);
|
||||
|
||||
int dgehrd_(int *n, int *ilo, int *ihi, double *a, int *lda,
|
||||
double *tau, double *work, int *lwork, int *info);
|
||||
|
||||
int dgelq2_(int *m, int *n, double *a, int *lda, double *tau,
|
||||
double *work, int *info);
|
||||
|
||||
int dgelqf_(int *m, int *n, double *a, int *lda, double *tau,
|
||||
double *work, int *lwork, int *info);
|
||||
|
||||
int dgemm_(char *transa, char *transb, int *m, int *n, int *
|
||||
k, double *alpha, double *a, int *lda, double *b, int *ldb, double *
|
||||
beta, double *c__, int *ldc);
|
||||
|
||||
int dgemv_(char *trans, int *m, int *n, double *alpha,
|
||||
double *a, int *lda, double *x, int *incx, double *beta, double *y,
|
||||
int *incy);
|
||||
|
||||
int dgeqr2_(int *m, int *n, double *a, int *lda, double *tau,
|
||||
double *work, int *info);
|
||||
|
||||
int dgeqrf_(int *m, int *n, double *a, int *lda, double *tau,
|
||||
double *work, int *lwork, int *info);
|
||||
|
||||
int dger_(int *m, int *n, double *alpha, double *x, int *
|
||||
incx, double *y, int *incy, double *a, int *lda);
|
||||
|
||||
int dgesdd_(char *jobz, int *m, int *n, double *a, int *lda,
|
||||
double *s, double *u, int *ldu, double *vt, int *ldvt, double *work,
|
||||
int *lwork, int *iwork, int *info);
|
||||
|
||||
int dhseqr_(char *job, char *compz, int *n, int *ilo, int *
|
||||
ihi, double *h__, int *ldh, double *wr, double *wi, double *z__, int *
|
||||
ldz, double *work, int *lwork, int *info);
|
||||
|
||||
int disnan_(double *din);
|
||||
|
||||
// "small" is a macro defined in Windows headers: https://stackoverflow.com/a/27794577
|
||||
#ifdef small
|
||||
#undef small
|
||||
#endif
|
||||
|
||||
int dlabad_(double *small, double *large);
|
||||
|
||||
int dlabrd_(int *m, int *n, int *nb, double *a, int *lda,
|
||||
double *d__, double *e, double *tauq, double *taup, double *x, int *
|
||||
ldx, double *y, int *ldy);
|
||||
|
||||
int dlacpy_(char *uplo, int *m, int *n, double *a, int *lda,
|
||||
double *b, int *ldb);
|
||||
|
||||
int dladiv1_(double *a, double *b, double *c__, double *d__,
|
||||
double *p, double *q);
|
||||
|
||||
double dladiv2_(double *a, double *b, double *c__, double *d__, double *r__,
|
||||
double *t);
|
||||
|
||||
int dladiv_(double *a, double *b, double *c__, double *d__,
|
||||
double *p, double *q);
|
||||
|
||||
int dlaed6_(int *kniter, int *orgati, double *rho, double *
|
||||
d__, double *z__, double *finit, double *tau, int *info);
|
||||
|
||||
int dlaexc_(int *wantq, int *n, double *t, int *ldt, double *
|
||||
q, int *ldq, int *j1, int *n1, int *n2, double *work, int *info);
|
||||
|
||||
int dlahqr_(int *wantt, int *wantz, int *n, int *ilo, int *
|
||||
ihi, double *h__, int *ldh, double *wr, double *wi, int *iloz, int *
|
||||
ihiz, double *z__, int *ldz, int *info);
|
||||
|
||||
int dlahr2_(int *n, int *k, int *nb, double *a, int *lda,
|
||||
double *tau, double *t, int *ldt, double *y, int *ldy);
|
||||
|
||||
int dlaisnan_(double *din1, double *din2);
|
||||
|
||||
int dlaln2_(int *ltrans, int *na, int *nw, double *smin,
|
||||
double *ca, double *a, int *lda, double *d1, double *d2, double *b,
|
||||
int *ldb, double *wr, double *wi, double *x, int *ldx, double *scale,
|
||||
double *xnorm, int *info);
|
||||
|
||||
int dlamrg_(int *n1, int *n2, double *a, int *dtrd1, int *
|
||||
dtrd2, int *index);
|
||||
|
||||
double dlange_(char *norm, int *m, int *n, double *a, int *lda, double *work);
|
||||
|
||||
double dlanst_(char *norm, int *n, double *d__, double *e);
|
||||
|
||||
int dlanv2_(double *a, double *b, double *c__, double *d__,
|
||||
double *rt1r, double *rt1i, double *rt2r, double *rt2i, double *cs,
|
||||
double *sn);
|
||||
|
||||
double dlapy2_(double *x, double *y);
|
||||
|
||||
int dlaqr0_(int *wantt, int *wantz, int *n, int *ilo, int *
|
||||
ihi, double *h__, int *ldh, double *wr, double *wi, int *iloz, int *
|
||||
ihiz, double *z__, int *ldz, double *work, int *lwork, int *info);
|
||||
|
||||
int dlaqr1_(int *n, double *h__, int *ldh, double *sr1,
|
||||
double *si1, double *sr2, double *si2, double *v);
|
||||
|
||||
int dlaqr2_(int *wantt, int *wantz, int *n, int *ktop, int *
|
||||
kbot, int *nw, double *h__, int *ldh, int *iloz, int *ihiz, double *
|
||||
z__, int *ldz, int *ns, int *nd, double *sr, double *si, double *v,
|
||||
int *ldv, int *nh, double *t, int *ldt, int *nv, double *wv, int *
|
||||
ldwv, double *work, int *lwork);
|
||||
|
||||
int dlaqr3_(int *wantt, int *wantz, int *n, int *ktop, int *
|
||||
kbot, int *nw, double *h__, int *ldh, int *iloz, int *ihiz, double *
|
||||
z__, int *ldz, int *ns, int *nd, double *sr, double *si, double *v,
|
||||
int *ldv, int *nh, double *t, int *ldt, int *nv, double *wv, int *
|
||||
ldwv, double *work, int *lwork);
|
||||
|
||||
int dlaqr4_(int *wantt, int *wantz, int *n, int *ilo, int *
|
||||
ihi, double *h__, int *ldh, double *wr, double *wi, int *iloz, int *
|
||||
ihiz, double *z__, int *ldz, double *work, int *lwork, int *info);
|
||||
|
||||
int dlaqr5_(int *wantt, int *wantz, int *kacc22, int *n, int
|
||||
*ktop, int *kbot, int *nshfts, double *sr, double *si, double *h__,
|
||||
int *ldh, int *iloz, int *ihiz, double *z__, int *ldz, double *v, int
|
||||
*ldv, double *u, int *ldu, int *nv, double *wv, int *ldwv, int *nh,
|
||||
double *wh, int *ldwh);
|
||||
|
||||
int dlarf_(char *side, int *m, int *n, double *v, int *incv,
|
||||
double *tau, double *c__, int *ldc, double *work);
|
||||
|
||||
int dlarfb_(char *side, char *trans, char *direct, char *
|
||||
storev, int *m, int *n, int *k, double *v, int *ldv, double *t, int *
|
||||
ldt, double *c__, int *ldc, double *work, int *ldwork);
|
||||
|
||||
int dlarfg_(int *n, double *alpha, double *x, int *incx,
|
||||
double *tau);
|
||||
|
||||
int dlarft_(char *direct, char *storev, int *n, int *k,
|
||||
double *v, int *ldv, double *tau, double *t, int *ldt);
|
||||
|
||||
int dlarfx_(char *side, int *m, int *n, double *v, double *
|
||||
tau, double *c__, int *ldc, double *work);
|
||||
|
||||
int dlartg_(double *f, double *g, double *cs, double *sn,
|
||||
double *r__);
|
||||
|
||||
int dlas2_(double *f, double *g, double *h__, double *ssmin,
|
||||
double *ssmax);
|
||||
|
||||
int dlascl_(char *type__, int *kl, int *ku, double *cfrom,
|
||||
double *cto, int *m, int *n, double *a, int *lda, int *info);
|
||||
|
||||
int dlasd0_(int *n, int *sqre, double *d__, double *e,
|
||||
double *u, int *ldu, double *vt, int *ldvt, int *smlsiz, int *iwork,
|
||||
double *work, int *info);
|
||||
|
||||
int dlasd1_(int *nl, int *nr, int *sqre, double *d__, double
|
||||
*alpha, double *beta, double *u, int *ldu, double *vt, int *ldvt, int
|
||||
*idxq, int *iwork, double *work, int *info);
|
||||
|
||||
int dlasd2_(int *nl, int *nr, int *sqre, int *k, double *d__,
|
||||
double *z__, double *alpha, double *beta, double *u, int *ldu,
|
||||
double *vt, int *ldvt, double *dsigma, double *u2, int *ldu2, double *
|
||||
vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *
|
||||
coltyp, int *info);
|
||||
|
||||
int dlasd3_(int *nl, int *nr, int *sqre, int *k, double *d__,
|
||||
double *q, int *ldq, double *dsigma, double *u, int *ldu, double *u2,
|
||||
int *ldu2, double *vt, int *ldvt, double *vt2, int *ldvt2, int *idxc,
|
||||
int *ctot, double *z__, int *info);
|
||||
|
||||
int dlasd4_(int *n, int *i__, double *d__, double *z__,
|
||||
double *delta, double *rho, double *sigma, double *work, int *info);
|
||||
|
||||
int dlasd5_(int *i__, double *d__, double *z__, double *
|
||||
delta, double *rho, double *dsigma, double *work);
|
||||
|
||||
int dlasd6_(int *icompq, int *nl, int *nr, int *sqre, double
|
||||
*d__, double *vf, double *vl, double *alpha, double *beta, int *idxq,
|
||||
int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int
|
||||
*ldgnum, double *poles, double *difl, double *difr, double *z__, int *
|
||||
k, double *c__, double *s, double *work, int *iwork, int *info);
|
||||
|
||||
int dlasd7_(int *icompq, int *nl, int *nr, int *sqre, int *k,
|
||||
double *d__, double *z__, double *zw, double *vf, double *vfw,
|
||||
double *vl, double *vlw, double *alpha, double *beta, double *dsigma,
|
||||
int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol,
|
||||
int *ldgcol, double *givnum, int *ldgnum, double *c__, double *s, int
|
||||
*info);
|
||||
|
||||
int dlasd8_(int *icompq, int *k, double *d__, double *z__,
|
||||
double *vf, double *vl, double *difl, double *difr, int *lddifr,
|
||||
double *dsigma, double *work, int *info);
|
||||
|
||||
int dlasda_(int *icompq, int *smlsiz, int *n, int *sqre,
|
||||
double *d__, double *e, double *u, int *ldu, double *vt, int *k,
|
||||
double *difl, double *difr, double *z__, double *poles, int *givptr,
|
||||
int *givcol, int *ldgcol, int *perm, double *givnum, double *c__,
|
||||
double *s, double *work, int *iwork, int *info);
|
||||
|
||||
int dlasdq_(char *uplo, int *sqre, int *n, int *ncvt, int *
|
||||
nru, int *ncc, double *d__, double *e, double *vt, int *ldvt, double *
|
||||
u, int *ldu, double *c__, int *ldc, double *work, int *info);
|
||||
|
||||
int dlasdt_(int *n, int *lvl, int *nd, int *inode, int *
|
||||
ndiml, int *ndimr, int *msub);
|
||||
|
||||
int dlaset_(char *uplo, int *m, int *n, double *alpha,
|
||||
double *beta, double *a, int *lda);
|
||||
|
||||
int dlasq1_(int *n, double *d__, double *e, double *work,
|
||||
int *info);
|
||||
|
||||
int dlasq2_(int *n, double *z__, int *info);
|
||||
|
||||
int dlasq3_(int *i0, int *n0, double *z__, int *pp, double *
|
||||
dmin__, double *sigma, double *desig, double *qmax, int *nfail, int *
|
||||
iter, int *ndiv, int *ieee, int *ttype, double *dmin1, double *dmin2,
|
||||
double *dn, double *dn1, double *dn2, double *g, double *tau);
|
||||
|
||||
int dlasq4_(int *i0, int *n0, double *z__, int *pp, int *
|
||||
n0in, double *dmin__, double *dmin1, double *dmin2, double *dn,
|
||||
double *dn1, double *dn2, double *tau, int *ttype, double *g);
|
||||
|
||||
int dlasq5_(int *i0, int *n0, double *z__, int *pp, double *
|
||||
tau, double *sigma, double *dmin__, double *dmin1, double *dmin2,
|
||||
double *dn, double *dnm1, double *dnm2, int *ieee, double *eps);
|
||||
|
||||
int dlasq6_(int *i0, int *n0, double *z__, int *pp, double *
|
||||
dmin__, double *dmin1, double *dmin2, double *dn, double *dnm1,
|
||||
double *dnm2);
|
||||
|
||||
int dlasr_(char *side, char *pivot, char *direct, int *m,
|
||||
int *n, double *c__, double *s, double *a, int *lda);
|
||||
|
||||
int dlasrt_(char *id, int *n, double *d__, int *info);
|
||||
|
||||
int dlassq_(int *n, double *x, int *incx, double *scale,
|
||||
double *sumsq);
|
||||
|
||||
int dlasv2_(double *f, double *g, double *h__, double *ssmin,
|
||||
double *ssmax, double *snr, double *csr, double *snl, double *csl);
|
||||
|
||||
int dlasy2_(int *ltranl, int *ltranr, int *isgn, int *n1,
|
||||
int *n2, double *tl, int *ldtl, double *tr, int *ldtr, double *b, int
|
||||
*ldb, double *scale, double *x, int *ldx, double *xnorm, int *info);
|
||||
|
||||
double dnrm2_(int *n, double *x, int *incx);
|
||||
|
||||
int dorg2r_(int *m, int *n, int *k, double *a, int *lda,
|
||||
double *tau, double *work, int *info);
|
||||
|
||||
int dorgbr_(char *vect, int *m, int *n, int *k, double *a,
|
||||
int *lda, double *tau, double *work, int *lwork, int *info);
|
||||
|
||||
int dorghr_(int *n, int *ilo, int *ihi, double *a, int *lda,
|
||||
double *tau, double *work, int *lwork, int *info);
|
||||
|
||||
int dorgl2_(int *m, int *n, int *k, double *a, int *lda,
|
||||
double *tau, double *work, int *info);
|
||||
|
||||
int dorglq_(int *m, int *n, int *k, double *a, int *lda,
|
||||
double *tau, double *work, int *lwork, int *info);
|
||||
|
||||
int dorgqr_(int *m, int *n, int *k, double *a, int *lda,
|
||||
double *tau, double *work, int *lwork, int *info);
|
||||
|
||||
int dorm2r_(char *side, char *trans, int *m, int *n, int *k,
|
||||
double *a, int *lda, double *tau, double *c__, int *ldc, double *work,
|
||||
int *info);
|
||||
|
||||
int dormbr_(char *vect, char *side, char *trans, int *m, int
|
||||
*n, int *k, double *a, int *lda, double *tau, double *c__, int *ldc,
|
||||
double *work, int *lwork, int *info);
|
||||
|
||||
int dormhr_(char *side, char *trans, int *m, int *n, int *
|
||||
ilo, int *ihi, double *a, int *lda, double *tau, double *c__, int *
|
||||
ldc, double *work, int *lwork, int *info);
|
||||
|
||||
int dorml2_(char *side, char *trans, int *m, int *n, int *k,
|
||||
double *a, int *lda, double *tau, double *c__, int *ldc, double *work,
|
||||
int *info);
|
||||
|
||||
int dormlq_(char *side, char *trans, int *m, int *n, int *k,
|
||||
double *a, int *lda, double *tau, double *c__, int *ldc, double *work,
|
||||
int *lwork, int *info);
|
||||
|
||||
int dormqr_(char *side, char *trans, int *m, int *n, int *k,
|
||||
double *a, int *lda, double *tau, double *c__, int *ldc, double *work,
|
||||
int *lwork, int *info);
|
||||
|
||||
int drot_(int *n, double *dx, int *incx, double *dy, int *
|
||||
incy, double *c__, double *s);
|
||||
|
||||
int dscal_(int *n, double *da, double *dx, int *incx);
|
||||
|
||||
int dswap_(int *n, double *dx, int *incx, double *dy, int *
|
||||
incy);
|
||||
|
||||
int dtrevc3_(char *side, char *howmny, int *select, int *n,
|
||||
double *t, int *ldt, double *vl, int *ldvl, double *vr, int *ldvr,
|
||||
int *mm, int *m, double *work, int *lwork, int *info);
|
||||
|
||||
int dtrexc_(char *compq, int *n, double *t, int *ldt, double
|
||||
*q, int *ldq, int *ifst, int *ilst, double *work, int *info);
|
||||
|
||||
int dtrmm_(char *side, char *uplo, char *transa, char *diag,
|
||||
int *m, int *n, double *alpha, double *a, int *lda, double *b, int *
|
||||
ldb);
|
||||
|
||||
int dtrmv_(char *uplo, char *trans, char *diag, int *n,
|
||||
double *a, int *lda, double *x, int *incx);
|
||||
|
||||
int idamax_(int *n, double *dx, int *incx);
|
||||
|
||||
int ieeeck_(int *ispec, float *zero, float *one);
|
||||
|
||||
int iladlc_(int *m, int *n, double *a, int *lda);
|
||||
|
||||
int iladlr_(int *m, int *n, double *a, int *lda);
|
||||
|
||||
int ilaenv_(int *ispec, char *name__, char *opts, int *n1, int *n2, int *n3,
|
||||
int *n4);
|
||||
|
||||
int iparmq_(int *ispec, char *name__, char *opts, int *n, int *ilo, int *ihi,
|
||||
int *lwork);
|
||||
|
||||
int sgemm_(char *transa, char *transb, int *m, int *n, int *
|
||||
k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta,
|
||||
float *c__, int *ldc);
|
||||
|
||||
int zgemm_(char *transa, char *transb, int *m, int *n, int *
|
||||
k, lapack_doublecomplex *alpha, lapack_doublecomplex *a, int *lda, lapack_doublecomplex *b,
|
||||
int *ldb, lapack_doublecomplex *beta, lapack_doublecomplex *c__, int *ldc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Vendored
+48
@@ -0,0 +1,48 @@
|
||||
Copyright (c) 1992-2017 The University of Tennessee and The University
|
||||
of Tennessee Research Foundation. All rights
|
||||
reserved.
|
||||
Copyright (c) 2000-2017 The University of California Berkeley. All
|
||||
rights reserved.
|
||||
Copyright (c) 2006-2017 The University of Colorado Denver. All rights
|
||||
reserved.
|
||||
|
||||
$COPYRIGHT$
|
||||
|
||||
Additional copyrights may follow
|
||||
|
||||
$HEADER$
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer listed
|
||||
in this license in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
- Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
The copyright holders provide no reassurances that the source code
|
||||
provided does not infringe any patent, copyright, or any other
|
||||
intellectual property rights of third parties. The copyright holders
|
||||
disclaim any liability to any recipient for claims brought against
|
||||
recipient by any third party for infringement of that parties
|
||||
intellectual property rights.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Vendored
+272
@@ -0,0 +1,272 @@
|
||||
appdoc = """
|
||||
This is generator of CLapack subset.
|
||||
The usage:
|
||||
|
||||
1. Make sure you have the special version of f2c installed.
|
||||
Grab it from https://github.com/vpisarev/f2c/tree/for_lapack.
|
||||
2. Download fresh version of Lapack from
|
||||
https://github.com/Reference-LAPACK/lapack.
|
||||
You may choose some specific version or the latest snapshot.
|
||||
3. If necessary, edit "roots" and "banlist" variables in this script, specify the needed and unneeded functions
|
||||
4. From within a working directory run
|
||||
|
||||
$ python3 <opencv_root>/3rdparty/clapack/make_clapack.py <lapack_root>
|
||||
or
|
||||
$ F2C=<path_to_custom_f2c> python3 <opencv_root>/3rdparty/clapack/make_clapack.py <lapack_root>
|
||||
|
||||
it will generate "new_clapack" directory with "include" and "src" subdirectories.
|
||||
5. erase opencv/3rdparty/clapack/src and replace it with new_clapack/src.
|
||||
6. copy new_clapack/include/lapack.h to opencv/3rdparty/clapack/include.
|
||||
7. optionally, edit opencv/3rdparty/clapack/CMakeLists.txt and update CLAPACK_VERSION as needed.
|
||||
|
||||
This is it. Now build it and enjoy.
|
||||
"""
|
||||
|
||||
import glob, re, os, shutil, subprocess, sys
|
||||
|
||||
roots = ["cgemm_", "dgemm_", "sgemm_", "zgemm_",
|
||||
"dgeev_", "dgesdd_",
|
||||
#"dsyevr_",
|
||||
#"dgesv_", "dgetrf_", "dposv_", "dpotrf_", "dgels_", "dgeqrf_",
|
||||
#"sgesv_", "sgetrf_", "sposv_", "spotrf_", "sgels_", "sgeqrf_"
|
||||
]
|
||||
banlist = ["slamch_", "slamc3_", "dlamch_", "dlamc3_", "lsame_", "xerbla_"]
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print(appdoc)
|
||||
sys.exit(0)
|
||||
|
||||
lapack_root = sys.argv[1]
|
||||
dst_path = "."
|
||||
|
||||
def error(msg):
|
||||
print ("error: " + msg)
|
||||
sys.exit(0)
|
||||
|
||||
def file2fun(fname):
|
||||
return (os.path.basename(fname)[:-2]).upper()
|
||||
|
||||
def print_graph(m):
|
||||
for (k, neighbors) in sorted(m.items()):
|
||||
print (k + " : " + ", ".join(sorted(list(neighbors))))
|
||||
|
||||
blas_path = os.path.join(lapack_root, "BLAS/SRC")
|
||||
lapack_path = os.path.join(lapack_root, "SRC")
|
||||
|
||||
roots = [f[:-1].upper() for f in roots]
|
||||
banlist = [f[:-1].upper() for f in banlist]
|
||||
|
||||
def fun2file(func):
|
||||
filename = func.lower() + ".f"
|
||||
blas_loc = blas_path + "/" + filename
|
||||
lapack_loc = lapack_path + "/" + filename
|
||||
if os.path.exists(blas_loc):
|
||||
return blas_loc
|
||||
elif os.path.exists(lapack_loc):
|
||||
return lapack_loc
|
||||
else:
|
||||
error("neither %s nor %s exist" % (blas_loc, lapack_loc))
|
||||
|
||||
all_files = glob.glob(blas_path + "/*.f") + glob.glob(lapack_path + "/*.f")
|
||||
all_funcs = [file2fun(fname) for fname in all_files]
|
||||
all_funcs_set = set(all_funcs).difference(set(banlist))
|
||||
all_funcs = sorted(list(all_funcs_set))
|
||||
|
||||
func_deps = {}
|
||||
|
||||
#print all_funcs
|
||||
|
||||
words_regexp = re.compile(r'\w+')
|
||||
|
||||
def scan_deps(func):
|
||||
global func_deps
|
||||
if func in func_deps:
|
||||
return
|
||||
func_deps[func] = set([]) # to avoid possibly infinite recursion
|
||||
f = open(fun2file(func), 'rt')
|
||||
deps = []
|
||||
external_mode = False
|
||||
for l in f.readlines():
|
||||
if l.startswith('*'):
|
||||
continue
|
||||
l = l.strip().upper()
|
||||
if l.startswith('EXTERNAL '):
|
||||
external_mode = True
|
||||
elif l.startswith('$') and external_mode:
|
||||
pass
|
||||
else:
|
||||
external_mode = False
|
||||
if not external_mode:
|
||||
continue
|
||||
for w in words_regexp.findall(l):
|
||||
if w in all_funcs_set:
|
||||
deps.append(w)
|
||||
f.close()
|
||||
# remove func from its dependencies
|
||||
deps = set(deps).difference(set([func]))
|
||||
func_deps[func] = deps
|
||||
for d in deps:
|
||||
scan_deps(d)
|
||||
|
||||
for r in roots:
|
||||
scan_deps(r)
|
||||
|
||||
selected_funcs = sorted(func_deps.keys())
|
||||
print ("total files before amalgamation: %d" % len(selected_funcs))
|
||||
|
||||
inv_deps = {}
|
||||
for func in selected_funcs:
|
||||
inv_deps[func] = set([])
|
||||
|
||||
for (func, deps) in func_deps.items():
|
||||
for d in deps:
|
||||
inv_deps[d] = inv_deps[d].union(set([func]))
|
||||
|
||||
#print_graph(inv_deps)
|
||||
|
||||
func_home = {}
|
||||
for func in selected_funcs:
|
||||
func_home[func] = func
|
||||
|
||||
def get_home0(func, func0):
|
||||
used_by = inv_deps[func]
|
||||
if len(used_by) == 1:
|
||||
p = list(used_by)[0]
|
||||
if p != func and p != func0:
|
||||
return get_home0(p, func0)
|
||||
return func
|
||||
return func
|
||||
|
||||
# try to merge some files
|
||||
for func in selected_funcs:
|
||||
func_home[func] = get_home0(func, func)
|
||||
|
||||
# try to merge some files even more
|
||||
for iters in range(100):
|
||||
homes_changed = False
|
||||
for (func, used_by) in inv_deps.items():
|
||||
p0 = func_home[func]
|
||||
n = len(used_by)
|
||||
if n == 1:
|
||||
p = list(used_by)[0]
|
||||
p1 = func_home[p]
|
||||
if p1 != p0:
|
||||
func_home[func] = p1
|
||||
homes_changed = True
|
||||
continue
|
||||
elif n > 1:
|
||||
phomes = set([])
|
||||
for p in used_by:
|
||||
phomes.add(func_home[p])
|
||||
if len(phomes) == 1:
|
||||
p1 = list(phomes)[0]
|
||||
if p1 != p0:
|
||||
func_home[func] = p1
|
||||
homes_changed = True
|
||||
if not homes_changed:
|
||||
break
|
||||
|
||||
res_files = {}
|
||||
for (func, h) in func_home.items():
|
||||
elems = res_files.get(h, set([]))
|
||||
elems.add(func)
|
||||
res_files[h] = elems
|
||||
|
||||
print ("total files after amalgamation: %d" % len(res_files))
|
||||
#print_graph(res_files)
|
||||
|
||||
outdir = os.path.join(dst_path, "new_clapack")
|
||||
outdir_src = os.path.join(outdir, "src")
|
||||
outdir_inc = os.path.join(outdir, "include")
|
||||
|
||||
shutil.rmtree(outdir, ignore_errors=True)
|
||||
try:
|
||||
os.makedirs(outdir_src)
|
||||
except os.error:
|
||||
pass
|
||||
try:
|
||||
os.makedirs(outdir_inc)
|
||||
except os.error:
|
||||
pass
|
||||
|
||||
f2c_appname = os.getenv("F2C", default="f2c")
|
||||
print ("f2c used: %s" % f2c_appname)
|
||||
|
||||
f2c_getver_cmd = f2c_appname + " -v"
|
||||
|
||||
verstr = subprocess.check_output(f2c_getver_cmd.split(' ')).decode("utf-8")
|
||||
if "for_lapack" not in verstr:
|
||||
error("invalid version of f2c\n" + appdoc)
|
||||
|
||||
f2c_flags = "-ctypes -localconst -no-proto"
|
||||
f2c_cmd0 = f2c_appname + " " + f2c_flags
|
||||
f2c_cmd1 = f2c_appname + " -hdr none " + f2c_flags
|
||||
|
||||
lapack_protos = {}
|
||||
extract_fn_regexp = re.compile(r'.+?(\w+)\s*\(')
|
||||
|
||||
def extract_proto(func, csrc):
|
||||
global lapack_protos
|
||||
cname = func.lower() + "_"
|
||||
cfname = func.lower() + ".c"
|
||||
regexp_str = r'\n(?:/\* Subroutine \*/\s*)?\w+\s+\w+\s*\((?:.|\n)+?\)[\s\n]*\{'
|
||||
proto_regexp = re.compile(regexp_str)
|
||||
ps = proto_regexp.findall(csrc)
|
||||
for p in ps:
|
||||
n = p.find("*/")
|
||||
if n < 0:
|
||||
n = 0
|
||||
else:
|
||||
n += 2
|
||||
p = p[n:-1].strip() + ";"
|
||||
fns = extract_fn_regexp.findall(p)
|
||||
if len(fns) != 1:
|
||||
error("prototype of function (%s) when analyzing %s cannot be parsed" % (p, cfname))
|
||||
fn = fns[0]
|
||||
if fn not in lapack_protos:
|
||||
p = re.sub(r'\bcomplex\b', 'lapack_complex', p)
|
||||
p = re.sub(r'\bdoublecomplex\b', 'lapack_doublecomplex', p)
|
||||
lapack_protos[fn] = p
|
||||
|
||||
for (filename, funcs) in sorted(res_files.items()):
|
||||
out = ""
|
||||
f2c_cmd = f2c_cmd0
|
||||
for func in sorted(list(funcs)):
|
||||
ffilename = fun2file(func)
|
||||
print ("running " + f2c_cmd + " on " + ffilename + " ...")
|
||||
ffile = open(ffilename, 'rt')
|
||||
delta_out = subprocess.check_output(f2c_cmd.split(' '), stdin=ffile).decode("utf-8")
|
||||
# remove trailing whitespaces
|
||||
delta_out = '\n'.join([l.rstrip() for l in delta_out.split('\n')])
|
||||
extract_proto(func, delta_out)
|
||||
out += delta_out
|
||||
ffile.close()
|
||||
f2c_cmd = f2c_cmd1
|
||||
outname = os.path.join(outdir_src, filename.lower() + ".c")
|
||||
outfile = open(outname, 'wt')
|
||||
outfile.write(out)
|
||||
outfile.close()
|
||||
|
||||
proto_hdr = """// this is auto-generated header for Lapack subset
|
||||
#ifndef __CLAPACK_H__
|
||||
#define __CLAPACK_H__
|
||||
|
||||
#include "cblas.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
%s
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
""" % "\n\n".join([p for (n, p) in sorted(lapack_protos.items())])
|
||||
|
||||
proto_hdr_fname = os.path.join(outdir_inc, "lapack.h")
|
||||
f = open(proto_hdr_fname, 'wt')
|
||||
f.write(proto_hdr)
|
||||
f.close()
|
||||
+289
@@ -0,0 +1,289 @@
|
||||
#include "f2c.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
void cblas_cgemm(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
|
||||
const CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||
const int K, const void *alpha, const void *A,
|
||||
const int lda, const void *B, const int ldb,
|
||||
const void *beta, void *C, const int ldc)
|
||||
{
|
||||
char TA, TB;
|
||||
|
||||
if( layout == CblasColMajor )
|
||||
{
|
||||
if(TransA == CblasTrans) TA='T';
|
||||
else if ( TransA == CblasConjTrans ) TA='C';
|
||||
else if ( TransA == CblasNoTrans ) TA='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_cgemm", "Illegal TransA setting, %d\n", TransA);
|
||||
return;
|
||||
}
|
||||
|
||||
if(TransB == CblasTrans) TB='T';
|
||||
else if ( TransB == CblasConjTrans ) TB='C';
|
||||
else if ( TransB == CblasNoTrans ) TB='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 3, "cblas_cgemm", "Illegal TransB setting, %d\n", TransB);
|
||||
return;
|
||||
}
|
||||
|
||||
cgemm_(&TA, &TB, (int*)&M, (int*)&N, (int*)&K, (complex*)alpha, (complex*)A, (int*)&lda,
|
||||
(complex*)B, (int*)&ldb, (complex*)beta, (complex*)C, (int*)&ldc);
|
||||
}
|
||||
else if (layout == CblasRowMajor)
|
||||
{
|
||||
if(TransA == CblasTrans) TB='T';
|
||||
else if ( TransA == CblasConjTrans ) TB='C';
|
||||
else if ( TransA == CblasNoTrans ) TB='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_cgemm", "Illegal TransA setting, %d\n", TransA);
|
||||
return;
|
||||
}
|
||||
if(TransB == CblasTrans) TA='T';
|
||||
else if ( TransB == CblasConjTrans ) TA='C';
|
||||
else if ( TransB == CblasNoTrans ) TA='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_cgemm", "Illegal TransB setting, %d\n", TransB);
|
||||
return;
|
||||
}
|
||||
|
||||
cgemm_(&TA, &TB, (int*)&N, (int*)&M, (int*)&K, (complex*)alpha, (complex*)B, (int*)&ldb,
|
||||
(complex*)A, (int*)&lda, (complex*)beta, (complex*)C, (int*)&ldc);
|
||||
}
|
||||
else cblas_xerbla(layout, 1, "cblas_cgemm", "Illegal layout setting, %d\n", layout);
|
||||
}
|
||||
|
||||
void cblas_dgemm(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
|
||||
const CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||
const int K, const double alpha, const double *A,
|
||||
const int lda, const double *B, const int ldb,
|
||||
const double beta, double *C, const int ldc)
|
||||
{
|
||||
char TA, TB;
|
||||
|
||||
if( layout == CblasColMajor )
|
||||
{
|
||||
if(TransA == CblasTrans) TA='T';
|
||||
else if ( TransA == CblasConjTrans ) TA='C';
|
||||
else if ( TransA == CblasNoTrans ) TA='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_dgemm", "Illegal TransA setting, %d\n", TransA);
|
||||
return;
|
||||
}
|
||||
|
||||
if(TransB == CblasTrans) TB='T';
|
||||
else if ( TransB == CblasConjTrans ) TB='C';
|
||||
else if ( TransB == CblasNoTrans ) TB='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 3, "cblas_dgemm", "Illegal TransB setting, %d\n", TransB);
|
||||
return;
|
||||
}
|
||||
|
||||
dgemm_(&TA, &TB, (int*)&M, (int*)&N, (int*)&K, (double*)&alpha, (double*)A, (int*)&lda,
|
||||
(double*)B, (int*)&ldb, (double*)&beta, (double*)C, (int*)&ldc);
|
||||
}
|
||||
else if (layout == CblasRowMajor)
|
||||
{
|
||||
if(TransA == CblasTrans) TB='T';
|
||||
else if ( TransA == CblasConjTrans ) TB='C';
|
||||
else if ( TransA == CblasNoTrans ) TB='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_dgemm", "Illegal TransA setting, %d\n", TransA);
|
||||
return;
|
||||
}
|
||||
if(TransB == CblasTrans) TA='T';
|
||||
else if ( TransB == CblasConjTrans ) TA='C';
|
||||
else if ( TransB == CblasNoTrans ) TA='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_dgemm", "Illegal TransB setting, %d\n", TransB);
|
||||
return;
|
||||
}
|
||||
|
||||
dgemm_(&TA, &TB, (int*)&N, (int*)&M, (int*)&K, (double*)&alpha, (double*)B, (int*)&ldb,
|
||||
(double*)A, (int*)&lda, (double*)&beta, (double*)C, (int*)&ldc);
|
||||
}
|
||||
else cblas_xerbla(layout, 1, "cblas_dgemm", "Illegal layout setting, %d\n", layout);
|
||||
}
|
||||
|
||||
|
||||
void cblas_sgemm(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
|
||||
const CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||
const int K, const float alpha, const float *A,
|
||||
const int lda, const float *B, const int ldb,
|
||||
const float beta, float *C, const int ldc)
|
||||
{
|
||||
char TA, TB;
|
||||
|
||||
if( layout == CblasColMajor )
|
||||
{
|
||||
if(TransA == CblasTrans) TA='T';
|
||||
else if ( TransA == CblasConjTrans ) TA='C';
|
||||
else if ( TransA == CblasNoTrans ) TA='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_sgemm", "Illegal TransA setting, %d\n", TransA);
|
||||
return;
|
||||
}
|
||||
|
||||
if(TransB == CblasTrans) TB='T';
|
||||
else if ( TransB == CblasConjTrans ) TB='C';
|
||||
else if ( TransB == CblasNoTrans ) TB='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 3, "cblas_sgemm", "Illegal TransB setting, %d\n", TransB);
|
||||
return;
|
||||
}
|
||||
|
||||
sgemm_(&TA, &TB, (int*)&M, (int*)&N, (int*)&K, (float*)&alpha, (float*)A, (int*)&lda,
|
||||
(float*)B, (int*)&ldb, (float*)&beta, (float*)C, (int*)&ldc);
|
||||
}
|
||||
else if (layout == CblasRowMajor)
|
||||
{
|
||||
if(TransA == CblasTrans) TB='T';
|
||||
else if ( TransA == CblasConjTrans ) TB='C';
|
||||
else if ( TransA == CblasNoTrans ) TB='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_sgemm", "Illegal TransA setting, %d\n", TransA);
|
||||
return;
|
||||
}
|
||||
if(TransB == CblasTrans) TA='T';
|
||||
else if ( TransB == CblasConjTrans ) TA='C';
|
||||
else if ( TransB == CblasNoTrans ) TA='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_sgemm", "Illegal TransB setting, %d\n", TransB);
|
||||
return;
|
||||
}
|
||||
|
||||
sgemm_(&TA, &TB, (int*)&N, (int*)&M, (int*)&K, (float*)&alpha, (float*)B, (int*)&ldb,
|
||||
(float*)A, (int*)&lda, (float*)&beta, (float*)C, (int*)&ldc);
|
||||
}
|
||||
else cblas_xerbla(layout, 1, "cblas_sgemm", "Illegal layout setting, %d\n", layout);
|
||||
}
|
||||
|
||||
void cblas_zgemm(const CBLAS_LAYOUT layout, const CBLAS_TRANSPOSE TransA,
|
||||
const CBLAS_TRANSPOSE TransB, const int M, const int N,
|
||||
const int K, const void *alpha, const void *A,
|
||||
const int lda, const void *B, const int ldb,
|
||||
const void *beta, void *C, const int ldc)
|
||||
{
|
||||
char TA, TB;
|
||||
|
||||
if( layout == CblasColMajor )
|
||||
{
|
||||
if(TransA == CblasTrans) TA='T';
|
||||
else if ( TransA == CblasConjTrans ) TA='C';
|
||||
else if ( TransA == CblasNoTrans ) TA='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_zgemm", "Illegal TransA setting, %d\n", TransA);
|
||||
return;
|
||||
}
|
||||
|
||||
if(TransB == CblasTrans) TB='T';
|
||||
else if ( TransB == CblasConjTrans ) TB='C';
|
||||
else if ( TransB == CblasNoTrans ) TB='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 3, "cblas_zgemm", "Illegal TransB setting, %d\n", TransB);
|
||||
return;
|
||||
}
|
||||
|
||||
zgemm_(&TA, &TB, (int*)&M, (int*)&N, (int*)&K, (doublecomplex*)alpha, (doublecomplex*)A, (int*)&lda,
|
||||
(doublecomplex*)B, (int*)&ldb, (doublecomplex*)beta, (doublecomplex*)C, (int*)&ldc);
|
||||
}
|
||||
else if (layout == CblasRowMajor)
|
||||
{
|
||||
if(TransA == CblasTrans) TB='T';
|
||||
else if ( TransA == CblasConjTrans ) TB='C';
|
||||
else if ( TransA == CblasNoTrans ) TB='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_zgemm", "Illegal TransA setting, %d\n", TransA);
|
||||
return;
|
||||
}
|
||||
if(TransB == CblasTrans) TA='T';
|
||||
else if ( TransB == CblasConjTrans ) TA='C';
|
||||
else if ( TransB == CblasNoTrans ) TA='N';
|
||||
else
|
||||
{
|
||||
cblas_xerbla(layout, 2, "cblas_zgemm", "Illegal TransB setting, %d\n", TransB);
|
||||
return;
|
||||
}
|
||||
|
||||
zgemm_(&TA, &TB, (int*)&N, (int*)&M, (int*)&K, (doublecomplex*)alpha, (doublecomplex*)B, (int*)&ldb,
|
||||
(doublecomplex*)A, (int*)&lda, (doublecomplex*)beta, (doublecomplex*)C, (int*)&ldc);
|
||||
}
|
||||
else cblas_xerbla(layout, 1, "cblas_zgemm", "Illegal layout setting, %d\n", layout);
|
||||
}
|
||||
|
||||
void cblas_xerbla(const CBLAS_LAYOUT layout, int info, const char *rout, const char *form, ...)
|
||||
{
|
||||
extern int RowMajorStrg;
|
||||
char empty[1] = "";
|
||||
va_list argptr;
|
||||
|
||||
va_start(argptr, form);
|
||||
|
||||
if (layout == CblasRowMajor)
|
||||
{
|
||||
if (strstr(rout,"gemm") != 0)
|
||||
{
|
||||
if (info == 5 ) info = 4;
|
||||
else if (info == 4 ) info = 5;
|
||||
else if (info == 11) info = 9;
|
||||
else if (info == 9 ) info = 11;
|
||||
}
|
||||
else if (strstr(rout,"symm") != 0 || strstr(rout,"hemm") != 0)
|
||||
{
|
||||
if (info == 5 ) info = 4;
|
||||
else if (info == 4 ) info = 5;
|
||||
}
|
||||
else if (strstr(rout,"trmm") != 0 || strstr(rout,"trsm") != 0)
|
||||
{
|
||||
if (info == 7 ) info = 6;
|
||||
else if (info == 6 ) info = 7;
|
||||
}
|
||||
else if (strstr(rout,"gemv") != 0)
|
||||
{
|
||||
if (info == 4) info = 3;
|
||||
else if (info == 3) info = 4;
|
||||
}
|
||||
else if (strstr(rout,"gbmv") != 0)
|
||||
{
|
||||
if (info == 4) info = 3;
|
||||
else if (info == 3) info = 4;
|
||||
else if (info == 6) info = 5;
|
||||
else if (info == 5) info = 6;
|
||||
}
|
||||
else if (strstr(rout,"ger") != 0)
|
||||
{
|
||||
if (info == 3) info = 2;
|
||||
else if (info == 2) info = 3;
|
||||
else if (info == 8) info = 6;
|
||||
else if (info == 6) info = 8;
|
||||
}
|
||||
else if ( (strstr(rout,"her2") != 0 || strstr(rout,"hpr2") != 0)
|
||||
&& strstr(rout,"her2k") == 0 )
|
||||
{
|
||||
if (info == 8) info = 6;
|
||||
else if (info == 6) info = 8;
|
||||
}
|
||||
}
|
||||
if (info)
|
||||
fprintf(stderr, "Parameter %d to routine %s was incorrect\n", info, rout);
|
||||
vfprintf(stderr, form, argptr);
|
||||
va_end(argptr);
|
||||
if (info && !info)
|
||||
xerbla_(empty, &info); /* Force link of our F77 error handler */
|
||||
exit(-1);
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#include "f2c.h"
|
||||
#include <float.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* *********************************************************************** */
|
||||
|
||||
double dlamc3_(double *a, double *b)
|
||||
{
|
||||
/* -- LAPACK auxiliary routine (version 3.1) -- */
|
||||
/* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
|
||||
/* November 2006 */
|
||||
|
||||
/* .. Scalar Arguments .. */
|
||||
/* .. */
|
||||
|
||||
/* Purpose */
|
||||
/* ======= */
|
||||
|
||||
/* DLAMC3 is intended to force A and B to be stored prior to doing */
|
||||
/* the addition of A and B , for use in situations where optimizers */
|
||||
/* might hold one of these in a register. */
|
||||
|
||||
/* Arguments */
|
||||
/* ========= */
|
||||
|
||||
/* A (input) DOUBLE PRECISION */
|
||||
/* B (input) DOUBLE PRECISION */
|
||||
/* The values A and B. */
|
||||
|
||||
/* ===================================================================== */
|
||||
|
||||
/* .. Executable Statements .. */
|
||||
|
||||
double ret_val = *a + *b;
|
||||
|
||||
return ret_val;
|
||||
|
||||
/* End of DLAMC3 */
|
||||
|
||||
} /* dlamc3_ */
|
||||
|
||||
|
||||
/* simpler version of dlamch for the case of IEEE754-compliant FPU module by Piotr Luszczek S.
|
||||
taken from http://www.mail-archive.com/numpy-discussion@lists.sourceforge.net/msg02448.html */
|
||||
|
||||
#ifndef DBL_DIGITS
|
||||
#define DBL_DIGITS 53
|
||||
#endif
|
||||
|
||||
static const unsigned char lapack_dlamch_tab0[] =
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3, 4, 5, 6, 7, 0, 8, 9, 0, 10, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3, 4, 5, 6, 7, 0, 8, 9,
|
||||
0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
const double lapack_dlamch_tab1[] =
|
||||
{
|
||||
0, FLT_RADIX, DBL_EPSILON, DBL_MAX_EXP, DBL_MIN_EXP, DBL_DIGITS, DBL_MAX,
|
||||
DBL_EPSILON*FLT_RADIX, 1, DBL_MIN*(1 + DBL_EPSILON), DBL_MIN
|
||||
};
|
||||
|
||||
double dlamch_(char* cmach)
|
||||
{
|
||||
return lapack_dlamch_tab1[lapack_dlamch_tab0[(unsigned char)cmach[0]]];
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
#include "f2c.h"
|
||||
|
||||
static const int CLAPACK_NOT_IMPLEMENTED = -1024;
|
||||
|
||||
int sgesdd_(char *jobz, int *m, int *n, float *a, int *lda,
|
||||
float *s, float *u, int *ldu, float *vt, int *ldvt, float *work,
|
||||
int *lwork, int *iwork, int *info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dgels_(char *trans, int *m, int *n, int *nrhs, double *a,
|
||||
int *lda, double *b, int *ldb, double *work, int *lwork, int *info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dgesv_(int *n, int *nrhs, double *a, int *lda, int *ipiv,
|
||||
double *b, int *ldb, int *info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dgetrf_(int *m, int *n, double *a, int *lda, int *ipiv,
|
||||
int *info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dposv_(char *uplo, int *n, int *nrhs, double *a, int *
|
||||
lda, double *b, int *ldb, int *info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dpotrf_(char *uplo, int *n, double *a, int *lda, int *
|
||||
info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sgels_(char *trans, int *m, int *n, int *nrhs, float *a,
|
||||
int *lda, float *b, int *ldb, float *work, int *lwork, int *info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sgeev_(char *jobvl, char *jobvr, int *n, float *a, int *
|
||||
lda, float *wr, float *wi, float *vl, int *ldvl, float *vr, int *
|
||||
ldvr, float *work, int *lwork, int *info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sgeqrf_(int *m, int *n, float *a, int *lda, float *tau,
|
||||
float *work, int *lwork, int *info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sgesv_(int *n, int *nrhs, float *a, int *lda, int *ipiv,
|
||||
float *b, int *ldb, int *info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sgetrf_(int *m, int *n, float *a, int *lda, int *ipiv,
|
||||
int *info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sposv_(char *uplo, int *n, int *nrhs, float *a, int *
|
||||
lda, float *b, int *ldb, int *info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int spotrf_(char *uplo, int *n, float *a, int *lda, int *
|
||||
info)
|
||||
{
|
||||
*info = CLAPACK_NOT_IMPLEMENTED;
|
||||
return 0;
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
#include "f2c.h"
|
||||
|
||||
static const unsigned char lapack_toupper_tab[] =
|
||||
{
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
|
||||
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
|
||||
46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
|
||||
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
|
||||
90, 91, 92, 93, 94, 95, 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
|
||||
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127, 128, 129, 130, 131,
|
||||
132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
|
||||
150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
|
||||
168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
|
||||
186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
|
||||
204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
|
||||
222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
|
||||
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
|
||||
};
|
||||
|
||||
#define lapack_toupper(c) ((char)lapack_toupper_tab[(unsigned char)(c)])
|
||||
|
||||
int lsame_(char *ca, char *cb)
|
||||
{
|
||||
return lapack_toupper(ca[0]) == lapack_toupper(cb[0]);
|
||||
}
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
#include "f2c.h"
|
||||
|
||||
double pow_di(double *ap, int *bp)
|
||||
{
|
||||
double p = 1;
|
||||
double x = *ap;
|
||||
int n = *bp;
|
||||
|
||||
if(n != 0)
|
||||
{
|
||||
if(n < 0)
|
||||
{
|
||||
n = -n;
|
||||
x = 1/x;
|
||||
}
|
||||
unsigned u = (unsigned)n;
|
||||
for(;;)
|
||||
{
|
||||
if((u & 1) != 0)
|
||||
p *= x;
|
||||
if((u >>= 1) == 0)
|
||||
break;
|
||||
x *= x;
|
||||
}
|
||||
}
|
||||
return p;
|
||||
}
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
#include "f2c.h"
|
||||
|
||||
int pow_ii(int *ap, int *bp)
|
||||
{
|
||||
int p;
|
||||
int x = *ap;
|
||||
int n = *bp;
|
||||
|
||||
if (n <= 0) {
|
||||
if (n == 0 || x == 1)
|
||||
return 1;
|
||||
return x != -1 ? 0 : (n & 1) ? -1 : 1;
|
||||
}
|
||||
unsigned u = (unsigned)n;
|
||||
for(p = 1; ; )
|
||||
{
|
||||
if(u & 01)
|
||||
p *= x;
|
||||
if(u >>= 1)
|
||||
x *= x;
|
||||
else
|
||||
break;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
/* Unless compiled with -DNO_OVERWRITE, this variant of s_cat allows the
|
||||
* target of a concatenation to appear on its right-hand side (contrary
|
||||
* to the Fortran 77 Standard, but in accordance with Fortran 90).
|
||||
*/
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
int s_cat(char *lp, char **rpp, int* rnp, int *np)
|
||||
{
|
||||
int i, L = 0;
|
||||
int n = *np;
|
||||
|
||||
for(i = 0; i < n; i++) {
|
||||
int ni = rnp[i];
|
||||
if(ni > 0) {
|
||||
memcpy(lp + L, rpp[i], ni);
|
||||
L += ni;
|
||||
}
|
||||
}
|
||||
lp[L] = '\0';
|
||||
return 0;
|
||||
}
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
#include "f2c.h"
|
||||
|
||||
/* compare two strings */
|
||||
int s_cmp(char *a0, char *b0)
|
||||
{
|
||||
int la = (int)strlen(a0);
|
||||
int lb = (int)strlen(b0);
|
||||
unsigned char *a, *aend, *b, *bend;
|
||||
a = (unsigned char *)a0;
|
||||
b = (unsigned char *)b0;
|
||||
aend = a + la;
|
||||
bend = b + lb;
|
||||
|
||||
if(la <= lb)
|
||||
{
|
||||
while(a < aend)
|
||||
if(*a != *b)
|
||||
return( *a - *b );
|
||||
else
|
||||
{ ++a; ++b; }
|
||||
|
||||
while(b < bend)
|
||||
if(*b != ' ')
|
||||
return( ' ' - *b );
|
||||
else ++b;
|
||||
}
|
||||
else
|
||||
{
|
||||
while(b < bend)
|
||||
if(*a == *b)
|
||||
{ ++a; ++b; }
|
||||
else
|
||||
return( *a - *b );
|
||||
while(a < aend)
|
||||
if(*a != ' ')
|
||||
return(*a - ' ');
|
||||
else ++a;
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
#include "f2c.h"
|
||||
#include <float.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* *********************************************************************** */
|
||||
|
||||
double slamc3_(float *a, float *b)
|
||||
{
|
||||
/* -- LAPACK auxiliary routine (version 3.1) -- */
|
||||
/* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
|
||||
/* November 2006 */
|
||||
|
||||
/* .. Scalar Arguments .. */
|
||||
/* .. */
|
||||
|
||||
/* Purpose */
|
||||
/* ======= */
|
||||
|
||||
/* SLAMC3 is intended to force A and B to be stored prior to doing */
|
||||
/* the addition of A and B , for use in situations where optimizers */
|
||||
/* might hold one of these in a register. */
|
||||
|
||||
/* Arguments */
|
||||
/* ========= */
|
||||
|
||||
/* A (input) REAL */
|
||||
/* B (input) REAL */
|
||||
/* The values A and B. */
|
||||
|
||||
/* ===================================================================== */
|
||||
|
||||
/* .. Executable Statements .. */
|
||||
|
||||
float ret_val = *a + *b;
|
||||
|
||||
return ret_val;
|
||||
|
||||
/* End of SLAMC3 */
|
||||
|
||||
} /* slamc3_ */
|
||||
|
||||
/* simpler version of slamch for the case of IEEE754-compliant FPU module by Piotr Luszczek S.
|
||||
taken from http://www.mail-archive.com/numpy-discussion@lists.sourceforge.net/msg02448.html */
|
||||
|
||||
#ifndef FLT_DIGITS
|
||||
#define FLT_DIGITS 24
|
||||
#endif
|
||||
|
||||
static const unsigned char lapack_slamch_tab0[] =
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3, 4, 5, 6, 7, 0, 8, 9, 0, 10, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3, 4, 5, 6, 7, 0, 8, 9,
|
||||
0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
const double lapack_slamch_tab1[] =
|
||||
{
|
||||
0, FLT_RADIX, FLT_EPSILON, FLT_MAX_EXP, FLT_MIN_EXP, FLT_DIGITS, FLT_MAX,
|
||||
FLT_EPSILON*FLT_RADIX, 1, FLT_MIN*(1 + FLT_EPSILON), FLT_MIN
|
||||
};
|
||||
|
||||
double slamch_(char* cmach)
|
||||
{
|
||||
return lapack_slamch_tab1[lapack_slamch_tab0[(unsigned char)cmach[0]]];
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/* xerbla.f -- translated by f2c (version 20061008).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
/* Subroutine */ int xerbla_(char *srname, int *info)
|
||||
{
|
||||
printf("** On entry to %s, parameter number %2i had an illegal value\n", srname, *info);
|
||||
return 0;
|
||||
} /* xerbla_ */
|
||||
Vendored
+752
@@ -0,0 +1,752 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b CGEMM
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// COMPLEX ALPHA,BETA
|
||||
// INTEGER K,LDA,LDB,LDC,M,N
|
||||
// CHARACTER TRANSA,TRANSB
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> CGEMM performs one of the matrix-matrix operations
|
||||
//>
|
||||
//> C := alpha*op( A )*op( B ) + beta*C,
|
||||
//>
|
||||
//> where op( X ) is one of
|
||||
//>
|
||||
//> op( X ) = X or op( X ) = X**T or op( X ) = X**H,
|
||||
//>
|
||||
//> alpha and beta are scalars, and A, B and C are matrices, with op( A )
|
||||
//> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] TRANSA
|
||||
//> \verbatim
|
||||
//> TRANSA is CHARACTER*1
|
||||
//> On entry, TRANSA specifies the form of op( A ) to be used in
|
||||
//> the matrix multiplication as follows:
|
||||
//>
|
||||
//> TRANSA = 'N' or 'n', op( A ) = A.
|
||||
//>
|
||||
//> TRANSA = 'T' or 't', op( A ) = A**T.
|
||||
//>
|
||||
//> TRANSA = 'C' or 'c', op( A ) = A**H.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TRANSB
|
||||
//> \verbatim
|
||||
//> TRANSB is CHARACTER*1
|
||||
//> On entry, TRANSB specifies the form of op( B ) to be used in
|
||||
//> the matrix multiplication as follows:
|
||||
//>
|
||||
//> TRANSB = 'N' or 'n', op( B ) = B.
|
||||
//>
|
||||
//> TRANSB = 'T' or 't', op( B ) = B**T.
|
||||
//>
|
||||
//> TRANSB = 'C' or 'c', op( B ) = B**H.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> On entry, M specifies the number of rows of the matrix
|
||||
//> op( A ) and of the matrix C. M must be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> On entry, N specifies the number of columns of the matrix
|
||||
//> op( B ) and the number of columns of the matrix C. N must be
|
||||
//> at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] K
|
||||
//> \verbatim
|
||||
//> K is INTEGER
|
||||
//> On entry, K specifies the number of columns of the matrix
|
||||
//> op( A ) and the number of rows of the matrix op( B ). K must
|
||||
//> be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] ALPHA
|
||||
//> \verbatim
|
||||
//> ALPHA is COMPLEX
|
||||
//> On entry, ALPHA specifies the scalar alpha.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is COMPLEX array, dimension ( LDA, ka ), where ka is
|
||||
//> k when TRANSA = 'N' or 'n', and is m otherwise.
|
||||
//> Before entry with TRANSA = 'N' or 'n', the leading m by k
|
||||
//> part of the array A must contain the matrix A, otherwise
|
||||
//> the leading k by m part of the array A must contain the
|
||||
//> matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> On entry, LDA specifies the first dimension of A as declared
|
||||
//> in the calling (sub) program. When TRANSA = 'N' or 'n' then
|
||||
//> LDA must be at least max( 1, m ), otherwise LDA must be at
|
||||
//> least max( 1, k ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] B
|
||||
//> \verbatim
|
||||
//> B is COMPLEX array, dimension ( LDB, kb ), where kb is
|
||||
//> n when TRANSB = 'N' or 'n', and is k otherwise.
|
||||
//> Before entry with TRANSB = 'N' or 'n', the leading k by n
|
||||
//> part of the array B must contain the matrix B, otherwise
|
||||
//> the leading n by k part of the array B must contain the
|
||||
//> matrix B.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDB
|
||||
//> \verbatim
|
||||
//> LDB is INTEGER
|
||||
//> On entry, LDB specifies the first dimension of B as declared
|
||||
//> in the calling (sub) program. When TRANSB = 'N' or 'n' then
|
||||
//> LDB must be at least max( 1, k ), otherwise LDB must be at
|
||||
//> least max( 1, n ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] BETA
|
||||
//> \verbatim
|
||||
//> BETA is COMPLEX
|
||||
//> On entry, BETA specifies the scalar beta. When BETA is
|
||||
//> supplied as zero then C need not be set on input.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] C
|
||||
//> \verbatim
|
||||
//> C is COMPLEX array, dimension ( LDC, N )
|
||||
//> Before entry, the leading m by n part of the array C must
|
||||
//> contain the matrix C, except when beta is zero, in which
|
||||
//> case C need not be set on entry.
|
||||
//> On exit, the array C is overwritten by the m by n matrix
|
||||
//> ( alpha*op( A )*op( B ) + beta*C ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDC
|
||||
//> \verbatim
|
||||
//> LDC is INTEGER
|
||||
//> On entry, LDC specifies the first dimension of C as declared
|
||||
//> in the calling (sub) program. LDC must be at least
|
||||
//> max( 1, m ).
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup complex_blas_level3
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> Level 3 Blas routine.
|
||||
//>
|
||||
//> -- Written on 8-February-1989.
|
||||
//> Jack Dongarra, Argonne National Laboratory.
|
||||
//> Iain Duff, AERE Harwell.
|
||||
//> Jeremy Du Croz, Numerical Algorithms Group Ltd.
|
||||
//> Sven Hammarling, Numerical Algorithms Group Ltd.
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int cgemm_(char *transa, char *transb, int *m, int *n, int *
|
||||
k, complex *alpha, complex *a, int *lda, complex *b, int *ldb,
|
||||
complex *beta, complex *c__, int *ldc)
|
||||
{
|
||||
// Table of constant values
|
||||
complex c_b1 = {1.f,0.f};
|
||||
complex c_b2 = {0.f,0.f};
|
||||
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, b_dim1, b_offset, c_dim1, c_offset, i__1, i__2,
|
||||
i__3, i__4, i__5, i__6;
|
||||
complex q__1, q__2, q__3, q__4;
|
||||
|
||||
// Local variables
|
||||
int i__, j, l, info;
|
||||
int nota, notb;
|
||||
complex temp;
|
||||
int conja, conjb;
|
||||
int ncola;
|
||||
extern int lsame_(char *, char *);
|
||||
int nrowa, nrowb;
|
||||
extern /* Subroutine */ int xerbla_(char *, int *);
|
||||
|
||||
//
|
||||
// -- Reference BLAS level3 routine (version 3.7.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
//
|
||||
// Set NOTA and NOTB as true if A and B respectively are not
|
||||
// conjugated or transposed, set CONJA and CONJB as true if A and
|
||||
// B respectively are to be transposed but not conjugated and set
|
||||
// NROWA, NCOLA and NROWB as the number of rows and columns of A
|
||||
// and the number of rows of B respectively.
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
b_dim1 = *ldb;
|
||||
b_offset = 1 + b_dim1;
|
||||
b -= b_offset;
|
||||
c_dim1 = *ldc;
|
||||
c_offset = 1 + c_dim1;
|
||||
c__ -= c_offset;
|
||||
|
||||
// Function Body
|
||||
nota = lsame_(transa, "N");
|
||||
notb = lsame_(transb, "N");
|
||||
conja = lsame_(transa, "C");
|
||||
conjb = lsame_(transb, "C");
|
||||
if (nota) {
|
||||
nrowa = *m;
|
||||
ncola = *k;
|
||||
} else {
|
||||
nrowa = *k;
|
||||
ncola = *m;
|
||||
}
|
||||
if (notb) {
|
||||
nrowb = *k;
|
||||
} else {
|
||||
nrowb = *n;
|
||||
}
|
||||
//
|
||||
// Test the input parameters.
|
||||
//
|
||||
info = 0;
|
||||
if (! nota && ! conja && ! lsame_(transa, "T")) {
|
||||
info = 1;
|
||||
} else if (! notb && ! conjb && ! lsame_(transb, "T")) {
|
||||
info = 2;
|
||||
} else if (*m < 0) {
|
||||
info = 3;
|
||||
} else if (*n < 0) {
|
||||
info = 4;
|
||||
} else if (*k < 0) {
|
||||
info = 5;
|
||||
} else if (*lda < max(1,nrowa)) {
|
||||
info = 8;
|
||||
} else if (*ldb < max(1,nrowb)) {
|
||||
info = 10;
|
||||
} else if (*ldc < max(1,*m)) {
|
||||
info = 13;
|
||||
}
|
||||
if (info != 0) {
|
||||
xerbla_("CGEMM ", &info);
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible.
|
||||
//
|
||||
if (*m == 0 || *n == 0 || (alpha->r == 0.f && alpha->i == 0.f || *k == 0)
|
||||
&& (beta->r == 1.f && beta->i == 0.f)) {
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// And when alpha.eq.zero.
|
||||
//
|
||||
if (alpha->r == 0.f && alpha->i == 0.f) {
|
||||
if (beta->r == 0.f && beta->i == 0.f) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
c__[i__3].r = 0.f, c__[i__3].i = 0.f;
|
||||
// L10:
|
||||
}
|
||||
// L20:
|
||||
}
|
||||
} else {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
q__1.r = beta->r * c__[i__4].r - beta->i * c__[i__4].i,
|
||||
q__1.i = beta->r * c__[i__4].i + beta->i * c__[
|
||||
i__4].r;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
// L30:
|
||||
}
|
||||
// L40:
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Start the operations.
|
||||
//
|
||||
if (notb) {
|
||||
if (nota) {
|
||||
//
|
||||
// Form C := alpha*A*B + beta*C.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (beta->r == 0.f && beta->i == 0.f) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
c__[i__3].r = 0.f, c__[i__3].i = 0.f;
|
||||
// L50:
|
||||
}
|
||||
} else if (beta->r != 1.f || beta->i != 0.f) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
q__1.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, q__1.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
// L60:
|
||||
}
|
||||
}
|
||||
i__2 = *k;
|
||||
for (l = 1; l <= i__2; ++l) {
|
||||
i__3 = l + j * b_dim1;
|
||||
q__1.r = alpha->r * b[i__3].r - alpha->i * b[i__3].i,
|
||||
q__1.i = alpha->r * b[i__3].i + alpha->i * b[i__3]
|
||||
.r;
|
||||
temp.r = q__1.r, temp.i = q__1.i;
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
i__4 = i__ + j * c_dim1;
|
||||
i__5 = i__ + j * c_dim1;
|
||||
i__6 = i__ + l * a_dim1;
|
||||
q__2.r = temp.r * a[i__6].r - temp.i * a[i__6].i,
|
||||
q__2.i = temp.r * a[i__6].i + temp.i * a[i__6]
|
||||
.r;
|
||||
q__1.r = c__[i__5].r + q__2.r, q__1.i = c__[i__5].i +
|
||||
q__2.i;
|
||||
c__[i__4].r = q__1.r, c__[i__4].i = q__1.i;
|
||||
// L70:
|
||||
}
|
||||
// L80:
|
||||
}
|
||||
// L90:
|
||||
}
|
||||
} else if (conja) {
|
||||
//
|
||||
// Form C := alpha*A**H*B + beta*C.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0.f, temp.i = 0.f;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
r_cnjg(&q__3, &a[l + i__ * a_dim1]);
|
||||
i__4 = l + j * b_dim1;
|
||||
q__2.r = q__3.r * b[i__4].r - q__3.i * b[i__4].i,
|
||||
q__2.i = q__3.r * b[i__4].i + q__3.i * b[i__4]
|
||||
.r;
|
||||
q__1.r = temp.r + q__2.r, q__1.i = temp.i + q__2.i;
|
||||
temp.r = q__1.r, temp.i = q__1.i;
|
||||
// L100:
|
||||
}
|
||||
if (beta->r == 0.f && beta->i == 0.f) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
q__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, q__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
}
|
||||
// L110:
|
||||
}
|
||||
// L120:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A**T*B + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0.f, temp.i = 0.f;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
i__4 = l + i__ * a_dim1;
|
||||
i__5 = l + j * b_dim1;
|
||||
q__2.r = a[i__4].r * b[i__5].r - a[i__4].i * b[i__5]
|
||||
.i, q__2.i = a[i__4].r * b[i__5].i + a[i__4]
|
||||
.i * b[i__5].r;
|
||||
q__1.r = temp.r + q__2.r, q__1.i = temp.i + q__2.i;
|
||||
temp.r = q__1.r, temp.i = q__1.i;
|
||||
// L130:
|
||||
}
|
||||
if (beta->r == 0.f && beta->i == 0.f) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
q__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, q__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
}
|
||||
// L140:
|
||||
}
|
||||
// L150:
|
||||
}
|
||||
}
|
||||
} else if (nota) {
|
||||
if (conjb) {
|
||||
//
|
||||
// Form C := alpha*A*B**H + beta*C.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (beta->r == 0.f && beta->i == 0.f) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
c__[i__3].r = 0.f, c__[i__3].i = 0.f;
|
||||
// L160:
|
||||
}
|
||||
} else if (beta->r != 1.f || beta->i != 0.f) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
q__1.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, q__1.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
// L170:
|
||||
}
|
||||
}
|
||||
i__2 = *k;
|
||||
for (l = 1; l <= i__2; ++l) {
|
||||
r_cnjg(&q__2, &b[j + l * b_dim1]);
|
||||
q__1.r = alpha->r * q__2.r - alpha->i * q__2.i, q__1.i =
|
||||
alpha->r * q__2.i + alpha->i * q__2.r;
|
||||
temp.r = q__1.r, temp.i = q__1.i;
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
i__4 = i__ + j * c_dim1;
|
||||
i__5 = i__ + j * c_dim1;
|
||||
i__6 = i__ + l * a_dim1;
|
||||
q__2.r = temp.r * a[i__6].r - temp.i * a[i__6].i,
|
||||
q__2.i = temp.r * a[i__6].i + temp.i * a[i__6]
|
||||
.r;
|
||||
q__1.r = c__[i__5].r + q__2.r, q__1.i = c__[i__5].i +
|
||||
q__2.i;
|
||||
c__[i__4].r = q__1.r, c__[i__4].i = q__1.i;
|
||||
// L180:
|
||||
}
|
||||
// L190:
|
||||
}
|
||||
// L200:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A*B**T + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (beta->r == 0.f && beta->i == 0.f) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
c__[i__3].r = 0.f, c__[i__3].i = 0.f;
|
||||
// L210:
|
||||
}
|
||||
} else if (beta->r != 1.f || beta->i != 0.f) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
q__1.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, q__1.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
// L220:
|
||||
}
|
||||
}
|
||||
i__2 = *k;
|
||||
for (l = 1; l <= i__2; ++l) {
|
||||
i__3 = j + l * b_dim1;
|
||||
q__1.r = alpha->r * b[i__3].r - alpha->i * b[i__3].i,
|
||||
q__1.i = alpha->r * b[i__3].i + alpha->i * b[i__3]
|
||||
.r;
|
||||
temp.r = q__1.r, temp.i = q__1.i;
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
i__4 = i__ + j * c_dim1;
|
||||
i__5 = i__ + j * c_dim1;
|
||||
i__6 = i__ + l * a_dim1;
|
||||
q__2.r = temp.r * a[i__6].r - temp.i * a[i__6].i,
|
||||
q__2.i = temp.r * a[i__6].i + temp.i * a[i__6]
|
||||
.r;
|
||||
q__1.r = c__[i__5].r + q__2.r, q__1.i = c__[i__5].i +
|
||||
q__2.i;
|
||||
c__[i__4].r = q__1.r, c__[i__4].i = q__1.i;
|
||||
// L230:
|
||||
}
|
||||
// L240:
|
||||
}
|
||||
// L250:
|
||||
}
|
||||
}
|
||||
} else if (conja) {
|
||||
if (conjb) {
|
||||
//
|
||||
// Form C := alpha*A**H*B**H + beta*C.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0.f, temp.i = 0.f;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
r_cnjg(&q__3, &a[l + i__ * a_dim1]);
|
||||
r_cnjg(&q__4, &b[j + l * b_dim1]);
|
||||
q__2.r = q__3.r * q__4.r - q__3.i * q__4.i, q__2.i =
|
||||
q__3.r * q__4.i + q__3.i * q__4.r;
|
||||
q__1.r = temp.r + q__2.r, q__1.i = temp.i + q__2.i;
|
||||
temp.r = q__1.r, temp.i = q__1.i;
|
||||
// L260:
|
||||
}
|
||||
if (beta->r == 0.f && beta->i == 0.f) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
q__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, q__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
}
|
||||
// L270:
|
||||
}
|
||||
// L280:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A**H*B**T + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0.f, temp.i = 0.f;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
r_cnjg(&q__3, &a[l + i__ * a_dim1]);
|
||||
i__4 = j + l * b_dim1;
|
||||
q__2.r = q__3.r * b[i__4].r - q__3.i * b[i__4].i,
|
||||
q__2.i = q__3.r * b[i__4].i + q__3.i * b[i__4]
|
||||
.r;
|
||||
q__1.r = temp.r + q__2.r, q__1.i = temp.i + q__2.i;
|
||||
temp.r = q__1.r, temp.i = q__1.i;
|
||||
// L290:
|
||||
}
|
||||
if (beta->r == 0.f && beta->i == 0.f) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
q__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, q__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
}
|
||||
// L300:
|
||||
}
|
||||
// L310:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (conjb) {
|
||||
//
|
||||
// Form C := alpha*A**T*B**H + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0.f, temp.i = 0.f;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
i__4 = l + i__ * a_dim1;
|
||||
r_cnjg(&q__3, &b[j + l * b_dim1]);
|
||||
q__2.r = a[i__4].r * q__3.r - a[i__4].i * q__3.i,
|
||||
q__2.i = a[i__4].r * q__3.i + a[i__4].i *
|
||||
q__3.r;
|
||||
q__1.r = temp.r + q__2.r, q__1.i = temp.i + q__2.i;
|
||||
temp.r = q__1.r, temp.i = q__1.i;
|
||||
// L320:
|
||||
}
|
||||
if (beta->r == 0.f && beta->i == 0.f) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
q__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, q__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
}
|
||||
// L330:
|
||||
}
|
||||
// L340:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A**T*B**T + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0.f, temp.i = 0.f;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
i__4 = l + i__ * a_dim1;
|
||||
i__5 = j + l * b_dim1;
|
||||
q__2.r = a[i__4].r * b[i__5].r - a[i__4].i * b[i__5]
|
||||
.i, q__2.i = a[i__4].r * b[i__5].i + a[i__4]
|
||||
.i * b[i__5].r;
|
||||
q__1.r = temp.r + q__2.r, q__1.i = temp.i + q__2.i;
|
||||
temp.r = q__1.r, temp.i = q__1.i;
|
||||
// L350:
|
||||
}
|
||||
if (beta->r == 0.f && beta->i == 0.f) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
q__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
q__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
q__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, q__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i;
|
||||
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i;
|
||||
}
|
||||
// L360:
|
||||
}
|
||||
// L370:
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of CGEMM .
|
||||
//
|
||||
} // cgemm_
|
||||
|
||||
Vendored
+171
@@ -0,0 +1,171 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DCOPY
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// INTEGER INCX,INCY,N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION DX(*),DY(*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DCOPY copies a vector, x, to a vector, y.
|
||||
//> uses unrolled loops for increments equal to 1.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> number of elements in input vector(s)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] DX
|
||||
//> \verbatim
|
||||
//> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCX
|
||||
//> \verbatim
|
||||
//> INCX is INTEGER
|
||||
//> storage spacing between elements of DX
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] DY
|
||||
//> \verbatim
|
||||
//> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCY
|
||||
//> \verbatim
|
||||
//> INCY is INTEGER
|
||||
//> storage spacing between elements of DY
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date November 2017
|
||||
//
|
||||
//> \ingroup double_blas_level1
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> jack dongarra, linpack, 3/11/78.
|
||||
//> modified 12/3/93, array(1) declarations changed to array(*)
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dcopy_(int *n, double *dx, int *incx, double *dy, int *
|
||||
incy)
|
||||
{
|
||||
// System generated locals
|
||||
int i__1;
|
||||
|
||||
// Local variables
|
||||
int i__, m, ix, iy, mp1;
|
||||
|
||||
//
|
||||
// -- Reference BLAS level1 routine (version 3.8.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// November 2017
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// Parameter adjustments
|
||||
--dy;
|
||||
--dx;
|
||||
|
||||
// Function Body
|
||||
if (*n <= 0) {
|
||||
return 0;
|
||||
}
|
||||
if (*incx == 1 && *incy == 1) {
|
||||
//
|
||||
// code for both increments equal to 1
|
||||
//
|
||||
//
|
||||
// clean-up loop
|
||||
//
|
||||
m = *n % 7;
|
||||
if (m != 0) {
|
||||
i__1 = m;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
dy[i__] = dx[i__];
|
||||
}
|
||||
if (*n < 7) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
mp1 = m + 1;
|
||||
i__1 = *n;
|
||||
for (i__ = mp1; i__ <= i__1; i__ += 7) {
|
||||
dy[i__] = dx[i__];
|
||||
dy[i__ + 1] = dx[i__ + 1];
|
||||
dy[i__ + 2] = dx[i__ + 2];
|
||||
dy[i__ + 3] = dx[i__ + 3];
|
||||
dy[i__ + 4] = dx[i__ + 4];
|
||||
dy[i__ + 5] = dx[i__ + 5];
|
||||
dy[i__ + 6] = dx[i__ + 6];
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// code for unequal increments or equal increments
|
||||
// not equal to 1
|
||||
//
|
||||
ix = 1;
|
||||
iy = 1;
|
||||
if (*incx < 0) {
|
||||
ix = (-(*n) + 1) * *incx + 1;
|
||||
}
|
||||
if (*incy < 0) {
|
||||
iy = (-(*n) + 1) * *incy + 1;
|
||||
}
|
||||
i__1 = *n;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
dy[iy] = dx[ix];
|
||||
ix += *incx;
|
||||
iy += *incy;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
} // dcopy_
|
||||
|
||||
Vendored
+172
@@ -0,0 +1,172 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DDOT
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// INTEGER INCX,INCY,N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION DX(*),DY(*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DDOT forms the dot product of two vectors.
|
||||
//> uses unrolled loops for increments equal to one.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> number of elements in input vector(s)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] DX
|
||||
//> \verbatim
|
||||
//> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCX
|
||||
//> \verbatim
|
||||
//> INCX is INTEGER
|
||||
//> storage spacing between elements of DX
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] DY
|
||||
//> \verbatim
|
||||
//> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCY
|
||||
//> \verbatim
|
||||
//> INCY is INTEGER
|
||||
//> storage spacing between elements of DY
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date November 2017
|
||||
//
|
||||
//> \ingroup double_blas_level1
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> jack dongarra, linpack, 3/11/78.
|
||||
//> modified 12/3/93, array(1) declarations changed to array(*)
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
double ddot_(int *n, double *dx, int *incx, double *dy, int *incy)
|
||||
{
|
||||
// System generated locals
|
||||
int i__1;
|
||||
double ret_val;
|
||||
|
||||
// Local variables
|
||||
int i__, m, ix, iy, mp1;
|
||||
double dtemp;
|
||||
|
||||
//
|
||||
// -- Reference BLAS level1 routine (version 3.8.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// November 2017
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// Parameter adjustments
|
||||
--dy;
|
||||
--dx;
|
||||
|
||||
// Function Body
|
||||
ret_val = 0.;
|
||||
dtemp = 0.;
|
||||
if (*n <= 0) {
|
||||
return ret_val;
|
||||
}
|
||||
if (*incx == 1 && *incy == 1) {
|
||||
//
|
||||
// code for both increments equal to 1
|
||||
//
|
||||
//
|
||||
// clean-up loop
|
||||
//
|
||||
m = *n % 5;
|
||||
if (m != 0) {
|
||||
i__1 = m;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
dtemp += dx[i__] * dy[i__];
|
||||
}
|
||||
if (*n < 5) {
|
||||
ret_val = dtemp;
|
||||
return ret_val;
|
||||
}
|
||||
}
|
||||
mp1 = m + 1;
|
||||
i__1 = *n;
|
||||
for (i__ = mp1; i__ <= i__1; i__ += 5) {
|
||||
dtemp = dtemp + dx[i__] * dy[i__] + dx[i__ + 1] * dy[i__ + 1] +
|
||||
dx[i__ + 2] * dy[i__ + 2] + dx[i__ + 3] * dy[i__ + 3] +
|
||||
dx[i__ + 4] * dy[i__ + 4];
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// code for unequal increments or equal increments
|
||||
// not equal to 1
|
||||
//
|
||||
ix = 1;
|
||||
iy = 1;
|
||||
if (*incx < 0) {
|
||||
ix = (-(*n) + 1) * *incx + 1;
|
||||
}
|
||||
if (*incy < 0) {
|
||||
iy = (-(*n) + 1) * *incy + 1;
|
||||
}
|
||||
i__1 = *n;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
dtemp += dx[ix] * dy[iy];
|
||||
ix += *incx;
|
||||
iy += *incy;
|
||||
}
|
||||
}
|
||||
ret_val = dtemp;
|
||||
return ret_val;
|
||||
} // ddot_
|
||||
|
||||
Vendored
+14369
File diff suppressed because it is too large
Load Diff
Vendored
+444
@@ -0,0 +1,444 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DGEMM
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// DOUBLE PRECISION ALPHA,BETA
|
||||
// INTEGER K,LDA,LDB,LDC,M,N
|
||||
// CHARACTER TRANSA,TRANSB
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DGEMM performs one of the matrix-matrix operations
|
||||
//>
|
||||
//> C := alpha*op( A )*op( B ) + beta*C,
|
||||
//>
|
||||
//> where op( X ) is one of
|
||||
//>
|
||||
//> op( X ) = X or op( X ) = X**T,
|
||||
//>
|
||||
//> alpha and beta are scalars, and A, B and C are matrices, with op( A )
|
||||
//> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] TRANSA
|
||||
//> \verbatim
|
||||
//> TRANSA is CHARACTER*1
|
||||
//> On entry, TRANSA specifies the form of op( A ) to be used in
|
||||
//> the matrix multiplication as follows:
|
||||
//>
|
||||
//> TRANSA = 'N' or 'n', op( A ) = A.
|
||||
//>
|
||||
//> TRANSA = 'T' or 't', op( A ) = A**T.
|
||||
//>
|
||||
//> TRANSA = 'C' or 'c', op( A ) = A**T.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TRANSB
|
||||
//> \verbatim
|
||||
//> TRANSB is CHARACTER*1
|
||||
//> On entry, TRANSB specifies the form of op( B ) to be used in
|
||||
//> the matrix multiplication as follows:
|
||||
//>
|
||||
//> TRANSB = 'N' or 'n', op( B ) = B.
|
||||
//>
|
||||
//> TRANSB = 'T' or 't', op( B ) = B**T.
|
||||
//>
|
||||
//> TRANSB = 'C' or 'c', op( B ) = B**T.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> On entry, M specifies the number of rows of the matrix
|
||||
//> op( A ) and of the matrix C. M must be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> On entry, N specifies the number of columns of the matrix
|
||||
//> op( B ) and the number of columns of the matrix C. N must be
|
||||
//> at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] K
|
||||
//> \verbatim
|
||||
//> K is INTEGER
|
||||
//> On entry, K specifies the number of columns of the matrix
|
||||
//> op( A ) and the number of rows of the matrix op( B ). K must
|
||||
//> be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] ALPHA
|
||||
//> \verbatim
|
||||
//> ALPHA is DOUBLE PRECISION.
|
||||
//> On entry, ALPHA specifies the scalar alpha.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension ( LDA, ka ), where ka is
|
||||
//> k when TRANSA = 'N' or 'n', and is m otherwise.
|
||||
//> Before entry with TRANSA = 'N' or 'n', the leading m by k
|
||||
//> part of the array A must contain the matrix A, otherwise
|
||||
//> the leading k by m part of the array A must contain the
|
||||
//> matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> On entry, LDA specifies the first dimension of A as declared
|
||||
//> in the calling (sub) program. When TRANSA = 'N' or 'n' then
|
||||
//> LDA must be at least max( 1, m ), otherwise LDA must be at
|
||||
//> least max( 1, k ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] B
|
||||
//> \verbatim
|
||||
//> B is DOUBLE PRECISION array, dimension ( LDB, kb ), where kb is
|
||||
//> n when TRANSB = 'N' or 'n', and is k otherwise.
|
||||
//> Before entry with TRANSB = 'N' or 'n', the leading k by n
|
||||
//> part of the array B must contain the matrix B, otherwise
|
||||
//> the leading n by k part of the array B must contain the
|
||||
//> matrix B.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDB
|
||||
//> \verbatim
|
||||
//> LDB is INTEGER
|
||||
//> On entry, LDB specifies the first dimension of B as declared
|
||||
//> in the calling (sub) program. When TRANSB = 'N' or 'n' then
|
||||
//> LDB must be at least max( 1, k ), otherwise LDB must be at
|
||||
//> least max( 1, n ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] BETA
|
||||
//> \verbatim
|
||||
//> BETA is DOUBLE PRECISION.
|
||||
//> On entry, BETA specifies the scalar beta. When BETA is
|
||||
//> supplied as zero then C need not be set on input.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] C
|
||||
//> \verbatim
|
||||
//> C is DOUBLE PRECISION array, dimension ( LDC, N )
|
||||
//> Before entry, the leading m by n part of the array C must
|
||||
//> contain the matrix C, except when beta is zero, in which
|
||||
//> case C need not be set on entry.
|
||||
//> On exit, the array C is overwritten by the m by n matrix
|
||||
//> ( alpha*op( A )*op( B ) + beta*C ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDC
|
||||
//> \verbatim
|
||||
//> LDC is INTEGER
|
||||
//> On entry, LDC specifies the first dimension of C as declared
|
||||
//> in the calling (sub) program. LDC must be at least
|
||||
//> max( 1, m ).
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup double_blas_level3
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> Level 3 Blas routine.
|
||||
//>
|
||||
//> -- Written on 8-February-1989.
|
||||
//> Jack Dongarra, Argonne National Laboratory.
|
||||
//> Iain Duff, AERE Harwell.
|
||||
//> Jeremy Du Croz, Numerical Algorithms Group Ltd.
|
||||
//> Sven Hammarling, Numerical Algorithms Group Ltd.
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dgemm_(char *transa, char *transb, int *m, int *n, int *
|
||||
k, double *alpha, double *a, int *lda, double *b, int *ldb, double *
|
||||
beta, double *c__, int *ldc)
|
||||
{
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, b_dim1, b_offset, c_dim1, c_offset, i__1, i__2,
|
||||
i__3;
|
||||
|
||||
// Local variables
|
||||
int i__, j, l, info;
|
||||
int nota, notb;
|
||||
double temp;
|
||||
int ncola;
|
||||
extern int lsame_(char *, char *);
|
||||
int nrowa, nrowb;
|
||||
extern /* Subroutine */ int xerbla_(char *, int *);
|
||||
|
||||
//
|
||||
// -- Reference BLAS level3 routine (version 3.7.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
//
|
||||
// Set NOTA and NOTB as true if A and B respectively are not
|
||||
// transposed and set NROWA, NCOLA and NROWB as the number of rows
|
||||
// and columns of A and the number of rows of B respectively.
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
b_dim1 = *ldb;
|
||||
b_offset = 1 + b_dim1;
|
||||
b -= b_offset;
|
||||
c_dim1 = *ldc;
|
||||
c_offset = 1 + c_dim1;
|
||||
c__ -= c_offset;
|
||||
|
||||
// Function Body
|
||||
nota = lsame_(transa, "N");
|
||||
notb = lsame_(transb, "N");
|
||||
if (nota) {
|
||||
nrowa = *m;
|
||||
ncola = *k;
|
||||
} else {
|
||||
nrowa = *k;
|
||||
ncola = *m;
|
||||
}
|
||||
if (notb) {
|
||||
nrowb = *k;
|
||||
} else {
|
||||
nrowb = *n;
|
||||
}
|
||||
//
|
||||
// Test the input parameters.
|
||||
//
|
||||
info = 0;
|
||||
if (! nota && ! lsame_(transa, "C") && ! lsame_(transa, "T")) {
|
||||
info = 1;
|
||||
} else if (! notb && ! lsame_(transb, "C") && ! lsame_(transb, "T")) {
|
||||
info = 2;
|
||||
} else if (*m < 0) {
|
||||
info = 3;
|
||||
} else if (*n < 0) {
|
||||
info = 4;
|
||||
} else if (*k < 0) {
|
||||
info = 5;
|
||||
} else if (*lda < max(1,nrowa)) {
|
||||
info = 8;
|
||||
} else if (*ldb < max(1,nrowb)) {
|
||||
info = 10;
|
||||
} else if (*ldc < max(1,*m)) {
|
||||
info = 13;
|
||||
}
|
||||
if (info != 0) {
|
||||
xerbla_("DGEMM ", &info);
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible.
|
||||
//
|
||||
if (*m == 0 || *n == 0 || (*alpha == 0. || *k == 0) && *beta == 1.) {
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// And if alpha.eq.zero.
|
||||
//
|
||||
if (*alpha == 0.) {
|
||||
if (*beta == 0.) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = 0.;
|
||||
// L10:
|
||||
}
|
||||
// L20:
|
||||
}
|
||||
} else {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
|
||||
// L30:
|
||||
}
|
||||
// L40:
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Start the operations.
|
||||
//
|
||||
if (notb) {
|
||||
if (nota) {
|
||||
//
|
||||
// Form C := alpha*A*B + beta*C.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (*beta == 0.) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = 0.;
|
||||
// L50:
|
||||
}
|
||||
} else if (*beta != 1.) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
|
||||
// L60:
|
||||
}
|
||||
}
|
||||
i__2 = *k;
|
||||
for (l = 1; l <= i__2; ++l) {
|
||||
temp = *alpha * b[l + j * b_dim1];
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
c__[i__ + j * c_dim1] += temp * a[i__ + l * a_dim1];
|
||||
// L70:
|
||||
}
|
||||
// L80:
|
||||
}
|
||||
// L90:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A**T*B + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp = 0.;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
temp += a[l + i__ * a_dim1] * b[l + j * b_dim1];
|
||||
// L100:
|
||||
}
|
||||
if (*beta == 0.) {
|
||||
c__[i__ + j * c_dim1] = *alpha * temp;
|
||||
} else {
|
||||
c__[i__ + j * c_dim1] = *alpha * temp + *beta * c__[
|
||||
i__ + j * c_dim1];
|
||||
}
|
||||
// L110:
|
||||
}
|
||||
// L120:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (nota) {
|
||||
//
|
||||
// Form C := alpha*A*B**T + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (*beta == 0.) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = 0.;
|
||||
// L130:
|
||||
}
|
||||
} else if (*beta != 1.) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
|
||||
// L140:
|
||||
}
|
||||
}
|
||||
i__2 = *k;
|
||||
for (l = 1; l <= i__2; ++l) {
|
||||
temp = *alpha * b[j + l * b_dim1];
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
c__[i__ + j * c_dim1] += temp * a[i__ + l * a_dim1];
|
||||
// L150:
|
||||
}
|
||||
// L160:
|
||||
}
|
||||
// L170:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A**T*B**T + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp = 0.;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
temp += a[l + i__ * a_dim1] * b[j + l * b_dim1];
|
||||
// L180:
|
||||
}
|
||||
if (*beta == 0.) {
|
||||
c__[i__ + j * c_dim1] = *alpha * temp;
|
||||
} else {
|
||||
c__[i__ + j * c_dim1] = *alpha * temp + *beta * c__[
|
||||
i__ + j * c_dim1];
|
||||
}
|
||||
// L190:
|
||||
}
|
||||
// L200:
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DGEMM .
|
||||
//
|
||||
} // dgemm_
|
||||
|
||||
Vendored
+370
@@ -0,0 +1,370 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DGEMV
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// DOUBLE PRECISION ALPHA,BETA
|
||||
// INTEGER INCX,INCY,LDA,M,N
|
||||
// CHARACTER TRANS
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A(LDA,*),X(*),Y(*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DGEMV performs one of the matrix-vector operations
|
||||
//>
|
||||
//> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
|
||||
//>
|
||||
//> where alpha and beta are scalars, x and y are vectors and A is an
|
||||
//> m by n matrix.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] TRANS
|
||||
//> \verbatim
|
||||
//> TRANS is CHARACTER*1
|
||||
//> On entry, TRANS specifies the operation to be performed as
|
||||
//> follows:
|
||||
//>
|
||||
//> TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
|
||||
//>
|
||||
//> TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
|
||||
//>
|
||||
//> TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> On entry, M specifies the number of rows of the matrix A.
|
||||
//> M must be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> On entry, N specifies the number of columns of the matrix A.
|
||||
//> N must be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] ALPHA
|
||||
//> \verbatim
|
||||
//> ALPHA is DOUBLE PRECISION.
|
||||
//> On entry, ALPHA specifies the scalar alpha.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension ( LDA, N )
|
||||
//> Before entry, the leading m by n part of the array A must
|
||||
//> contain the matrix of coefficients.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> On entry, LDA specifies the first dimension of A as declared
|
||||
//> in the calling (sub) program. LDA must be at least
|
||||
//> max( 1, m ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] X
|
||||
//> \verbatim
|
||||
//> X is DOUBLE PRECISION array, dimension at least
|
||||
//> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
|
||||
//> and at least
|
||||
//> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
|
||||
//> Before entry, the incremented array X must contain the
|
||||
//> vector x.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCX
|
||||
//> \verbatim
|
||||
//> INCX is INTEGER
|
||||
//> On entry, INCX specifies the increment for the elements of
|
||||
//> X. INCX must not be zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] BETA
|
||||
//> \verbatim
|
||||
//> BETA is DOUBLE PRECISION.
|
||||
//> On entry, BETA specifies the scalar beta. When BETA is
|
||||
//> supplied as zero then Y need not be set on input.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] Y
|
||||
//> \verbatim
|
||||
//> Y is DOUBLE PRECISION array, dimension at least
|
||||
//> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
|
||||
//> and at least
|
||||
//> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
|
||||
//> Before entry with BETA non-zero, the incremented array Y
|
||||
//> must contain the vector y. On exit, Y is overwritten by the
|
||||
//> updated vector y.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCY
|
||||
//> \verbatim
|
||||
//> INCY is INTEGER
|
||||
//> On entry, INCY specifies the increment for the elements of
|
||||
//> Y. INCY must not be zero.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup double_blas_level2
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> Level 2 Blas routine.
|
||||
//> The vector and matrix arguments are not referenced when N = 0, or M = 0
|
||||
//>
|
||||
//> -- Written on 22-October-1986.
|
||||
//> Jack Dongarra, Argonne National Lab.
|
||||
//> Jeremy Du Croz, Nag Central Office.
|
||||
//> Sven Hammarling, Nag Central Office.
|
||||
//> Richard Hanson, Sandia National Labs.
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dgemv_(char *trans, int *m, int *n, double *alpha,
|
||||
double *a, int *lda, double *x, int *incx, double *beta, double *y,
|
||||
int *incy)
|
||||
{
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, i__1, i__2;
|
||||
|
||||
// Local variables
|
||||
int i__, j, ix, iy, jx, jy, kx, ky, info;
|
||||
double temp;
|
||||
int lenx, leny;
|
||||
extern int lsame_(char *, char *);
|
||||
extern /* Subroutine */ int xerbla_(char *, int *);
|
||||
|
||||
//
|
||||
// -- Reference BLAS level2 routine (version 3.7.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
//
|
||||
// Test the input parameters.
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
--x;
|
||||
--y;
|
||||
|
||||
// Function Body
|
||||
info = 0;
|
||||
if (! lsame_(trans, "N") && ! lsame_(trans, "T") && ! lsame_(trans, "C"))
|
||||
{
|
||||
info = 1;
|
||||
} else if (*m < 0) {
|
||||
info = 2;
|
||||
} else if (*n < 0) {
|
||||
info = 3;
|
||||
} else if (*lda < max(1,*m)) {
|
||||
info = 6;
|
||||
} else if (*incx == 0) {
|
||||
info = 8;
|
||||
} else if (*incy == 0) {
|
||||
info = 11;
|
||||
}
|
||||
if (info != 0) {
|
||||
xerbla_("DGEMV ", &info);
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible.
|
||||
//
|
||||
if (*m == 0 || *n == 0 || *alpha == 0. && *beta == 1.) {
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Set LENX and LENY, the lengths of the vectors x and y, and set
|
||||
// up the start points in X and Y.
|
||||
//
|
||||
if (lsame_(trans, "N")) {
|
||||
lenx = *n;
|
||||
leny = *m;
|
||||
} else {
|
||||
lenx = *m;
|
||||
leny = *n;
|
||||
}
|
||||
if (*incx > 0) {
|
||||
kx = 1;
|
||||
} else {
|
||||
kx = 1 - (lenx - 1) * *incx;
|
||||
}
|
||||
if (*incy > 0) {
|
||||
ky = 1;
|
||||
} else {
|
||||
ky = 1 - (leny - 1) * *incy;
|
||||
}
|
||||
//
|
||||
// Start the operations. In this version the elements of A are
|
||||
// accessed sequentially with one pass through A.
|
||||
//
|
||||
// First form y := beta*y.
|
||||
//
|
||||
if (*beta != 1.) {
|
||||
if (*incy == 1) {
|
||||
if (*beta == 0.) {
|
||||
i__1 = leny;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
y[i__] = 0.;
|
||||
// L10:
|
||||
}
|
||||
} else {
|
||||
i__1 = leny;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
y[i__] = *beta * y[i__];
|
||||
// L20:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
iy = ky;
|
||||
if (*beta == 0.) {
|
||||
i__1 = leny;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
y[iy] = 0.;
|
||||
iy += *incy;
|
||||
// L30:
|
||||
}
|
||||
} else {
|
||||
i__1 = leny;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
y[iy] = *beta * y[iy];
|
||||
iy += *incy;
|
||||
// L40:
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (*alpha == 0.) {
|
||||
return 0;
|
||||
}
|
||||
if (lsame_(trans, "N")) {
|
||||
//
|
||||
// Form y := alpha*A*x + y.
|
||||
//
|
||||
jx = kx;
|
||||
if (*incy == 1) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
temp = *alpha * x[jx];
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
y[i__] += temp * a[i__ + j * a_dim1];
|
||||
// L50:
|
||||
}
|
||||
jx += *incx;
|
||||
// L60:
|
||||
}
|
||||
} else {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
temp = *alpha * x[jx];
|
||||
iy = ky;
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
y[iy] += temp * a[i__ + j * a_dim1];
|
||||
iy += *incy;
|
||||
// L70:
|
||||
}
|
||||
jx += *incx;
|
||||
// L80:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form y := alpha*A**T*x + y.
|
||||
//
|
||||
jy = ky;
|
||||
if (*incx == 1) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
temp = 0.;
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp += a[i__ + j * a_dim1] * x[i__];
|
||||
// L90:
|
||||
}
|
||||
y[jy] += *alpha * temp;
|
||||
jy += *incy;
|
||||
// L100:
|
||||
}
|
||||
} else {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
temp = 0.;
|
||||
ix = kx;
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp += a[i__ + j * a_dim1] * x[ix];
|
||||
ix += *incx;
|
||||
// L110:
|
||||
}
|
||||
y[jy] += *alpha * temp;
|
||||
jy += *incy;
|
||||
// L120:
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DGEMV .
|
||||
//
|
||||
} // dgemv_
|
||||
|
||||
Vendored
+18599
File diff suppressed because it is too large
Load Diff
Vendored
+186
@@ -0,0 +1,186 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DISNAN tests input for NaN.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DISNAN + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/disnan.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/disnan.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/disnan.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// LOGICAL FUNCTION DISNAN( DIN )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// DOUBLE PRECISION, INTENT(IN) :: DIN
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DISNAN returns .TRUE. if its argument is NaN, and .FALSE.
|
||||
//> otherwise. To be replaced by the Fortran 2003 intrinsic in the
|
||||
//> future.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] DIN
|
||||
//> \verbatim
|
||||
//> DIN is DOUBLE PRECISION
|
||||
//> Input to test for NaN.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date June 2017
|
||||
//
|
||||
//> \ingroup OTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
int disnan_(double *din)
|
||||
{
|
||||
// System generated locals
|
||||
int ret_val;
|
||||
|
||||
// Local variables
|
||||
extern int dlaisnan_(double *, double *);
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.1) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// June 2017
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
ret_val = dlaisnan_(din, din);
|
||||
return ret_val;
|
||||
} // disnan_
|
||||
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
//> \brief \b DLAISNAN tests input for NaN by comparing two arguments for inequality.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLAISNAN + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaisnan.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaisnan.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaisnan.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// LOGICAL FUNCTION DLAISNAN( DIN1, DIN2 )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// DOUBLE PRECISION, INTENT(IN) :: DIN1, DIN2
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> This routine is not for general use. It exists solely to avoid
|
||||
//> over-optimization in DISNAN.
|
||||
//>
|
||||
//> DLAISNAN checks for NaNs by comparing its two arguments for
|
||||
//> inequality. NaN is the only floating-point value where NaN != NaN
|
||||
//> returns .TRUE. To check for NaNs, pass the same variable as both
|
||||
//> arguments.
|
||||
//>
|
||||
//> A compiler must assume that the two arguments are
|
||||
//> not the same variable, and the test will not be optimized away.
|
||||
//> Interprocedural or whole-program optimization may delete this
|
||||
//> test. The ISNAN functions will be replaced by the correct
|
||||
//> Fortran 03 intrinsic once the intrinsic is widely available.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] DIN1
|
||||
//> \verbatim
|
||||
//> DIN1 is DOUBLE PRECISION
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] DIN2
|
||||
//> \verbatim
|
||||
//> DIN2 is DOUBLE PRECISION
|
||||
//> Two numbers to compare for inequality.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date June 2017
|
||||
//
|
||||
//> \ingroup OTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
int dlaisnan_(double *din1, double *din2)
|
||||
{
|
||||
// System generated locals
|
||||
int ret_val;
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.1) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// June 2017
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Executable Statements ..
|
||||
ret_val = *din1 != *din2;
|
||||
return ret_val;
|
||||
} // dlaisnan_
|
||||
|
||||
Vendored
+184
@@ -0,0 +1,184 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DLACPY copies all or part of one two-dimensional array to another.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLACPY + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlacpy.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlacpy.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlacpy.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// CHARACTER UPLO
|
||||
// INTEGER LDA, LDB, M, N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A( LDA, * ), B( LDB, * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLACPY copies all or part of a two-dimensional matrix A to another
|
||||
//> matrix B.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] UPLO
|
||||
//> \verbatim
|
||||
//> UPLO is CHARACTER*1
|
||||
//> Specifies the part of the matrix A to be copied to B.
|
||||
//> = 'U': Upper triangular part
|
||||
//> = 'L': Lower triangular part
|
||||
//> Otherwise: All of the matrix A
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix A. M >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix A. N >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension (LDA,N)
|
||||
//> The m by n matrix A. If UPLO = 'U', only the upper triangle
|
||||
//> or trapezoid is accessed; if UPLO = 'L', only the lower
|
||||
//> triangle or trapezoid is accessed.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> The leading dimension of the array A. LDA >= max(1,M).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] B
|
||||
//> \verbatim
|
||||
//> B is DOUBLE PRECISION array, dimension (LDB,N)
|
||||
//> On exit, B = A in the locations specified by UPLO.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDB
|
||||
//> \verbatim
|
||||
//> LDB is INTEGER
|
||||
//> The leading dimension of the array B. LDB >= max(1,M).
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup OTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dlacpy_(char *uplo, int *m, int *n, double *a, int *lda,
|
||||
double *b, int *ldb)
|
||||
{
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, b_dim1, b_offset, i__1, i__2;
|
||||
|
||||
// Local variables
|
||||
int i__, j;
|
||||
extern int lsame_(char *, char *);
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
b_dim1 = *ldb;
|
||||
b_offset = 1 + b_dim1;
|
||||
b -= b_offset;
|
||||
|
||||
// Function Body
|
||||
if (lsame_(uplo, "U")) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = min(j,*m);
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
b[i__ + j * b_dim1] = a[i__ + j * a_dim1];
|
||||
// L10:
|
||||
}
|
||||
// L20:
|
||||
}
|
||||
} else if (lsame_(uplo, "L")) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = j; i__ <= i__2; ++i__) {
|
||||
b[i__ + j * b_dim1] = a[i__ + j * a_dim1];
|
||||
// L30:
|
||||
}
|
||||
// L40:
|
||||
}
|
||||
} else {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
b[i__ + j * b_dim1] = a[i__ + j * a_dim1];
|
||||
// L50:
|
||||
}
|
||||
// L60:
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DLACPY
|
||||
//
|
||||
} // dlacpy_
|
||||
|
||||
Vendored
+367
@@ -0,0 +1,367 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DCOMBSSQ adds two scaled sum of squares quantities.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DCOMBSSQ( V1, V2 )
|
||||
//
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION V1( 2 ), V2( 2 )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DCOMBSSQ adds two scaled sum of squares quantities, V1 := V1 + V2.
|
||||
//> That is,
|
||||
//>
|
||||
//> V1_scale**2 * V1_sumsq := V1_scale**2 * V1_sumsq
|
||||
//> + V2_scale**2 * V2_sumsq
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in,out] V1
|
||||
//> \verbatim
|
||||
//> V1 is DOUBLE PRECISION array, dimension (2).
|
||||
//> The first scaled sum.
|
||||
//> V1(1) = V1_scale, V1(2) = V1_sumsq.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] V2
|
||||
//> \verbatim
|
||||
//> V2 is DOUBLE PRECISION array, dimension (2).
|
||||
//> The second scaled sum.
|
||||
//> V2(1) = V2_scale, V2(2) = V2_sumsq.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date November 2018
|
||||
//
|
||||
//> \ingroup OTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dcombssq_(double *v1, double *v2)
|
||||
{
|
||||
// System generated locals
|
||||
double d__1;
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// November 2018
|
||||
//
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
//=====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Parameter adjustments
|
||||
--v2;
|
||||
--v1;
|
||||
|
||||
// Function Body
|
||||
if (v1[1] >= v2[1]) {
|
||||
if (v1[1] != 0.) {
|
||||
// Computing 2nd power
|
||||
d__1 = v2[1] / v1[1];
|
||||
v1[2] += d__1 * d__1 * v2[2];
|
||||
}
|
||||
} else {
|
||||
// Computing 2nd power
|
||||
d__1 = v1[1] / v2[1];
|
||||
v1[2] = v2[2] + d__1 * d__1 * v1[2];
|
||||
v1[1] = v2[1];
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DCOMBSSQ
|
||||
//
|
||||
} // dcombssq_
|
||||
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
//> \brief \b DLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of a general rectangular matrix.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLANGE + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlange.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlange.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlange.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// DOUBLE PRECISION FUNCTION DLANGE( NORM, M, N, A, LDA, WORK )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// CHARACTER NORM
|
||||
// INTEGER LDA, M, N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A( LDA, * ), WORK( * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLANGE returns the value of the one norm, or the Frobenius norm, or
|
||||
//> the infinity norm, or the element of largest absolute value of a
|
||||
//> real matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \return DLANGE
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
|
||||
//> (
|
||||
//> ( norm1(A), NORM = '1', 'O' or 'o'
|
||||
//> (
|
||||
//> ( normI(A), NORM = 'I' or 'i'
|
||||
//> (
|
||||
//> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
|
||||
//>
|
||||
//> where norm1 denotes the one norm of a matrix (maximum column sum),
|
||||
//> normI denotes the infinity norm of a matrix (maximum row sum) and
|
||||
//> normF denotes the Frobenius norm of a matrix (square root of sum of
|
||||
//> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] NORM
|
||||
//> \verbatim
|
||||
//> NORM is CHARACTER*1
|
||||
//> Specifies the value to be returned in DLANGE as described
|
||||
//> above.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix A. M >= 0. When M = 0,
|
||||
//> DLANGE is set to zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix A. N >= 0. When N = 0,
|
||||
//> DLANGE is set to zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension (LDA,N)
|
||||
//> The m by n matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> The leading dimension of the array A. LDA >= max(M,1).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] WORK
|
||||
//> \verbatim
|
||||
//> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
|
||||
//> where LWORK >= M when NORM = 'I'; otherwise, WORK is not
|
||||
//> referenced.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup doubleGEauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
double dlange_(char *norm, int *m, int *n, double *a, int *lda, double *work)
|
||||
{
|
||||
// Table of constant values
|
||||
int c__1 = 1;
|
||||
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, i__1, i__2;
|
||||
double ret_val, d__1;
|
||||
|
||||
// Local variables
|
||||
extern /* Subroutine */ int dcombssq_(double *, double *);
|
||||
int i__, j;
|
||||
double sum, ssq[2], temp;
|
||||
extern int lsame_(char *, char *);
|
||||
double value;
|
||||
extern int disnan_(double *);
|
||||
extern /* Subroutine */ int dlassq_(int *, double *, int *, double *,
|
||||
double *);
|
||||
double colssq[2];
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
//=====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Local Arrays ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
--work;
|
||||
|
||||
// Function Body
|
||||
if (min(*m,*n) == 0) {
|
||||
value = 0.;
|
||||
} else if (lsame_(norm, "M")) {
|
||||
//
|
||||
// Find max(abs(A(i,j))).
|
||||
//
|
||||
value = 0.;
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp = (d__1 = a[i__ + j * a_dim1], abs(d__1));
|
||||
if (value < temp || disnan_(&temp)) {
|
||||
value = temp;
|
||||
}
|
||||
// L10:
|
||||
}
|
||||
// L20:
|
||||
}
|
||||
} else if (lsame_(norm, "O") || *(unsigned char *)norm == '1') {
|
||||
//
|
||||
// Find norm1(A).
|
||||
//
|
||||
value = 0.;
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
sum = 0.;
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
sum += (d__1 = a[i__ + j * a_dim1], abs(d__1));
|
||||
// L30:
|
||||
}
|
||||
if (value < sum || disnan_(&sum)) {
|
||||
value = sum;
|
||||
}
|
||||
// L40:
|
||||
}
|
||||
} else if (lsame_(norm, "I")) {
|
||||
//
|
||||
// Find normI(A).
|
||||
//
|
||||
i__1 = *m;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
work[i__] = 0.;
|
||||
// L50:
|
||||
}
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
work[i__] += (d__1 = a[i__ + j * a_dim1], abs(d__1));
|
||||
// L60:
|
||||
}
|
||||
// L70:
|
||||
}
|
||||
value = 0.;
|
||||
i__1 = *m;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
temp = work[i__];
|
||||
if (value < temp || disnan_(&temp)) {
|
||||
value = temp;
|
||||
}
|
||||
// L80:
|
||||
}
|
||||
} else if (lsame_(norm, "F") || lsame_(norm, "E")) {
|
||||
//
|
||||
// Find normF(A).
|
||||
// SSQ(1) is scale
|
||||
// SSQ(2) is sum-of-squares
|
||||
// For better accuracy, sum each column separately.
|
||||
//
|
||||
ssq[0] = 0.;
|
||||
ssq[1] = 1.;
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
colssq[0] = 0.;
|
||||
colssq[1] = 1.;
|
||||
dlassq_(m, &a[j * a_dim1 + 1], &c__1, colssq, &colssq[1]);
|
||||
dcombssq_(ssq, colssq);
|
||||
// L90:
|
||||
}
|
||||
value = ssq[0] * sqrt(ssq[1]);
|
||||
}
|
||||
ret_val = value;
|
||||
return ret_val;
|
||||
//
|
||||
// End of DLANGE
|
||||
//
|
||||
} // dlange_
|
||||
|
||||
Vendored
+125
@@ -0,0 +1,125 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DLAPY2 returns sqrt(x2+y2).
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLAPY2 + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapy2.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapy2.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapy2.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// DOUBLE PRECISION FUNCTION DLAPY2( X, Y )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// DOUBLE PRECISION X, Y
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary
|
||||
//> overflow.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] X
|
||||
//> \verbatim
|
||||
//> X is DOUBLE PRECISION
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] Y
|
||||
//> \verbatim
|
||||
//> Y is DOUBLE PRECISION
|
||||
//> X and Y specify the values x and y.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date June 2017
|
||||
//
|
||||
//> \ingroup OTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
double dlapy2_(double *x, double *y)
|
||||
{
|
||||
// System generated locals
|
||||
double ret_val, d__1;
|
||||
|
||||
// Local variables
|
||||
int x_is_nan__, y_is_nan__;
|
||||
double w, z__, xabs, yabs;
|
||||
extern int disnan_(double *);
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.1) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// June 2017
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
x_is_nan__ = disnan_(x);
|
||||
y_is_nan__ = disnan_(y);
|
||||
if (x_is_nan__) {
|
||||
ret_val = *x;
|
||||
}
|
||||
if (y_is_nan__) {
|
||||
ret_val = *y;
|
||||
}
|
||||
if (! (x_is_nan__ || y_is_nan__)) {
|
||||
xabs = abs(*x);
|
||||
yabs = abs(*y);
|
||||
w = max(xabs,yabs);
|
||||
z__ = min(xabs,yabs);
|
||||
if (z__ == 0.) {
|
||||
ret_val = w;
|
||||
} else {
|
||||
// Computing 2nd power
|
||||
d__1 = z__ / w;
|
||||
ret_val = w * sqrt(d__1 * d__1 + 1.);
|
||||
}
|
||||
}
|
||||
return ret_val;
|
||||
//
|
||||
// End of DLAPY2
|
||||
//
|
||||
} // dlapy2_
|
||||
|
||||
Vendored
+768
@@ -0,0 +1,768 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DGER
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// DOUBLE PRECISION ALPHA
|
||||
// INTEGER INCX,INCY,LDA,M,N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A(LDA,*),X(*),Y(*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DGER performs the rank 1 operation
|
||||
//>
|
||||
//> A := alpha*x*y**T + A,
|
||||
//>
|
||||
//> where alpha is a scalar, x is an m element vector, y is an n element
|
||||
//> vector and A is an m by n matrix.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> On entry, M specifies the number of rows of the matrix A.
|
||||
//> M must be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> On entry, N specifies the number of columns of the matrix A.
|
||||
//> N must be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] ALPHA
|
||||
//> \verbatim
|
||||
//> ALPHA is DOUBLE PRECISION.
|
||||
//> On entry, ALPHA specifies the scalar alpha.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] X
|
||||
//> \verbatim
|
||||
//> X is DOUBLE PRECISION array, dimension at least
|
||||
//> ( 1 + ( m - 1 )*abs( INCX ) ).
|
||||
//> Before entry, the incremented array X must contain the m
|
||||
//> element vector x.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCX
|
||||
//> \verbatim
|
||||
//> INCX is INTEGER
|
||||
//> On entry, INCX specifies the increment for the elements of
|
||||
//> X. INCX must not be zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] Y
|
||||
//> \verbatim
|
||||
//> Y is DOUBLE PRECISION array, dimension at least
|
||||
//> ( 1 + ( n - 1 )*abs( INCY ) ).
|
||||
//> Before entry, the incremented array Y must contain the n
|
||||
//> element vector y.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCY
|
||||
//> \verbatim
|
||||
//> INCY is INTEGER
|
||||
//> On entry, INCY specifies the increment for the elements of
|
||||
//> Y. INCY must not be zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension ( LDA, N )
|
||||
//> Before entry, the leading m by n part of the array A must
|
||||
//> contain the matrix of coefficients. On exit, A is
|
||||
//> overwritten by the updated matrix.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> On entry, LDA specifies the first dimension of A as declared
|
||||
//> in the calling (sub) program. LDA must be at least
|
||||
//> max( 1, m ).
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup double_blas_level2
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> Level 2 Blas routine.
|
||||
//>
|
||||
//> -- Written on 22-October-1986.
|
||||
//> Jack Dongarra, Argonne National Lab.
|
||||
//> Jeremy Du Croz, Nag Central Office.
|
||||
//> Sven Hammarling, Nag Central Office.
|
||||
//> Richard Hanson, Sandia National Labs.
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dger_(int *m, int *n, double *alpha, double *x, int *
|
||||
incx, double *y, int *incy, double *a, int *lda)
|
||||
{
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, i__1, i__2;
|
||||
|
||||
// Local variables
|
||||
int i__, j, ix, jy, kx, info;
|
||||
double temp;
|
||||
extern /* Subroutine */ int xerbla_(char *, int *);
|
||||
|
||||
//
|
||||
// -- Reference BLAS level2 routine (version 3.7.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
//
|
||||
// Test the input parameters.
|
||||
//
|
||||
// Parameter adjustments
|
||||
--x;
|
||||
--y;
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
|
||||
// Function Body
|
||||
info = 0;
|
||||
if (*m < 0) {
|
||||
info = 1;
|
||||
} else if (*n < 0) {
|
||||
info = 2;
|
||||
} else if (*incx == 0) {
|
||||
info = 5;
|
||||
} else if (*incy == 0) {
|
||||
info = 7;
|
||||
} else if (*lda < max(1,*m)) {
|
||||
info = 9;
|
||||
}
|
||||
if (info != 0) {
|
||||
xerbla_("DGER ", &info);
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible.
|
||||
//
|
||||
if (*m == 0 || *n == 0 || *alpha == 0.) {
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Start the operations. In this version the elements of A are
|
||||
// accessed sequentially with one pass through A.
|
||||
//
|
||||
if (*incy > 0) {
|
||||
jy = 1;
|
||||
} else {
|
||||
jy = 1 - (*n - 1) * *incy;
|
||||
}
|
||||
if (*incx == 1) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (y[jy] != 0.) {
|
||||
temp = *alpha * y[jy];
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] += x[i__] * temp;
|
||||
// L10:
|
||||
}
|
||||
}
|
||||
jy += *incy;
|
||||
// L20:
|
||||
}
|
||||
} else {
|
||||
if (*incx > 0) {
|
||||
kx = 1;
|
||||
} else {
|
||||
kx = 1 - (*m - 1) * *incx;
|
||||
}
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (y[jy] != 0.) {
|
||||
temp = *alpha * y[jy];
|
||||
ix = kx;
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] += x[ix] * temp;
|
||||
ix += *incx;
|
||||
// L30:
|
||||
}
|
||||
}
|
||||
jy += *incy;
|
||||
// L40:
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DGER .
|
||||
//
|
||||
} // dger_
|
||||
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
//> \brief \b DLARF applies an elementary reflector to a general rectangular matrix.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLARF + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarf.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarf.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarf.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// CHARACTER SIDE
|
||||
// INTEGER INCV, LDC, M, N
|
||||
// DOUBLE PRECISION TAU
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLARF applies a real elementary reflector H to a real m by n matrix
|
||||
//> C, from either the left or the right. H is represented in the form
|
||||
//>
|
||||
//> H = I - tau * v * v**T
|
||||
//>
|
||||
//> where tau is a real scalar and v is a real vector.
|
||||
//>
|
||||
//> If tau = 0, then H is taken to be the unit matrix.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] SIDE
|
||||
//> \verbatim
|
||||
//> SIDE is CHARACTER*1
|
||||
//> = 'L': form H * C
|
||||
//> = 'R': form C * H
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix C.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix C.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] V
|
||||
//> \verbatim
|
||||
//> V is DOUBLE PRECISION array, dimension
|
||||
//> (1 + (M-1)*abs(INCV)) if SIDE = 'L'
|
||||
//> or (1 + (N-1)*abs(INCV)) if SIDE = 'R'
|
||||
//> The vector v in the representation of H. V is not used if
|
||||
//> TAU = 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCV
|
||||
//> \verbatim
|
||||
//> INCV is INTEGER
|
||||
//> The increment between elements of v. INCV <> 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TAU
|
||||
//> \verbatim
|
||||
//> TAU is DOUBLE PRECISION
|
||||
//> The value tau in the representation of H.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] C
|
||||
//> \verbatim
|
||||
//> C is DOUBLE PRECISION array, dimension (LDC,N)
|
||||
//> On entry, the m by n matrix C.
|
||||
//> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
|
||||
//> or C * H if SIDE = 'R'.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDC
|
||||
//> \verbatim
|
||||
//> LDC is INTEGER
|
||||
//> The leading dimension of the array C. LDC >= max(1,M).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] WORK
|
||||
//> \verbatim
|
||||
//> WORK is DOUBLE PRECISION array, dimension
|
||||
//> (N) if SIDE = 'L'
|
||||
//> or (M) if SIDE = 'R'
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup doubleOTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dlarf_(char *side, int *m, int *n, double *v, int *incv,
|
||||
double *tau, double *c__, int *ldc, double *work)
|
||||
{
|
||||
// Table of constant values
|
||||
double c_b4 = 1.;
|
||||
double c_b5 = 0.;
|
||||
int c__1 = 1;
|
||||
|
||||
// System generated locals
|
||||
int c_dim1, c_offset;
|
||||
double d__1;
|
||||
|
||||
// Local variables
|
||||
int i__;
|
||||
int applyleft;
|
||||
extern /* Subroutine */ int dger_(int *, int *, double *, double *, int *,
|
||||
double *, int *, double *, int *);
|
||||
extern int lsame_(char *, char *);
|
||||
extern /* Subroutine */ int dgemv_(char *, int *, int *, double *, double
|
||||
*, int *, double *, int *, double *, double *, int *);
|
||||
int lastc, lastv;
|
||||
extern int iladlc_(int *, int *, double *, int *), iladlr_(int *, int *,
|
||||
double *, int *);
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Parameter adjustments
|
||||
--v;
|
||||
c_dim1 = *ldc;
|
||||
c_offset = 1 + c_dim1;
|
||||
c__ -= c_offset;
|
||||
--work;
|
||||
|
||||
// Function Body
|
||||
applyleft = lsame_(side, "L");
|
||||
lastv = 0;
|
||||
lastc = 0;
|
||||
if (*tau != 0.) {
|
||||
// Set up variables for scanning V. LASTV begins pointing to the end
|
||||
// of V.
|
||||
if (applyleft) {
|
||||
lastv = *m;
|
||||
} else {
|
||||
lastv = *n;
|
||||
}
|
||||
if (*incv > 0) {
|
||||
i__ = (lastv - 1) * *incv + 1;
|
||||
} else {
|
||||
i__ = 1;
|
||||
}
|
||||
// Look for the last non-zero row in V.
|
||||
while(lastv > 0 && v[i__] == 0.) {
|
||||
--lastv;
|
||||
i__ -= *incv;
|
||||
}
|
||||
if (applyleft) {
|
||||
// Scan for the last non-zero column in C(1:lastv,:).
|
||||
lastc = iladlc_(&lastv, n, &c__[c_offset], ldc);
|
||||
} else {
|
||||
// Scan for the last non-zero row in C(:,1:lastv).
|
||||
lastc = iladlr_(m, &lastv, &c__[c_offset], ldc);
|
||||
}
|
||||
}
|
||||
// Note that lastc.eq.0 renders the BLAS operations null; no special
|
||||
// case is needed at this level.
|
||||
if (applyleft) {
|
||||
//
|
||||
// Form H * C
|
||||
//
|
||||
if (lastv > 0) {
|
||||
//
|
||||
// w(1:lastc,1) := C(1:lastv,1:lastc)**T * v(1:lastv,1)
|
||||
//
|
||||
dgemv_("Transpose", &lastv, &lastc, &c_b4, &c__[c_offset], ldc, &
|
||||
v[1], incv, &c_b5, &work[1], &c__1);
|
||||
//
|
||||
// C(1:lastv,1:lastc) := C(...) - v(1:lastv,1) * w(1:lastc,1)**T
|
||||
//
|
||||
d__1 = -(*tau);
|
||||
dger_(&lastv, &lastc, &d__1, &v[1], incv, &work[1], &c__1, &c__[
|
||||
c_offset], ldc);
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C * H
|
||||
//
|
||||
if (lastv > 0) {
|
||||
//
|
||||
// w(1:lastc,1) := C(1:lastc,1:lastv) * v(1:lastv,1)
|
||||
//
|
||||
dgemv_("No transpose", &lastc, &lastv, &c_b4, &c__[c_offset], ldc,
|
||||
&v[1], incv, &c_b5, &work[1], &c__1);
|
||||
//
|
||||
// C(1:lastc,1:lastv) := C(...) - w(1:lastc,1) * v(1:lastv,1)**T
|
||||
//
|
||||
d__1 = -(*tau);
|
||||
dger_(&lastc, &lastv, &d__1, &work[1], &c__1, &v[1], incv, &c__[
|
||||
c_offset], ldc);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DLARF
|
||||
//
|
||||
} // dlarf_
|
||||
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
//> \brief \b ILADLC scans a matrix for its last non-zero column.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download ILADLC + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iladlc.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iladlc.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iladlc.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// INTEGER FUNCTION ILADLC( M, N, A, LDA )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// INTEGER M, N, LDA
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A( LDA, * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> ILADLC scans A for its last non-zero column.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension (LDA,N)
|
||||
//> The m by n matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> The leading dimension of the array A. LDA >= max(1,M).
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup OTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
int iladlc_(int *m, int *n, double *a, int *lda)
|
||||
{
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, ret_val, i__1;
|
||||
|
||||
// Local variables
|
||||
int i__;
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Quick test for the common case where one corner is non-zero.
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
|
||||
// Function Body
|
||||
if (*n == 0) {
|
||||
ret_val = *n;
|
||||
} else if (a[*n * a_dim1 + 1] != 0. || a[*m + *n * a_dim1] != 0.) {
|
||||
ret_val = *n;
|
||||
} else {
|
||||
// Now scan each column from the end, returning with the first non-zero.
|
||||
for (ret_val = *n; ret_val >= 1; --ret_val) {
|
||||
i__1 = *m;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
if (a[i__ + ret_val * a_dim1] != 0.) {
|
||||
return ret_val;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret_val;
|
||||
} // iladlc_
|
||||
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
//> \brief \b ILADLR scans a matrix for its last non-zero row.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download ILADLR + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iladlr.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iladlr.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iladlr.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// INTEGER FUNCTION ILADLR( M, N, A, LDA )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// INTEGER M, N, LDA
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A( LDA, * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> ILADLR scans A for its last non-zero row.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension (LDA,N)
|
||||
//> The m by n matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> The leading dimension of the array A. LDA >= max(1,M).
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup OTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
int iladlr_(int *m, int *n, double *a, int *lda)
|
||||
{
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, ret_val, i__1;
|
||||
|
||||
// Local variables
|
||||
int i__, j;
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Quick test for the common case where one corner is non-zero.
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
|
||||
// Function Body
|
||||
if (*m == 0) {
|
||||
ret_val = *m;
|
||||
} else if (a[*m + a_dim1] != 0. || a[*m + *n * a_dim1] != 0.) {
|
||||
ret_val = *m;
|
||||
} else {
|
||||
// Scan up each column tracking the last zero row seen.
|
||||
ret_val = 0;
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__ = *m;
|
||||
while(a[max(i__,1) + j * a_dim1] == 0. && i__ >= 1) {
|
||||
--i__;
|
||||
}
|
||||
ret_val = max(ret_val,i__);
|
||||
}
|
||||
}
|
||||
return ret_val;
|
||||
} // iladlr_
|
||||
|
||||
Vendored
+824
@@ -0,0 +1,824 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DLARFB applies a block reflector or its transpose to a general rectangular matrix.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLARFB + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfb.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfb.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfb.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
|
||||
// T, LDT, C, LDC, WORK, LDWORK )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// CHARACTER DIRECT, SIDE, STOREV, TRANS
|
||||
// INTEGER K, LDC, LDT, LDV, LDWORK, M, N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION C( LDC, * ), T( LDT, * ), V( LDV, * ),
|
||||
// $ WORK( LDWORK, * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLARFB applies a real block reflector H or its transpose H**T to a
|
||||
//> real m by n matrix C, from either the left or the right.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] SIDE
|
||||
//> \verbatim
|
||||
//> SIDE is CHARACTER*1
|
||||
//> = 'L': apply H or H**T from the Left
|
||||
//> = 'R': apply H or H**T from the Right
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TRANS
|
||||
//> \verbatim
|
||||
//> TRANS is CHARACTER*1
|
||||
//> = 'N': apply H (No transpose)
|
||||
//> = 'T': apply H**T (Transpose)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] DIRECT
|
||||
//> \verbatim
|
||||
//> DIRECT is CHARACTER*1
|
||||
//> Indicates how H is formed from a product of elementary
|
||||
//> reflectors
|
||||
//> = 'F': H = H(1) H(2) . . . H(k) (Forward)
|
||||
//> = 'B': H = H(k) . . . H(2) H(1) (Backward)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] STOREV
|
||||
//> \verbatim
|
||||
//> STOREV is CHARACTER*1
|
||||
//> Indicates how the vectors which define the elementary
|
||||
//> reflectors are stored:
|
||||
//> = 'C': Columnwise
|
||||
//> = 'R': Rowwise
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix C.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix C.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] K
|
||||
//> \verbatim
|
||||
//> K is INTEGER
|
||||
//> The order of the matrix T (= the number of elementary
|
||||
//> reflectors whose product defines the block reflector).
|
||||
//> If SIDE = 'L', M >= K >= 0;
|
||||
//> if SIDE = 'R', N >= K >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] V
|
||||
//> \verbatim
|
||||
//> V is DOUBLE PRECISION array, dimension
|
||||
//> (LDV,K) if STOREV = 'C'
|
||||
//> (LDV,M) if STOREV = 'R' and SIDE = 'L'
|
||||
//> (LDV,N) if STOREV = 'R' and SIDE = 'R'
|
||||
//> The matrix V. See Further Details.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDV
|
||||
//> \verbatim
|
||||
//> LDV is INTEGER
|
||||
//> The leading dimension of the array V.
|
||||
//> If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
|
||||
//> if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
|
||||
//> if STOREV = 'R', LDV >= K.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] T
|
||||
//> \verbatim
|
||||
//> T is DOUBLE PRECISION array, dimension (LDT,K)
|
||||
//> The triangular k by k matrix T in the representation of the
|
||||
//> block reflector.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDT
|
||||
//> \verbatim
|
||||
//> LDT is INTEGER
|
||||
//> The leading dimension of the array T. LDT >= K.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] C
|
||||
//> \verbatim
|
||||
//> C is DOUBLE PRECISION array, dimension (LDC,N)
|
||||
//> On entry, the m by n matrix C.
|
||||
//> On exit, C is overwritten by H*C or H**T*C or C*H or C*H**T.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDC
|
||||
//> \verbatim
|
||||
//> LDC is INTEGER
|
||||
//> The leading dimension of the array C. LDC >= max(1,M).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] WORK
|
||||
//> \verbatim
|
||||
//> WORK is DOUBLE PRECISION array, dimension (LDWORK,K)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDWORK
|
||||
//> \verbatim
|
||||
//> LDWORK is INTEGER
|
||||
//> The leading dimension of the array WORK.
|
||||
//> If SIDE = 'L', LDWORK >= max(1,N);
|
||||
//> if SIDE = 'R', LDWORK >= max(1,M).
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date June 2013
|
||||
//
|
||||
//> \ingroup doubleOTHERauxiliary
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> The shape of the matrix V and the storage of the vectors which define
|
||||
//> the H(i) is best illustrated by the following example with n = 5 and
|
||||
//> k = 3. The elements equal to 1 are not stored; the corresponding
|
||||
//> array elements are modified but restored on exit. The rest of the
|
||||
//> array is not used.
|
||||
//>
|
||||
//> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
|
||||
//>
|
||||
//> V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
|
||||
//> ( v1 1 ) ( 1 v2 v2 v2 )
|
||||
//> ( v1 v2 1 ) ( 1 v3 v3 )
|
||||
//> ( v1 v2 v3 )
|
||||
//> ( v1 v2 v3 )
|
||||
//>
|
||||
//> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
|
||||
//>
|
||||
//> V = ( v1 v2 v3 ) V = ( v1 v1 1 )
|
||||
//> ( v1 v2 v3 ) ( v2 v2 v2 1 )
|
||||
//> ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
|
||||
//> ( 1 v3 )
|
||||
//> ( 1 )
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dlarfb_(char *side, char *trans, char *direct, char *
|
||||
storev, int *m, int *n, int *k, double *v, int *ldv, double *t, int *
|
||||
ldt, double *c__, int *ldc, double *work, int *ldwork)
|
||||
{
|
||||
// Table of constant values
|
||||
int c__1 = 1;
|
||||
double c_b14 = 1.;
|
||||
double c_b25 = -1.;
|
||||
|
||||
// System generated locals
|
||||
int c_dim1, c_offset, t_dim1, t_offset, v_dim1, v_offset, work_dim1,
|
||||
work_offset, i__1, i__2;
|
||||
|
||||
// Local variables
|
||||
int i__, j;
|
||||
extern /* Subroutine */ int dgemm_(char *, char *, int *, int *, int *,
|
||||
double *, double *, int *, double *, int *, double *, double *,
|
||||
int *);
|
||||
extern int lsame_(char *, char *);
|
||||
extern /* Subroutine */ int dcopy_(int *, double *, int *, double *, int *
|
||||
), dtrmm_(char *, char *, char *, char *, int *, int *, double *,
|
||||
double *, int *, double *, int *);
|
||||
char transt[1+1]={'\0'};
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// June 2013
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Quick return if possible
|
||||
//
|
||||
// Parameter adjustments
|
||||
v_dim1 = *ldv;
|
||||
v_offset = 1 + v_dim1;
|
||||
v -= v_offset;
|
||||
t_dim1 = *ldt;
|
||||
t_offset = 1 + t_dim1;
|
||||
t -= t_offset;
|
||||
c_dim1 = *ldc;
|
||||
c_offset = 1 + c_dim1;
|
||||
c__ -= c_offset;
|
||||
work_dim1 = *ldwork;
|
||||
work_offset = 1 + work_dim1;
|
||||
work -= work_offset;
|
||||
|
||||
// Function Body
|
||||
if (*m <= 0 || *n <= 0) {
|
||||
return 0;
|
||||
}
|
||||
if (lsame_(trans, "N")) {
|
||||
*(unsigned char *)transt = 'T';
|
||||
} else {
|
||||
*(unsigned char *)transt = 'N';
|
||||
}
|
||||
if (lsame_(storev, "C")) {
|
||||
if (lsame_(direct, "F")) {
|
||||
//
|
||||
// Let V = ( V1 ) (first K rows)
|
||||
// ( V2 )
|
||||
// where V1 is unit lower triangular.
|
||||
//
|
||||
if (lsame_(side, "L")) {
|
||||
//
|
||||
// Form H * C or H**T * C where C = ( C1 )
|
||||
// ( C2 )
|
||||
//
|
||||
// W := C**T * V = (C1**T * V1 + C2**T * V2) (stored in WORK)
|
||||
//
|
||||
// W := C1**T
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
dcopy_(n, &c__[j + c_dim1], ldc, &work[j * work_dim1 + 1],
|
||||
&c__1);
|
||||
// L10:
|
||||
}
|
||||
//
|
||||
// W := W * V1
|
||||
//
|
||||
dtrmm_("Right", "Lower", "No transpose", "Unit", n, k, &c_b14,
|
||||
&v[v_offset], ldv, &work[work_offset], ldwork);
|
||||
if (*m > *k) {
|
||||
//
|
||||
// W := W + C2**T * V2
|
||||
//
|
||||
i__1 = *m - *k;
|
||||
dgemm_("Transpose", "No transpose", n, k, &i__1, &c_b14, &
|
||||
c__[*k + 1 + c_dim1], ldc, &v[*k + 1 + v_dim1],
|
||||
ldv, &c_b14, &work[work_offset], ldwork);
|
||||
}
|
||||
//
|
||||
// W := W * T**T or W * T
|
||||
//
|
||||
dtrmm_("Right", "Upper", transt, "Non-unit", n, k, &c_b14, &t[
|
||||
t_offset], ldt, &work[work_offset], ldwork);
|
||||
//
|
||||
// C := C - V * W**T
|
||||
//
|
||||
if (*m > *k) {
|
||||
//
|
||||
// C2 := C2 - V2 * W**T
|
||||
//
|
||||
i__1 = *m - *k;
|
||||
dgemm_("No transpose", "Transpose", &i__1, n, k, &c_b25, &
|
||||
v[*k + 1 + v_dim1], ldv, &work[work_offset],
|
||||
ldwork, &c_b14, &c__[*k + 1 + c_dim1], ldc);
|
||||
}
|
||||
//
|
||||
// W := W * V1**T
|
||||
//
|
||||
dtrmm_("Right", "Lower", "Transpose", "Unit", n, k, &c_b14, &
|
||||
v[v_offset], ldv, &work[work_offset], ldwork);
|
||||
//
|
||||
// C1 := C1 - W**T
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *n;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[j + i__ * c_dim1] -= work[i__ + j * work_dim1];
|
||||
// L20:
|
||||
}
|
||||
// L30:
|
||||
}
|
||||
} else if (lsame_(side, "R")) {
|
||||
//
|
||||
// Form C * H or C * H**T where C = ( C1 C2 )
|
||||
//
|
||||
// W := C * V = (C1*V1 + C2*V2) (stored in WORK)
|
||||
//
|
||||
// W := C1
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
dcopy_(m, &c__[j * c_dim1 + 1], &c__1, &work[j *
|
||||
work_dim1 + 1], &c__1);
|
||||
// L40:
|
||||
}
|
||||
//
|
||||
// W := W * V1
|
||||
//
|
||||
dtrmm_("Right", "Lower", "No transpose", "Unit", m, k, &c_b14,
|
||||
&v[v_offset], ldv, &work[work_offset], ldwork);
|
||||
if (*n > *k) {
|
||||
//
|
||||
// W := W + C2 * V2
|
||||
//
|
||||
i__1 = *n - *k;
|
||||
dgemm_("No transpose", "No transpose", m, k, &i__1, &
|
||||
c_b14, &c__[(*k + 1) * c_dim1 + 1], ldc, &v[*k +
|
||||
1 + v_dim1], ldv, &c_b14, &work[work_offset],
|
||||
ldwork);
|
||||
}
|
||||
//
|
||||
// W := W * T or W * T**T
|
||||
//
|
||||
dtrmm_("Right", "Upper", trans, "Non-unit", m, k, &c_b14, &t[
|
||||
t_offset], ldt, &work[work_offset], ldwork);
|
||||
//
|
||||
// C := C - W * V**T
|
||||
//
|
||||
if (*n > *k) {
|
||||
//
|
||||
// C2 := C2 - W * V2**T
|
||||
//
|
||||
i__1 = *n - *k;
|
||||
dgemm_("No transpose", "Transpose", m, &i__1, k, &c_b25, &
|
||||
work[work_offset], ldwork, &v[*k + 1 + v_dim1],
|
||||
ldv, &c_b14, &c__[(*k + 1) * c_dim1 + 1], ldc);
|
||||
}
|
||||
//
|
||||
// W := W * V1**T
|
||||
//
|
||||
dtrmm_("Right", "Lower", "Transpose", "Unit", m, k, &c_b14, &
|
||||
v[v_offset], ldv, &work[work_offset], ldwork);
|
||||
//
|
||||
// C1 := C1 - W
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] -= work[i__ + j * work_dim1];
|
||||
// L50:
|
||||
}
|
||||
// L60:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Let V = ( V1 )
|
||||
// ( V2 ) (last K rows)
|
||||
// where V2 is unit upper triangular.
|
||||
//
|
||||
if (lsame_(side, "L")) {
|
||||
//
|
||||
// Form H * C or H**T * C where C = ( C1 )
|
||||
// ( C2 )
|
||||
//
|
||||
// W := C**T * V = (C1**T * V1 + C2**T * V2) (stored in WORK)
|
||||
//
|
||||
// W := C2**T
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
dcopy_(n, &c__[*m - *k + j + c_dim1], ldc, &work[j *
|
||||
work_dim1 + 1], &c__1);
|
||||
// L70:
|
||||
}
|
||||
//
|
||||
// W := W * V2
|
||||
//
|
||||
dtrmm_("Right", "Upper", "No transpose", "Unit", n, k, &c_b14,
|
||||
&v[*m - *k + 1 + v_dim1], ldv, &work[work_offset],
|
||||
ldwork);
|
||||
if (*m > *k) {
|
||||
//
|
||||
// W := W + C1**T * V1
|
||||
//
|
||||
i__1 = *m - *k;
|
||||
dgemm_("Transpose", "No transpose", n, k, &i__1, &c_b14, &
|
||||
c__[c_offset], ldc, &v[v_offset], ldv, &c_b14, &
|
||||
work[work_offset], ldwork);
|
||||
}
|
||||
//
|
||||
// W := W * T**T or W * T
|
||||
//
|
||||
dtrmm_("Right", "Lower", transt, "Non-unit", n, k, &c_b14, &t[
|
||||
t_offset], ldt, &work[work_offset], ldwork);
|
||||
//
|
||||
// C := C - V * W**T
|
||||
//
|
||||
if (*m > *k) {
|
||||
//
|
||||
// C1 := C1 - V1 * W**T
|
||||
//
|
||||
i__1 = *m - *k;
|
||||
dgemm_("No transpose", "Transpose", &i__1, n, k, &c_b25, &
|
||||
v[v_offset], ldv, &work[work_offset], ldwork, &
|
||||
c_b14, &c__[c_offset], ldc);
|
||||
}
|
||||
//
|
||||
// W := W * V2**T
|
||||
//
|
||||
dtrmm_("Right", "Upper", "Transpose", "Unit", n, k, &c_b14, &
|
||||
v[*m - *k + 1 + v_dim1], ldv, &work[work_offset],
|
||||
ldwork);
|
||||
//
|
||||
// C2 := C2 - W**T
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *n;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[*m - *k + j + i__ * c_dim1] -= work[i__ + j *
|
||||
work_dim1];
|
||||
// L80:
|
||||
}
|
||||
// L90:
|
||||
}
|
||||
} else if (lsame_(side, "R")) {
|
||||
//
|
||||
// Form C * H or C * H**T where C = ( C1 C2 )
|
||||
//
|
||||
// W := C * V = (C1*V1 + C2*V2) (stored in WORK)
|
||||
//
|
||||
// W := C2
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
dcopy_(m, &c__[(*n - *k + j) * c_dim1 + 1], &c__1, &work[
|
||||
j * work_dim1 + 1], &c__1);
|
||||
// L100:
|
||||
}
|
||||
//
|
||||
// W := W * V2
|
||||
//
|
||||
dtrmm_("Right", "Upper", "No transpose", "Unit", m, k, &c_b14,
|
||||
&v[*n - *k + 1 + v_dim1], ldv, &work[work_offset],
|
||||
ldwork);
|
||||
if (*n > *k) {
|
||||
//
|
||||
// W := W + C1 * V1
|
||||
//
|
||||
i__1 = *n - *k;
|
||||
dgemm_("No transpose", "No transpose", m, k, &i__1, &
|
||||
c_b14, &c__[c_offset], ldc, &v[v_offset], ldv, &
|
||||
c_b14, &work[work_offset], ldwork);
|
||||
}
|
||||
//
|
||||
// W := W * T or W * T**T
|
||||
//
|
||||
dtrmm_("Right", "Lower", trans, "Non-unit", m, k, &c_b14, &t[
|
||||
t_offset], ldt, &work[work_offset], ldwork);
|
||||
//
|
||||
// C := C - W * V**T
|
||||
//
|
||||
if (*n > *k) {
|
||||
//
|
||||
// C1 := C1 - W * V1**T
|
||||
//
|
||||
i__1 = *n - *k;
|
||||
dgemm_("No transpose", "Transpose", m, &i__1, k, &c_b25, &
|
||||
work[work_offset], ldwork, &v[v_offset], ldv, &
|
||||
c_b14, &c__[c_offset], ldc);
|
||||
}
|
||||
//
|
||||
// W := W * V2**T
|
||||
//
|
||||
dtrmm_("Right", "Upper", "Transpose", "Unit", m, k, &c_b14, &
|
||||
v[*n - *k + 1 + v_dim1], ldv, &work[work_offset],
|
||||
ldwork);
|
||||
//
|
||||
// C2 := C2 - W
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + (*n - *k + j) * c_dim1] -= work[i__ + j *
|
||||
work_dim1];
|
||||
// L110:
|
||||
}
|
||||
// L120:
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (lsame_(storev, "R")) {
|
||||
if (lsame_(direct, "F")) {
|
||||
//
|
||||
// Let V = ( V1 V2 ) (V1: first K columns)
|
||||
// where V1 is unit upper triangular.
|
||||
//
|
||||
if (lsame_(side, "L")) {
|
||||
//
|
||||
// Form H * C or H**T * C where C = ( C1 )
|
||||
// ( C2 )
|
||||
//
|
||||
// W := C**T * V**T = (C1**T * V1**T + C2**T * V2**T) (stored in WORK)
|
||||
//
|
||||
// W := C1**T
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
dcopy_(n, &c__[j + c_dim1], ldc, &work[j * work_dim1 + 1],
|
||||
&c__1);
|
||||
// L130:
|
||||
}
|
||||
//
|
||||
// W := W * V1**T
|
||||
//
|
||||
dtrmm_("Right", "Upper", "Transpose", "Unit", n, k, &c_b14, &
|
||||
v[v_offset], ldv, &work[work_offset], ldwork);
|
||||
if (*m > *k) {
|
||||
//
|
||||
// W := W + C2**T * V2**T
|
||||
//
|
||||
i__1 = *m - *k;
|
||||
dgemm_("Transpose", "Transpose", n, k, &i__1, &c_b14, &
|
||||
c__[*k + 1 + c_dim1], ldc, &v[(*k + 1) * v_dim1 +
|
||||
1], ldv, &c_b14, &work[work_offset], ldwork);
|
||||
}
|
||||
//
|
||||
// W := W * T**T or W * T
|
||||
//
|
||||
dtrmm_("Right", "Upper", transt, "Non-unit", n, k, &c_b14, &t[
|
||||
t_offset], ldt, &work[work_offset], ldwork);
|
||||
//
|
||||
// C := C - V**T * W**T
|
||||
//
|
||||
if (*m > *k) {
|
||||
//
|
||||
// C2 := C2 - V2**T * W**T
|
||||
//
|
||||
i__1 = *m - *k;
|
||||
dgemm_("Transpose", "Transpose", &i__1, n, k, &c_b25, &v[(
|
||||
*k + 1) * v_dim1 + 1], ldv, &work[work_offset],
|
||||
ldwork, &c_b14, &c__[*k + 1 + c_dim1], ldc);
|
||||
}
|
||||
//
|
||||
// W := W * V1
|
||||
//
|
||||
dtrmm_("Right", "Upper", "No transpose", "Unit", n, k, &c_b14,
|
||||
&v[v_offset], ldv, &work[work_offset], ldwork);
|
||||
//
|
||||
// C1 := C1 - W**T
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *n;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[j + i__ * c_dim1] -= work[i__ + j * work_dim1];
|
||||
// L140:
|
||||
}
|
||||
// L150:
|
||||
}
|
||||
} else if (lsame_(side, "R")) {
|
||||
//
|
||||
// Form C * H or C * H**T where C = ( C1 C2 )
|
||||
//
|
||||
// W := C * V**T = (C1*V1**T + C2*V2**T) (stored in WORK)
|
||||
//
|
||||
// W := C1
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
dcopy_(m, &c__[j * c_dim1 + 1], &c__1, &work[j *
|
||||
work_dim1 + 1], &c__1);
|
||||
// L160:
|
||||
}
|
||||
//
|
||||
// W := W * V1**T
|
||||
//
|
||||
dtrmm_("Right", "Upper", "Transpose", "Unit", m, k, &c_b14, &
|
||||
v[v_offset], ldv, &work[work_offset], ldwork);
|
||||
if (*n > *k) {
|
||||
//
|
||||
// W := W + C2 * V2**T
|
||||
//
|
||||
i__1 = *n - *k;
|
||||
dgemm_("No transpose", "Transpose", m, k, &i__1, &c_b14, &
|
||||
c__[(*k + 1) * c_dim1 + 1], ldc, &v[(*k + 1) *
|
||||
v_dim1 + 1], ldv, &c_b14, &work[work_offset],
|
||||
ldwork);
|
||||
}
|
||||
//
|
||||
// W := W * T or W * T**T
|
||||
//
|
||||
dtrmm_("Right", "Upper", trans, "Non-unit", m, k, &c_b14, &t[
|
||||
t_offset], ldt, &work[work_offset], ldwork);
|
||||
//
|
||||
// C := C - W * V
|
||||
//
|
||||
if (*n > *k) {
|
||||
//
|
||||
// C2 := C2 - W * V2
|
||||
//
|
||||
i__1 = *n - *k;
|
||||
dgemm_("No transpose", "No transpose", m, &i__1, k, &
|
||||
c_b25, &work[work_offset], ldwork, &v[(*k + 1) *
|
||||
v_dim1 + 1], ldv, &c_b14, &c__[(*k + 1) * c_dim1
|
||||
+ 1], ldc);
|
||||
}
|
||||
//
|
||||
// W := W * V1
|
||||
//
|
||||
dtrmm_("Right", "Upper", "No transpose", "Unit", m, k, &c_b14,
|
||||
&v[v_offset], ldv, &work[work_offset], ldwork);
|
||||
//
|
||||
// C1 := C1 - W
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] -= work[i__ + j * work_dim1];
|
||||
// L170:
|
||||
}
|
||||
// L180:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Let V = ( V1 V2 ) (V2: last K columns)
|
||||
// where V2 is unit lower triangular.
|
||||
//
|
||||
if (lsame_(side, "L")) {
|
||||
//
|
||||
// Form H * C or H**T * C where C = ( C1 )
|
||||
// ( C2 )
|
||||
//
|
||||
// W := C**T * V**T = (C1**T * V1**T + C2**T * V2**T) (stored in WORK)
|
||||
//
|
||||
// W := C2**T
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
dcopy_(n, &c__[*m - *k + j + c_dim1], ldc, &work[j *
|
||||
work_dim1 + 1], &c__1);
|
||||
// L190:
|
||||
}
|
||||
//
|
||||
// W := W * V2**T
|
||||
//
|
||||
dtrmm_("Right", "Lower", "Transpose", "Unit", n, k, &c_b14, &
|
||||
v[(*m - *k + 1) * v_dim1 + 1], ldv, &work[work_offset]
|
||||
, ldwork);
|
||||
if (*m > *k) {
|
||||
//
|
||||
// W := W + C1**T * V1**T
|
||||
//
|
||||
i__1 = *m - *k;
|
||||
dgemm_("Transpose", "Transpose", n, k, &i__1, &c_b14, &
|
||||
c__[c_offset], ldc, &v[v_offset], ldv, &c_b14, &
|
||||
work[work_offset], ldwork);
|
||||
}
|
||||
//
|
||||
// W := W * T**T or W * T
|
||||
//
|
||||
dtrmm_("Right", "Lower", transt, "Non-unit", n, k, &c_b14, &t[
|
||||
t_offset], ldt, &work[work_offset], ldwork);
|
||||
//
|
||||
// C := C - V**T * W**T
|
||||
//
|
||||
if (*m > *k) {
|
||||
//
|
||||
// C1 := C1 - V1**T * W**T
|
||||
//
|
||||
i__1 = *m - *k;
|
||||
dgemm_("Transpose", "Transpose", &i__1, n, k, &c_b25, &v[
|
||||
v_offset], ldv, &work[work_offset], ldwork, &
|
||||
c_b14, &c__[c_offset], ldc);
|
||||
}
|
||||
//
|
||||
// W := W * V2
|
||||
//
|
||||
dtrmm_("Right", "Lower", "No transpose", "Unit", n, k, &c_b14,
|
||||
&v[(*m - *k + 1) * v_dim1 + 1], ldv, &work[
|
||||
work_offset], ldwork);
|
||||
//
|
||||
// C2 := C2 - W**T
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *n;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[*m - *k + j + i__ * c_dim1] -= work[i__ + j *
|
||||
work_dim1];
|
||||
// L200:
|
||||
}
|
||||
// L210:
|
||||
}
|
||||
} else if (lsame_(side, "R")) {
|
||||
//
|
||||
// Form C * H or C * H' where C = ( C1 C2 )
|
||||
//
|
||||
// W := C * V**T = (C1*V1**T + C2*V2**T) (stored in WORK)
|
||||
//
|
||||
// W := C2
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
dcopy_(m, &c__[(*n - *k + j) * c_dim1 + 1], &c__1, &work[
|
||||
j * work_dim1 + 1], &c__1);
|
||||
// L220:
|
||||
}
|
||||
//
|
||||
// W := W * V2**T
|
||||
//
|
||||
dtrmm_("Right", "Lower", "Transpose", "Unit", m, k, &c_b14, &
|
||||
v[(*n - *k + 1) * v_dim1 + 1], ldv, &work[work_offset]
|
||||
, ldwork);
|
||||
if (*n > *k) {
|
||||
//
|
||||
// W := W + C1 * V1**T
|
||||
//
|
||||
i__1 = *n - *k;
|
||||
dgemm_("No transpose", "Transpose", m, k, &i__1, &c_b14, &
|
||||
c__[c_offset], ldc, &v[v_offset], ldv, &c_b14, &
|
||||
work[work_offset], ldwork);
|
||||
}
|
||||
//
|
||||
// W := W * T or W * T**T
|
||||
//
|
||||
dtrmm_("Right", "Lower", trans, "Non-unit", m, k, &c_b14, &t[
|
||||
t_offset], ldt, &work[work_offset], ldwork);
|
||||
//
|
||||
// C := C - W * V
|
||||
//
|
||||
if (*n > *k) {
|
||||
//
|
||||
// C1 := C1 - W * V1
|
||||
//
|
||||
i__1 = *n - *k;
|
||||
dgemm_("No transpose", "No transpose", m, &i__1, k, &
|
||||
c_b25, &work[work_offset], ldwork, &v[v_offset],
|
||||
ldv, &c_b14, &c__[c_offset], ldc);
|
||||
}
|
||||
//
|
||||
// W := W * V2
|
||||
//
|
||||
dtrmm_("Right", "Lower", "No transpose", "Unit", m, k, &c_b14,
|
||||
&v[(*n - *k + 1) * v_dim1 + 1], ldv, &work[
|
||||
work_offset], ldwork);
|
||||
//
|
||||
// C1 := C1 - W
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + (*n - *k + j) * c_dim1] -= work[i__ + j *
|
||||
work_dim1];
|
||||
// L230:
|
||||
}
|
||||
// L240:
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DLARFB
|
||||
//
|
||||
} // dlarfb_
|
||||
|
||||
Vendored
+216
@@ -0,0 +1,216 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DLARFG generates an elementary reflector (Householder matrix).
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLARFG + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfg.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfg.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfg.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// INTEGER INCX, N
|
||||
// DOUBLE PRECISION ALPHA, TAU
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION X( * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLARFG generates a real elementary reflector H of order n, such
|
||||
//> that
|
||||
//>
|
||||
//> H * ( alpha ) = ( beta ), H**T * H = I.
|
||||
//> ( x ) ( 0 )
|
||||
//>
|
||||
//> where alpha and beta are scalars, and x is an (n-1)-element real
|
||||
//> vector. H is represented in the form
|
||||
//>
|
||||
//> H = I - tau * ( 1 ) * ( 1 v**T ) ,
|
||||
//> ( v )
|
||||
//>
|
||||
//> where tau is a real scalar and v is a real (n-1)-element
|
||||
//> vector.
|
||||
//>
|
||||
//> If the elements of x are all zero, then tau = 0 and H is taken to be
|
||||
//> the unit matrix.
|
||||
//>
|
||||
//> Otherwise 1 <= tau <= 2.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The order of the elementary reflector.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] ALPHA
|
||||
//> \verbatim
|
||||
//> ALPHA is DOUBLE PRECISION
|
||||
//> On entry, the value alpha.
|
||||
//> On exit, it is overwritten with the value beta.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] X
|
||||
//> \verbatim
|
||||
//> X is DOUBLE PRECISION array, dimension
|
||||
//> (1+(N-2)*abs(INCX))
|
||||
//> On entry, the vector x.
|
||||
//> On exit, it is overwritten with the vector v.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCX
|
||||
//> \verbatim
|
||||
//> INCX is INTEGER
|
||||
//> The increment between elements of X. INCX > 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] TAU
|
||||
//> \verbatim
|
||||
//> TAU is DOUBLE PRECISION
|
||||
//> The value tau.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date November 2017
|
||||
//
|
||||
//> \ingroup doubleOTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dlarfg_(int *n, double *alpha, double *x, int *incx,
|
||||
double *tau)
|
||||
{
|
||||
// System generated locals
|
||||
int i__1;
|
||||
double d__1;
|
||||
|
||||
// Local variables
|
||||
int j, knt;
|
||||
double beta;
|
||||
extern double dnrm2_(int *, double *, int *);
|
||||
extern /* Subroutine */ int dscal_(int *, double *, double *, int *);
|
||||
double xnorm;
|
||||
extern double dlapy2_(double *, double *), dlamch_(char *);
|
||||
double safmin, rsafmn;
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.8.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// November 2017
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Parameter adjustments
|
||||
--x;
|
||||
|
||||
// Function Body
|
||||
if (*n <= 1) {
|
||||
*tau = 0.;
|
||||
return 0;
|
||||
}
|
||||
i__1 = *n - 1;
|
||||
xnorm = dnrm2_(&i__1, &x[1], incx);
|
||||
if (xnorm == 0.) {
|
||||
//
|
||||
// H = I
|
||||
//
|
||||
*tau = 0.;
|
||||
} else {
|
||||
//
|
||||
// general case
|
||||
//
|
||||
d__1 = dlapy2_(alpha, &xnorm);
|
||||
beta = -d_sign(&d__1, alpha);
|
||||
safmin = dlamch_("S") / dlamch_("E");
|
||||
knt = 0;
|
||||
if (abs(beta) < safmin) {
|
||||
//
|
||||
// XNORM, BETA may be inaccurate; scale X and recompute them
|
||||
//
|
||||
rsafmn = 1. / safmin;
|
||||
L10:
|
||||
++knt;
|
||||
i__1 = *n - 1;
|
||||
dscal_(&i__1, &rsafmn, &x[1], incx);
|
||||
beta *= rsafmn;
|
||||
*alpha *= rsafmn;
|
||||
if (abs(beta) < safmin && knt < 20) {
|
||||
goto L10;
|
||||
}
|
||||
//
|
||||
// New BETA is at most 1, at least SAFMIN
|
||||
//
|
||||
i__1 = *n - 1;
|
||||
xnorm = dnrm2_(&i__1, &x[1], incx);
|
||||
d__1 = dlapy2_(alpha, &xnorm);
|
||||
beta = -d_sign(&d__1, alpha);
|
||||
}
|
||||
*tau = (beta - *alpha) / beta;
|
||||
i__1 = *n - 1;
|
||||
d__1 = 1. / (*alpha - beta);
|
||||
dscal_(&i__1, &d__1, &x[1], incx);
|
||||
//
|
||||
// If ALPHA is subnormal, it may lose relative accuracy
|
||||
//
|
||||
i__1 = knt;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
beta *= safmin;
|
||||
// L20:
|
||||
}
|
||||
*alpha = beta;
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DLARFG
|
||||
//
|
||||
} // dlarfg_
|
||||
|
||||
Vendored
+389
@@ -0,0 +1,389 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DLARFT forms the triangular factor T of a block reflector H = I - vtvH
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLARFT + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarft.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarft.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarft.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// CHARACTER DIRECT, STOREV
|
||||
// INTEGER K, LDT, LDV, N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLARFT forms the triangular factor T of a real block reflector H
|
||||
//> of order n, which is defined as a product of k elementary reflectors.
|
||||
//>
|
||||
//> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
|
||||
//>
|
||||
//> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
|
||||
//>
|
||||
//> If STOREV = 'C', the vector which defines the elementary reflector
|
||||
//> H(i) is stored in the i-th column of the array V, and
|
||||
//>
|
||||
//> H = I - V * T * V**T
|
||||
//>
|
||||
//> If STOREV = 'R', the vector which defines the elementary reflector
|
||||
//> H(i) is stored in the i-th row of the array V, and
|
||||
//>
|
||||
//> H = I - V**T * T * V
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] DIRECT
|
||||
//> \verbatim
|
||||
//> DIRECT is CHARACTER*1
|
||||
//> Specifies the order in which the elementary reflectors are
|
||||
//> multiplied to form the block reflector:
|
||||
//> = 'F': H = H(1) H(2) . . . H(k) (Forward)
|
||||
//> = 'B': H = H(k) . . . H(2) H(1) (Backward)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] STOREV
|
||||
//> \verbatim
|
||||
//> STOREV is CHARACTER*1
|
||||
//> Specifies how the vectors which define the elementary
|
||||
//> reflectors are stored (see also Further Details):
|
||||
//> = 'C': columnwise
|
||||
//> = 'R': rowwise
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The order of the block reflector H. N >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] K
|
||||
//> \verbatim
|
||||
//> K is INTEGER
|
||||
//> The order of the triangular factor T (= the number of
|
||||
//> elementary reflectors). K >= 1.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] V
|
||||
//> \verbatim
|
||||
//> V is DOUBLE PRECISION array, dimension
|
||||
//> (LDV,K) if STOREV = 'C'
|
||||
//> (LDV,N) if STOREV = 'R'
|
||||
//> The matrix V. See further details.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDV
|
||||
//> \verbatim
|
||||
//> LDV is INTEGER
|
||||
//> The leading dimension of the array V.
|
||||
//> If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TAU
|
||||
//> \verbatim
|
||||
//> TAU is DOUBLE PRECISION array, dimension (K)
|
||||
//> TAU(i) must contain the scalar factor of the elementary
|
||||
//> reflector H(i).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] T
|
||||
//> \verbatim
|
||||
//> T is DOUBLE PRECISION array, dimension (LDT,K)
|
||||
//> The k by k triangular factor T of the block reflector.
|
||||
//> If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
|
||||
//> lower triangular. The rest of the array is not used.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDT
|
||||
//> \verbatim
|
||||
//> LDT is INTEGER
|
||||
//> The leading dimension of the array T. LDT >= K.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup doubleOTHERauxiliary
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> The shape of the matrix V and the storage of the vectors which define
|
||||
//> the H(i) is best illustrated by the following example with n = 5 and
|
||||
//> k = 3. The elements equal to 1 are not stored.
|
||||
//>
|
||||
//> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
|
||||
//>
|
||||
//> V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
|
||||
//> ( v1 1 ) ( 1 v2 v2 v2 )
|
||||
//> ( v1 v2 1 ) ( 1 v3 v3 )
|
||||
//> ( v1 v2 v3 )
|
||||
//> ( v1 v2 v3 )
|
||||
//>
|
||||
//> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
|
||||
//>
|
||||
//> V = ( v1 v2 v3 ) V = ( v1 v1 1 )
|
||||
//> ( v1 v2 v3 ) ( v2 v2 v2 1 )
|
||||
//> ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
|
||||
//> ( 1 v3 )
|
||||
//> ( 1 )
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dlarft_(char *direct, char *storev, int *n, int *k,
|
||||
double *v, int *ldv, double *tau, double *t, int *ldt)
|
||||
{
|
||||
// Table of constant values
|
||||
int c__1 = 1;
|
||||
double c_b7 = 1.;
|
||||
|
||||
// System generated locals
|
||||
int t_dim1, t_offset, v_dim1, v_offset, i__1, i__2, i__3;
|
||||
double d__1;
|
||||
|
||||
// Local variables
|
||||
int i__, j, prevlastv;
|
||||
extern int lsame_(char *, char *);
|
||||
extern /* Subroutine */ int dgemv_(char *, int *, int *, double *, double
|
||||
*, int *, double *, int *, double *, double *, int *);
|
||||
int lastv;
|
||||
extern /* Subroutine */ int dtrmv_(char *, char *, char *, int *, double *
|
||||
, int *, double *, int *);
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Quick return if possible
|
||||
//
|
||||
// Parameter adjustments
|
||||
v_dim1 = *ldv;
|
||||
v_offset = 1 + v_dim1;
|
||||
v -= v_offset;
|
||||
--tau;
|
||||
t_dim1 = *ldt;
|
||||
t_offset = 1 + t_dim1;
|
||||
t -= t_offset;
|
||||
|
||||
// Function Body
|
||||
if (*n == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (lsame_(direct, "F")) {
|
||||
prevlastv = *n;
|
||||
i__1 = *k;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
prevlastv = max(i__,prevlastv);
|
||||
if (tau[i__] == 0.) {
|
||||
//
|
||||
// H(i) = I
|
||||
//
|
||||
i__2 = i__;
|
||||
for (j = 1; j <= i__2; ++j) {
|
||||
t[j + i__ * t_dim1] = 0.;
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// general case
|
||||
//
|
||||
if (lsame_(storev, "C")) {
|
||||
// Skip any trailing zeros.
|
||||
i__2 = i__ + 1;
|
||||
for (lastv = *n; lastv >= i__2; --lastv) {
|
||||
if (v[lastv + i__ * v_dim1] != 0.) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
i__2 = i__ - 1;
|
||||
for (j = 1; j <= i__2; ++j) {
|
||||
t[j + i__ * t_dim1] = -tau[i__] * v[i__ + j * v_dim1];
|
||||
}
|
||||
j = min(lastv,prevlastv);
|
||||
//
|
||||
// T(1:i-1,i) := - tau(i) * V(i:j,1:i-1)**T * V(i:j,i)
|
||||
//
|
||||
i__2 = j - i__;
|
||||
i__3 = i__ - 1;
|
||||
d__1 = -tau[i__];
|
||||
dgemv_("Transpose", &i__2, &i__3, &d__1, &v[i__ + 1 +
|
||||
v_dim1], ldv, &v[i__ + 1 + i__ * v_dim1], &c__1, &
|
||||
c_b7, &t[i__ * t_dim1 + 1], &c__1);
|
||||
} else {
|
||||
// Skip any trailing zeros.
|
||||
i__2 = i__ + 1;
|
||||
for (lastv = *n; lastv >= i__2; --lastv) {
|
||||
if (v[i__ + lastv * v_dim1] != 0.) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
i__2 = i__ - 1;
|
||||
for (j = 1; j <= i__2; ++j) {
|
||||
t[j + i__ * t_dim1] = -tau[i__] * v[j + i__ * v_dim1];
|
||||
}
|
||||
j = min(lastv,prevlastv);
|
||||
//
|
||||
// T(1:i-1,i) := - tau(i) * V(1:i-1,i:j) * V(i,i:j)**T
|
||||
//
|
||||
i__2 = i__ - 1;
|
||||
i__3 = j - i__;
|
||||
d__1 = -tau[i__];
|
||||
dgemv_("No transpose", &i__2, &i__3, &d__1, &v[(i__ + 1) *
|
||||
v_dim1 + 1], ldv, &v[i__ + (i__ + 1) * v_dim1],
|
||||
ldv, &c_b7, &t[i__ * t_dim1 + 1], &c__1);
|
||||
}
|
||||
//
|
||||
// T(1:i-1,i) := T(1:i-1,1:i-1) * T(1:i-1,i)
|
||||
//
|
||||
i__2 = i__ - 1;
|
||||
dtrmv_("Upper", "No transpose", "Non-unit", &i__2, &t[
|
||||
t_offset], ldt, &t[i__ * t_dim1 + 1], &c__1);
|
||||
t[i__ + i__ * t_dim1] = tau[i__];
|
||||
if (i__ > 1) {
|
||||
prevlastv = max(prevlastv,lastv);
|
||||
} else {
|
||||
prevlastv = lastv;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
prevlastv = 1;
|
||||
for (i__ = *k; i__ >= 1; --i__) {
|
||||
if (tau[i__] == 0.) {
|
||||
//
|
||||
// H(i) = I
|
||||
//
|
||||
i__1 = *k;
|
||||
for (j = i__; j <= i__1; ++j) {
|
||||
t[j + i__ * t_dim1] = 0.;
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// general case
|
||||
//
|
||||
if (i__ < *k) {
|
||||
if (lsame_(storev, "C")) {
|
||||
// Skip any leading zeros.
|
||||
i__1 = i__ - 1;
|
||||
for (lastv = 1; lastv <= i__1; ++lastv) {
|
||||
if (v[lastv + i__ * v_dim1] != 0.) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
i__1 = *k;
|
||||
for (j = i__ + 1; j <= i__1; ++j) {
|
||||
t[j + i__ * t_dim1] = -tau[i__] * v[*n - *k + i__
|
||||
+ j * v_dim1];
|
||||
}
|
||||
j = max(lastv,prevlastv);
|
||||
//
|
||||
// T(i+1:k,i) = -tau(i) * V(j:n-k+i,i+1:k)**T * V(j:n-k+i,i)
|
||||
//
|
||||
i__1 = *n - *k + i__ - j;
|
||||
i__2 = *k - i__;
|
||||
d__1 = -tau[i__];
|
||||
dgemv_("Transpose", &i__1, &i__2, &d__1, &v[j + (i__
|
||||
+ 1) * v_dim1], ldv, &v[j + i__ * v_dim1], &
|
||||
c__1, &c_b7, &t[i__ + 1 + i__ * t_dim1], &
|
||||
c__1);
|
||||
} else {
|
||||
// Skip any leading zeros.
|
||||
i__1 = i__ - 1;
|
||||
for (lastv = 1; lastv <= i__1; ++lastv) {
|
||||
if (v[i__ + lastv * v_dim1] != 0.) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
i__1 = *k;
|
||||
for (j = i__ + 1; j <= i__1; ++j) {
|
||||
t[j + i__ * t_dim1] = -tau[i__] * v[j + (*n - *k
|
||||
+ i__) * v_dim1];
|
||||
}
|
||||
j = max(lastv,prevlastv);
|
||||
//
|
||||
// T(i+1:k,i) = -tau(i) * V(i+1:k,j:n-k+i) * V(i,j:n-k+i)**T
|
||||
//
|
||||
i__1 = *k - i__;
|
||||
i__2 = *n - *k + i__ - j;
|
||||
d__1 = -tau[i__];
|
||||
dgemv_("No transpose", &i__1, &i__2, &d__1, &v[i__ +
|
||||
1 + j * v_dim1], ldv, &v[i__ + j * v_dim1],
|
||||
ldv, &c_b7, &t[i__ + 1 + i__ * t_dim1], &c__1)
|
||||
;
|
||||
}
|
||||
//
|
||||
// T(i+1:k,i) := T(i+1:k,i+1:k) * T(i+1:k,i)
|
||||
//
|
||||
i__1 = *k - i__;
|
||||
dtrmv_("Lower", "No transpose", "Non-unit", &i__1, &t[i__
|
||||
+ 1 + (i__ + 1) * t_dim1], ldt, &t[i__ + 1 + i__ *
|
||||
t_dim1], &c__1);
|
||||
if (i__ > 1) {
|
||||
prevlastv = min(prevlastv,lastv);
|
||||
} else {
|
||||
prevlastv = lastv;
|
||||
}
|
||||
}
|
||||
t[i__ + i__ * t_dim1] = tau[i__];
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DLARFT
|
||||
//
|
||||
} // dlarft_
|
||||
|
||||
Vendored
+236
@@ -0,0 +1,236 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DLARTG generates a plane rotation with real cosine and real sine.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLARTG + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlartg.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlartg.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlartg.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DLARTG( F, G, CS, SN, R )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// DOUBLE PRECISION CS, F, G, R, SN
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLARTG generate a plane rotation so that
|
||||
//>
|
||||
//> [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
|
||||
//> [ -SN CS ] [ G ] [ 0 ]
|
||||
//>
|
||||
//> This is a slower, more accurate version of the BLAS1 routine DROTG,
|
||||
//> with the following other differences:
|
||||
//> F and G are unchanged on return.
|
||||
//> If G=0, then CS=1 and SN=0.
|
||||
//> If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
|
||||
//> floating point operations (saves work in DBDSQR when
|
||||
//> there are zeros on the diagonal).
|
||||
//>
|
||||
//> If F exceeds G in magnitude, CS will be positive.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] F
|
||||
//> \verbatim
|
||||
//> F is DOUBLE PRECISION
|
||||
//> The first component of vector to be rotated.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] G
|
||||
//> \verbatim
|
||||
//> G is DOUBLE PRECISION
|
||||
//> The second component of vector to be rotated.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] CS
|
||||
//> \verbatim
|
||||
//> CS is DOUBLE PRECISION
|
||||
//> The cosine of the rotation.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] SN
|
||||
//> \verbatim
|
||||
//> SN is DOUBLE PRECISION
|
||||
//> The sine of the rotation.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] R
|
||||
//> \verbatim
|
||||
//> R is DOUBLE PRECISION
|
||||
//> The nonzero component of the rotated vector.
|
||||
//>
|
||||
//> This version has a few statements commented out for thread safety
|
||||
//> (machine parameters are computed on each entry). 10 feb 03, SJH.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup OTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dlartg_(double *f, double *g, double *cs, double *sn,
|
||||
double *r__)
|
||||
{
|
||||
// System generated locals
|
||||
int i__1;
|
||||
double d__1, d__2;
|
||||
|
||||
// Local variables
|
||||
int i__;
|
||||
double f1, g1, eps, scale;
|
||||
int count;
|
||||
double safmn2, safmx2;
|
||||
extern double dlamch_(char *);
|
||||
double safmin;
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// LOGICAL FIRST
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Save statement ..
|
||||
// SAVE FIRST, SAFMX2, SAFMIN, SAFMN2
|
||||
// ..
|
||||
// .. Data statements ..
|
||||
// DATA FIRST / .TRUE. /
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// IF( FIRST ) THEN
|
||||
safmin = dlamch_("S");
|
||||
eps = dlamch_("E");
|
||||
d__1 = dlamch_("B");
|
||||
i__1 = (int) (log(safmin / eps) / log(dlamch_("B")) / 2.);
|
||||
safmn2 = pow_di(&d__1, &i__1);
|
||||
safmx2 = 1. / safmn2;
|
||||
// FIRST = .FALSE.
|
||||
// END IF
|
||||
if (*g == 0.) {
|
||||
*cs = 1.;
|
||||
*sn = 0.;
|
||||
*r__ = *f;
|
||||
} else if (*f == 0.) {
|
||||
*cs = 0.;
|
||||
*sn = 1.;
|
||||
*r__ = *g;
|
||||
} else {
|
||||
f1 = *f;
|
||||
g1 = *g;
|
||||
// Computing MAX
|
||||
d__1 = abs(f1), d__2 = abs(g1);
|
||||
scale = max(d__1,d__2);
|
||||
if (scale >= safmx2) {
|
||||
count = 0;
|
||||
L10:
|
||||
++count;
|
||||
f1 *= safmn2;
|
||||
g1 *= safmn2;
|
||||
// Computing MAX
|
||||
d__1 = abs(f1), d__2 = abs(g1);
|
||||
scale = max(d__1,d__2);
|
||||
if (scale >= safmx2) {
|
||||
goto L10;
|
||||
}
|
||||
// Computing 2nd power
|
||||
d__1 = f1;
|
||||
// Computing 2nd power
|
||||
d__2 = g1;
|
||||
*r__ = sqrt(d__1 * d__1 + d__2 * d__2);
|
||||
*cs = f1 / *r__;
|
||||
*sn = g1 / *r__;
|
||||
i__1 = count;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
*r__ *= safmx2;
|
||||
// L20:
|
||||
}
|
||||
} else if (scale <= safmn2) {
|
||||
count = 0;
|
||||
L30:
|
||||
++count;
|
||||
f1 *= safmx2;
|
||||
g1 *= safmx2;
|
||||
// Computing MAX
|
||||
d__1 = abs(f1), d__2 = abs(g1);
|
||||
scale = max(d__1,d__2);
|
||||
if (scale <= safmn2) {
|
||||
goto L30;
|
||||
}
|
||||
// Computing 2nd power
|
||||
d__1 = f1;
|
||||
// Computing 2nd power
|
||||
d__2 = g1;
|
||||
*r__ = sqrt(d__1 * d__1 + d__2 * d__2);
|
||||
*cs = f1 / *r__;
|
||||
*sn = g1 / *r__;
|
||||
i__1 = count;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
*r__ *= safmn2;
|
||||
// L40:
|
||||
}
|
||||
} else {
|
||||
// Computing 2nd power
|
||||
d__1 = f1;
|
||||
// Computing 2nd power
|
||||
d__2 = g1;
|
||||
*r__ = sqrt(d__1 * d__1 + d__2 * d__2);
|
||||
*cs = f1 / *r__;
|
||||
*sn = g1 / *r__;
|
||||
}
|
||||
if (abs(*f) > abs(*g) && *cs < 0.) {
|
||||
*cs = -(*cs);
|
||||
*sn = -(*sn);
|
||||
*r__ = -(*r__);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DLARTG
|
||||
//
|
||||
} // dlartg_
|
||||
|
||||
Vendored
+413
@@ -0,0 +1,413 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLASCL + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlascl.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlascl.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlascl.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// CHARACTER TYPE
|
||||
// INTEGER INFO, KL, KU, LDA, M, N
|
||||
// DOUBLE PRECISION CFROM, CTO
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A( LDA, * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLASCL multiplies the M by N real matrix A by the real scalar
|
||||
//> CTO/CFROM. This is done without over/underflow as long as the final
|
||||
//> result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
|
||||
//> A may be full, upper triangular, lower triangular, upper Hessenberg,
|
||||
//> or banded.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] TYPE
|
||||
//> \verbatim
|
||||
//> TYPE is CHARACTER*1
|
||||
//> TYPE indices the storage type of the input matrix.
|
||||
//> = 'G': A is a full matrix.
|
||||
//> = 'L': A is a lower triangular matrix.
|
||||
//> = 'U': A is an upper triangular matrix.
|
||||
//> = 'H': A is an upper Hessenberg matrix.
|
||||
//> = 'B': A is a symmetric band matrix with lower bandwidth KL
|
||||
//> and upper bandwidth KU and with the only the lower
|
||||
//> half stored.
|
||||
//> = 'Q': A is a symmetric band matrix with lower bandwidth KL
|
||||
//> and upper bandwidth KU and with the only the upper
|
||||
//> half stored.
|
||||
//> = 'Z': A is a band matrix with lower bandwidth KL and upper
|
||||
//> bandwidth KU. See DGBTRF for storage details.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] KL
|
||||
//> \verbatim
|
||||
//> KL is INTEGER
|
||||
//> The lower bandwidth of A. Referenced only if TYPE = 'B',
|
||||
//> 'Q' or 'Z'.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] KU
|
||||
//> \verbatim
|
||||
//> KU is INTEGER
|
||||
//> The upper bandwidth of A. Referenced only if TYPE = 'B',
|
||||
//> 'Q' or 'Z'.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] CFROM
|
||||
//> \verbatim
|
||||
//> CFROM is DOUBLE PRECISION
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] CTO
|
||||
//> \verbatim
|
||||
//> CTO is DOUBLE PRECISION
|
||||
//>
|
||||
//> The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
|
||||
//> without over/underflow if the final result CTO*A(I,J)/CFROM
|
||||
//> can be represented without over/underflow. CFROM must be
|
||||
//> nonzero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix A. M >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix A. N >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension (LDA,N)
|
||||
//> The matrix to be multiplied by CTO/CFROM. See TYPE for the
|
||||
//> storage type.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> The leading dimension of the array A.
|
||||
//> If TYPE = 'G', 'L', 'U', 'H', LDA >= max(1,M);
|
||||
//> TYPE = 'B', LDA >= KL+1;
|
||||
//> TYPE = 'Q', LDA >= KU+1;
|
||||
//> TYPE = 'Z', LDA >= 2*KL+KU+1.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] INFO
|
||||
//> \verbatim
|
||||
//> INFO is INTEGER
|
||||
//> 0 - successful exit
|
||||
//> <0 - if INFO = -i, the i-th argument had an illegal value.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date June 2016
|
||||
//
|
||||
//> \ingroup OTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dlascl_(char *type__, int *kl, int *ku, double *cfrom,
|
||||
double *cto, int *m, int *n, double *a, int *lda, int *info)
|
||||
{
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
|
||||
|
||||
// Local variables
|
||||
int i__, j, k1, k2, k3, k4;
|
||||
double mul, cto1;
|
||||
int done;
|
||||
double ctoc;
|
||||
extern int lsame_(char *, char *);
|
||||
int itype;
|
||||
double cfrom1;
|
||||
extern double dlamch_(char *);
|
||||
double cfromc;
|
||||
extern int disnan_(double *);
|
||||
extern /* Subroutine */ int xerbla_(char *, int *);
|
||||
double bignum, smlnum;
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// June 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Test the input arguments
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
|
||||
// Function Body
|
||||
*info = 0;
|
||||
if (lsame_(type__, "G")) {
|
||||
itype = 0;
|
||||
} else if (lsame_(type__, "L")) {
|
||||
itype = 1;
|
||||
} else if (lsame_(type__, "U")) {
|
||||
itype = 2;
|
||||
} else if (lsame_(type__, "H")) {
|
||||
itype = 3;
|
||||
} else if (lsame_(type__, "B")) {
|
||||
itype = 4;
|
||||
} else if (lsame_(type__, "Q")) {
|
||||
itype = 5;
|
||||
} else if (lsame_(type__, "Z")) {
|
||||
itype = 6;
|
||||
} else {
|
||||
itype = -1;
|
||||
}
|
||||
if (itype == -1) {
|
||||
*info = -1;
|
||||
} else if (*cfrom == 0. || disnan_(cfrom)) {
|
||||
*info = -4;
|
||||
} else if (disnan_(cto)) {
|
||||
*info = -5;
|
||||
} else if (*m < 0) {
|
||||
*info = -6;
|
||||
} else if (*n < 0 || itype == 4 && *n != *m || itype == 5 && *n != *m) {
|
||||
*info = -7;
|
||||
} else if (itype <= 3 && *lda < max(1,*m)) {
|
||||
*info = -9;
|
||||
} else if (itype >= 4) {
|
||||
// Computing MAX
|
||||
i__1 = *m - 1;
|
||||
if (*kl < 0 || *kl > max(i__1,0)) {
|
||||
*info = -2;
|
||||
} else /* if(complicated condition) */ {
|
||||
// Computing MAX
|
||||
i__1 = *n - 1;
|
||||
if (*ku < 0 || *ku > max(i__1,0) || (itype == 4 || itype == 5) &&
|
||||
*kl != *ku) {
|
||||
*info = -3;
|
||||
} else if (itype == 4 && *lda < *kl + 1 || itype == 5 && *lda < *
|
||||
ku + 1 || itype == 6 && *lda < (*kl << 1) + *ku + 1) {
|
||||
*info = -9;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (*info != 0) {
|
||||
i__1 = -(*info);
|
||||
xerbla_("DLASCL", &i__1);
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible
|
||||
//
|
||||
if (*n == 0 || *m == 0) {
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Get machine parameters
|
||||
//
|
||||
smlnum = dlamch_("S");
|
||||
bignum = 1. / smlnum;
|
||||
cfromc = *cfrom;
|
||||
ctoc = *cto;
|
||||
L10:
|
||||
cfrom1 = cfromc * smlnum;
|
||||
if (cfrom1 == cfromc) {
|
||||
// CFROMC is an inf. Multiply by a correctly signed zero for
|
||||
// finite CTOC, or a NaN if CTOC is infinite.
|
||||
mul = ctoc / cfromc;
|
||||
done = TRUE_;
|
||||
cto1 = ctoc;
|
||||
} else {
|
||||
cto1 = ctoc / bignum;
|
||||
if (cto1 == ctoc) {
|
||||
// CTOC is either 0 or an inf. In both cases, CTOC itself
|
||||
// serves as the correct multiplication factor.
|
||||
mul = ctoc;
|
||||
done = TRUE_;
|
||||
cfromc = 1.;
|
||||
} else if (abs(cfrom1) > abs(ctoc) && ctoc != 0.) {
|
||||
mul = smlnum;
|
||||
done = FALSE_;
|
||||
cfromc = cfrom1;
|
||||
} else if (abs(cto1) > abs(cfromc)) {
|
||||
mul = bignum;
|
||||
done = FALSE_;
|
||||
ctoc = cto1;
|
||||
} else {
|
||||
mul = ctoc / cfromc;
|
||||
done = TRUE_;
|
||||
}
|
||||
}
|
||||
if (itype == 0) {
|
||||
//
|
||||
// Full matrix
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] *= mul;
|
||||
// L20:
|
||||
}
|
||||
// L30:
|
||||
}
|
||||
} else if (itype == 1) {
|
||||
//
|
||||
// Lower triangular matrix
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = j; i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] *= mul;
|
||||
// L40:
|
||||
}
|
||||
// L50:
|
||||
}
|
||||
} else if (itype == 2) {
|
||||
//
|
||||
// Upper triangular matrix
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = min(j,*m);
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] *= mul;
|
||||
// L60:
|
||||
}
|
||||
// L70:
|
||||
}
|
||||
} else if (itype == 3) {
|
||||
//
|
||||
// Upper Hessenberg matrix
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
// Computing MIN
|
||||
i__3 = j + 1;
|
||||
i__2 = min(i__3,*m);
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] *= mul;
|
||||
// L80:
|
||||
}
|
||||
// L90:
|
||||
}
|
||||
} else if (itype == 4) {
|
||||
//
|
||||
// Lower half of a symmetric band matrix
|
||||
//
|
||||
k3 = *kl + 1;
|
||||
k4 = *n + 1;
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
// Computing MIN
|
||||
i__3 = k3, i__4 = k4 - j;
|
||||
i__2 = min(i__3,i__4);
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] *= mul;
|
||||
// L100:
|
||||
}
|
||||
// L110:
|
||||
}
|
||||
} else if (itype == 5) {
|
||||
//
|
||||
// Upper half of a symmetric band matrix
|
||||
//
|
||||
k1 = *ku + 2;
|
||||
k3 = *ku + 1;
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
// Computing MAX
|
||||
i__2 = k1 - j;
|
||||
i__3 = k3;
|
||||
for (i__ = max(i__2,1); i__ <= i__3; ++i__) {
|
||||
a[i__ + j * a_dim1] *= mul;
|
||||
// L120:
|
||||
}
|
||||
// L130:
|
||||
}
|
||||
} else if (itype == 6) {
|
||||
//
|
||||
// Band matrix
|
||||
//
|
||||
k1 = *kl + *ku + 2;
|
||||
k2 = *kl + 1;
|
||||
k3 = (*kl << 1) + *ku + 1;
|
||||
k4 = *kl + *ku + 1 + *m;
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
// Computing MAX
|
||||
i__3 = k1 - j;
|
||||
// Computing MIN
|
||||
i__4 = k3, i__5 = k4 - j;
|
||||
i__2 = min(i__4,i__5);
|
||||
for (i__ = max(i__3,k2); i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] *= mul;
|
||||
// L140:
|
||||
}
|
||||
// L150:
|
||||
}
|
||||
}
|
||||
if (! done) {
|
||||
goto L10;
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DLASCL
|
||||
//
|
||||
} // dlascl_
|
||||
|
||||
Vendored
+209
@@ -0,0 +1,209 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLASET + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaset.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaset.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaset.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// CHARACTER UPLO
|
||||
// INTEGER LDA, M, N
|
||||
// DOUBLE PRECISION ALPHA, BETA
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A( LDA, * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLASET initializes an m-by-n matrix A to BETA on the diagonal and
|
||||
//> ALPHA on the offdiagonals.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] UPLO
|
||||
//> \verbatim
|
||||
//> UPLO is CHARACTER*1
|
||||
//> Specifies the part of the matrix A to be set.
|
||||
//> = 'U': Upper triangular part is set; the strictly lower
|
||||
//> triangular part of A is not changed.
|
||||
//> = 'L': Lower triangular part is set; the strictly upper
|
||||
//> triangular part of A is not changed.
|
||||
//> Otherwise: All of the matrix A is set.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix A. M >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix A. N >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] ALPHA
|
||||
//> \verbatim
|
||||
//> ALPHA is DOUBLE PRECISION
|
||||
//> The constant to which the offdiagonal elements are to be set.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] BETA
|
||||
//> \verbatim
|
||||
//> BETA is DOUBLE PRECISION
|
||||
//> The constant to which the diagonal elements are to be set.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension (LDA,N)
|
||||
//> On exit, the leading m-by-n submatrix of A is set as follows:
|
||||
//>
|
||||
//> if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n,
|
||||
//> if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n,
|
||||
//> otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j,
|
||||
//>
|
||||
//> and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> The leading dimension of the array A. LDA >= max(1,M).
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup OTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dlaset_(char *uplo, int *m, int *n, double *alpha,
|
||||
double *beta, double *a, int *lda)
|
||||
{
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, i__1, i__2, i__3;
|
||||
|
||||
// Local variables
|
||||
int i__, j;
|
||||
extern int lsame_(char *, char *);
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
//=====================================================================
|
||||
//
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
|
||||
// Function Body
|
||||
if (lsame_(uplo, "U")) {
|
||||
//
|
||||
// Set the strictly upper triangular or trapezoidal part of the
|
||||
// array to ALPHA.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 2; j <= i__1; ++j) {
|
||||
// Computing MIN
|
||||
i__3 = j - 1;
|
||||
i__2 = min(i__3,*m);
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] = *alpha;
|
||||
// L10:
|
||||
}
|
||||
// L20:
|
||||
}
|
||||
} else if (lsame_(uplo, "L")) {
|
||||
//
|
||||
// Set the strictly lower triangular or trapezoidal part of the
|
||||
// array to ALPHA.
|
||||
//
|
||||
i__1 = min(*m,*n);
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = j + 1; i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] = *alpha;
|
||||
// L30:
|
||||
}
|
||||
// L40:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Set the leading m-by-n submatrix to ALPHA.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] = *alpha;
|
||||
// L50:
|
||||
}
|
||||
// L60:
|
||||
}
|
||||
}
|
||||
//
|
||||
// Set the first min(M,N) diagonal elements to BETA.
|
||||
//
|
||||
i__1 = min(*m,*n);
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
a[i__ + i__ * a_dim1] = *beta;
|
||||
// L70:
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DLASET
|
||||
//
|
||||
} // dlaset_
|
||||
|
||||
Vendored
+172
@@ -0,0 +1,172 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DLASSQ updates a sum of squares represented in scaled form.
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DLASSQ + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlassq.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlassq.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlassq.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DLASSQ( N, X, INCX, SCALE, SUMSQ )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// INTEGER INCX, N
|
||||
// DOUBLE PRECISION SCALE, SUMSQ
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION X( * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DLASSQ returns the values scl and smsq such that
|
||||
//>
|
||||
//> ( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
|
||||
//>
|
||||
//> where x( i ) = X( 1 + ( i - 1 )*INCX ). The value of sumsq is
|
||||
//> assumed to be non-negative and scl returns the value
|
||||
//>
|
||||
//> scl = max( scale, abs( x( i ) ) ).
|
||||
//>
|
||||
//> scale and sumsq must be supplied in SCALE and SUMSQ and
|
||||
//> scl and smsq are overwritten on SCALE and SUMSQ respectively.
|
||||
//>
|
||||
//> The routine makes only one pass through the vector x.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of elements to be used from the vector X.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] X
|
||||
//> \verbatim
|
||||
//> X is DOUBLE PRECISION array, dimension (1+(N-1)*INCX)
|
||||
//> The vector for which a scaled sum of squares is computed.
|
||||
//> x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCX
|
||||
//> \verbatim
|
||||
//> INCX is INTEGER
|
||||
//> The increment between successive values of the vector X.
|
||||
//> INCX > 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] SCALE
|
||||
//> \verbatim
|
||||
//> SCALE is DOUBLE PRECISION
|
||||
//> On entry, the value scale in the equation above.
|
||||
//> On exit, SCALE is overwritten with scl , the scaling factor
|
||||
//> for the sum of squares.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] SUMSQ
|
||||
//> \verbatim
|
||||
//> SUMSQ is DOUBLE PRECISION
|
||||
//> On entry, the value sumsq in the equation above.
|
||||
//> On exit, SUMSQ is overwritten with smsq , the basic sum of
|
||||
//> squares from which scl has been factored out.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup OTHERauxiliary
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dlassq_(int *n, double *x, int *incx, double *scale,
|
||||
double *sumsq)
|
||||
{
|
||||
// System generated locals
|
||||
int i__1, i__2;
|
||||
double d__1;
|
||||
|
||||
// Local variables
|
||||
int ix;
|
||||
double absxi;
|
||||
extern int disnan_(double *);
|
||||
|
||||
//
|
||||
// -- LAPACK auxiliary routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
//=====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Parameter adjustments
|
||||
--x;
|
||||
|
||||
// Function Body
|
||||
if (*n > 0) {
|
||||
i__1 = (*n - 1) * *incx + 1;
|
||||
i__2 = *incx;
|
||||
for (ix = 1; i__2 < 0 ? ix >= i__1 : ix <= i__1; ix += i__2) {
|
||||
absxi = (d__1 = x[ix], abs(d__1));
|
||||
if (absxi > 0. || disnan_(&absxi)) {
|
||||
if (*scale < absxi) {
|
||||
// Computing 2nd power
|
||||
d__1 = *scale / absxi;
|
||||
*sumsq = *sumsq * (d__1 * d__1) + 1;
|
||||
*scale = absxi;
|
||||
} else {
|
||||
// Computing 2nd power
|
||||
d__1 = absxi / *scale;
|
||||
*sumsq += d__1 * d__1;
|
||||
}
|
||||
}
|
||||
// L10:
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DLASSQ
|
||||
//
|
||||
} // dlassq_
|
||||
|
||||
Vendored
+149
@@ -0,0 +1,149 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DNRM2
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// DOUBLE PRECISION FUNCTION DNRM2(N,X,INCX)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// INTEGER INCX,N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION X(*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DNRM2 returns the euclidean norm of a vector via the function
|
||||
//> name, so that
|
||||
//>
|
||||
//> DNRM2 := sqrt( x'*x )
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> number of elements in input vector(s)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] X
|
||||
//> \verbatim
|
||||
//> X is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCX
|
||||
//> \verbatim
|
||||
//> INCX is INTEGER
|
||||
//> storage spacing between elements of DX
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date November 2017
|
||||
//
|
||||
//> \ingroup double_blas_level1
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> -- This version written on 25-October-1982.
|
||||
//> Modified on 14-October-1993 to inline the call to DLASSQ.
|
||||
//> Sven Hammarling, Nag Ltd.
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
double dnrm2_(int *n, double *x, int *incx)
|
||||
{
|
||||
// System generated locals
|
||||
int i__1, i__2;
|
||||
double ret_val, d__1;
|
||||
|
||||
// Local variables
|
||||
int ix;
|
||||
double ssq, norm, scale, absxi;
|
||||
|
||||
//
|
||||
// -- Reference BLAS level1 routine (version 3.8.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// November 2017
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// Parameter adjustments
|
||||
--x;
|
||||
|
||||
// Function Body
|
||||
if (*n < 1 || *incx < 1) {
|
||||
norm = 0.;
|
||||
} else if (*n == 1) {
|
||||
norm = abs(x[1]);
|
||||
} else {
|
||||
scale = 0.;
|
||||
ssq = 1.;
|
||||
// The following loop is equivalent to this call to the LAPACK
|
||||
// auxiliary routine:
|
||||
// CALL DLASSQ( N, X, INCX, SCALE, SSQ )
|
||||
//
|
||||
i__1 = (*n - 1) * *incx + 1;
|
||||
i__2 = *incx;
|
||||
for (ix = 1; i__2 < 0 ? ix >= i__1 : ix <= i__1; ix += i__2) {
|
||||
if (x[ix] != 0.) {
|
||||
absxi = (d__1 = x[ix], abs(d__1));
|
||||
if (scale < absxi) {
|
||||
// Computing 2nd power
|
||||
d__1 = scale / absxi;
|
||||
ssq = ssq * (d__1 * d__1) + 1.;
|
||||
scale = absxi;
|
||||
} else {
|
||||
// Computing 2nd power
|
||||
d__1 = absxi / scale;
|
||||
ssq += d__1 * d__1;
|
||||
}
|
||||
}
|
||||
// L10:
|
||||
}
|
||||
norm = scale * sqrt(ssq);
|
||||
}
|
||||
ret_val = norm;
|
||||
return ret_val;
|
||||
//
|
||||
// End of DNRM2.
|
||||
//
|
||||
} // dnrm2_
|
||||
|
||||
Vendored
+571
@@ -0,0 +1,571 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DORG2R generates all or part of the orthogonal matrix Q from a QR factorization determined by sgeqrf (unblocked algorithm).
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DORG2R + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorg2r.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorg2r.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorg2r.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DORG2R( M, N, K, A, LDA, TAU, WORK, INFO )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// INTEGER INFO, K, LDA, M, N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DORG2R generates an m by n real matrix Q with orthonormal columns,
|
||||
//> which is defined as the first n columns of a product of k elementary
|
||||
//> reflectors of order m
|
||||
//>
|
||||
//> Q = H(1) H(2) . . . H(k)
|
||||
//>
|
||||
//> as returned by DGEQRF.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix Q. M >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix Q. M >= N >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] K
|
||||
//> \verbatim
|
||||
//> K is INTEGER
|
||||
//> The number of elementary reflectors whose product defines the
|
||||
//> matrix Q. N >= K >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension (LDA,N)
|
||||
//> On entry, the i-th column must contain the vector which
|
||||
//> defines the elementary reflector H(i), for i = 1,2,...,k, as
|
||||
//> returned by DGEQRF in the first k columns of its array
|
||||
//> argument A.
|
||||
//> On exit, the m-by-n matrix Q.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> The first dimension of the array A. LDA >= max(1,M).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TAU
|
||||
//> \verbatim
|
||||
//> TAU is DOUBLE PRECISION array, dimension (K)
|
||||
//> TAU(i) must contain the scalar factor of the elementary
|
||||
//> reflector H(i), as returned by DGEQRF.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] WORK
|
||||
//> \verbatim
|
||||
//> WORK is DOUBLE PRECISION array, dimension (N)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] INFO
|
||||
//> \verbatim
|
||||
//> INFO is INTEGER
|
||||
//> = 0: successful exit
|
||||
//> < 0: if INFO = -i, the i-th argument has an illegal value
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup doubleOTHERcomputational
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dorg2r_(int *m, int *n, int *k, double *a, int *lda,
|
||||
double *tau, double *work, int *info)
|
||||
{
|
||||
// Table of constant values
|
||||
int c__1 = 1;
|
||||
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, i__1, i__2;
|
||||
double d__1;
|
||||
|
||||
// Local variables
|
||||
int i__, j, l;
|
||||
extern /* Subroutine */ int dscal_(int *, double *, double *, int *),
|
||||
dlarf_(char *, int *, int *, double *, int *, double *, double *,
|
||||
int *, double *), xerbla_(char *, int *);
|
||||
|
||||
//
|
||||
// -- LAPACK computational routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Test the input arguments
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
--tau;
|
||||
--work;
|
||||
|
||||
// Function Body
|
||||
*info = 0;
|
||||
if (*m < 0) {
|
||||
*info = -1;
|
||||
} else if (*n < 0 || *n > *m) {
|
||||
*info = -2;
|
||||
} else if (*k < 0 || *k > *n) {
|
||||
*info = -3;
|
||||
} else if (*lda < max(1,*m)) {
|
||||
*info = -5;
|
||||
}
|
||||
if (*info != 0) {
|
||||
i__1 = -(*info);
|
||||
xerbla_("DORG2R", &i__1);
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible
|
||||
//
|
||||
if (*n <= 0) {
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Initialise columns k+1:n to columns of the unit matrix
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = *k + 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (l = 1; l <= i__2; ++l) {
|
||||
a[l + j * a_dim1] = 0.;
|
||||
// L10:
|
||||
}
|
||||
a[j + j * a_dim1] = 1.;
|
||||
// L20:
|
||||
}
|
||||
for (i__ = *k; i__ >= 1; --i__) {
|
||||
//
|
||||
// Apply H(i) to A(i:m,i:n) from the left
|
||||
//
|
||||
if (i__ < *n) {
|
||||
a[i__ + i__ * a_dim1] = 1.;
|
||||
i__1 = *m - i__ + 1;
|
||||
i__2 = *n - i__;
|
||||
dlarf_("Left", &i__1, &i__2, &a[i__ + i__ * a_dim1], &c__1, &tau[
|
||||
i__], &a[i__ + (i__ + 1) * a_dim1], lda, &work[1]);
|
||||
}
|
||||
if (i__ < *m) {
|
||||
i__1 = *m - i__;
|
||||
d__1 = -tau[i__];
|
||||
dscal_(&i__1, &d__1, &a[i__ + 1 + i__ * a_dim1], &c__1);
|
||||
}
|
||||
a[i__ + i__ * a_dim1] = 1. - tau[i__];
|
||||
//
|
||||
// Set A(1:i-1,i) to zero
|
||||
//
|
||||
i__1 = i__ - 1;
|
||||
for (l = 1; l <= i__1; ++l) {
|
||||
a[l + i__ * a_dim1] = 0.;
|
||||
// L30:
|
||||
}
|
||||
// L40:
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DORG2R
|
||||
//
|
||||
} // dorg2r_
|
||||
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
//> \brief \b DORGQR
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DORGQR + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgqr.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgqr.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgqr.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// INTEGER INFO, K, LDA, LWORK, M, N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DORGQR generates an M-by-N real matrix Q with orthonormal columns,
|
||||
//> which is defined as the first N columns of a product of K elementary
|
||||
//> reflectors of order M
|
||||
//>
|
||||
//> Q = H(1) H(2) . . . H(k)
|
||||
//>
|
||||
//> as returned by DGEQRF.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix Q. M >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix Q. M >= N >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] K
|
||||
//> \verbatim
|
||||
//> K is INTEGER
|
||||
//> The number of elementary reflectors whose product defines the
|
||||
//> matrix Q. N >= K >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension (LDA,N)
|
||||
//> On entry, the i-th column must contain the vector which
|
||||
//> defines the elementary reflector H(i), for i = 1,2,...,k, as
|
||||
//> returned by DGEQRF in the first k columns of its array
|
||||
//> argument A.
|
||||
//> On exit, the M-by-N matrix Q.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> The first dimension of the array A. LDA >= max(1,M).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TAU
|
||||
//> \verbatim
|
||||
//> TAU is DOUBLE PRECISION array, dimension (K)
|
||||
//> TAU(i) must contain the scalar factor of the elementary
|
||||
//> reflector H(i), as returned by DGEQRF.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] WORK
|
||||
//> \verbatim
|
||||
//> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
|
||||
//> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LWORK
|
||||
//> \verbatim
|
||||
//> LWORK is INTEGER
|
||||
//> The dimension of the array WORK. LWORK >= max(1,N).
|
||||
//> For optimum performance LWORK >= N*NB, where NB is the
|
||||
//> optimal blocksize.
|
||||
//>
|
||||
//> If LWORK = -1, then a workspace query is assumed; the routine
|
||||
//> only calculates the optimal size of the WORK array, returns
|
||||
//> this value as the first entry of the WORK array, and no error
|
||||
//> message related to LWORK is issued by XERBLA.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] INFO
|
||||
//> \verbatim
|
||||
//> INFO is INTEGER
|
||||
//> = 0: successful exit
|
||||
//> < 0: if INFO = -i, the i-th argument has an illegal value
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup doubleOTHERcomputational
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dorgqr_(int *m, int *n, int *k, double *a, int *lda,
|
||||
double *tau, double *work, int *lwork, int *info)
|
||||
{
|
||||
// Table of constant values
|
||||
int c__1 = 1;
|
||||
int c_n1 = -1;
|
||||
int c__3 = 3;
|
||||
int c__2 = 2;
|
||||
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, i__1, i__2, i__3;
|
||||
|
||||
// Local variables
|
||||
int i__, j, l, ib, nb, ki, kk, nx, iws, nbmin, iinfo;
|
||||
extern /* Subroutine */ int dorg2r_(int *, int *, int *, double *, int *,
|
||||
double *, double *, int *), dlarfb_(char *, char *, char *, char *
|
||||
, int *, int *, int *, double *, int *, double *, int *, double *,
|
||||
int *, double *, int *), dlarft_(char *, char *, int *, int *,
|
||||
double *, int *, double *, double *, int *), xerbla_(char *, int *
|
||||
);
|
||||
extern int ilaenv_(int *, char *, char *, int *, int *, int *, int *);
|
||||
int ldwork, lwkopt;
|
||||
int lquery;
|
||||
|
||||
//
|
||||
// -- LAPACK computational routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Test the input arguments
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
--tau;
|
||||
--work;
|
||||
|
||||
// Function Body
|
||||
*info = 0;
|
||||
nb = ilaenv_(&c__1, "DORGQR", " ", m, n, k, &c_n1);
|
||||
lwkopt = max(1,*n) * nb;
|
||||
work[1] = (double) lwkopt;
|
||||
lquery = *lwork == -1;
|
||||
if (*m < 0) {
|
||||
*info = -1;
|
||||
} else if (*n < 0 || *n > *m) {
|
||||
*info = -2;
|
||||
} else if (*k < 0 || *k > *n) {
|
||||
*info = -3;
|
||||
} else if (*lda < max(1,*m)) {
|
||||
*info = -5;
|
||||
} else if (*lwork < max(1,*n) && ! lquery) {
|
||||
*info = -8;
|
||||
}
|
||||
if (*info != 0) {
|
||||
i__1 = -(*info);
|
||||
xerbla_("DORGQR", &i__1);
|
||||
return 0;
|
||||
} else if (lquery) {
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible
|
||||
//
|
||||
if (*n <= 0) {
|
||||
work[1] = 1.;
|
||||
return 0;
|
||||
}
|
||||
nbmin = 2;
|
||||
nx = 0;
|
||||
iws = *n;
|
||||
if (nb > 1 && nb < *k) {
|
||||
//
|
||||
// Determine when to cross over from blocked to unblocked code.
|
||||
//
|
||||
// Computing MAX
|
||||
i__1 = 0, i__2 = ilaenv_(&c__3, "DORGQR", " ", m, n, k, &c_n1);
|
||||
nx = max(i__1,i__2);
|
||||
if (nx < *k) {
|
||||
//
|
||||
// Determine if workspace is large enough for blocked code.
|
||||
//
|
||||
ldwork = *n;
|
||||
iws = ldwork * nb;
|
||||
if (*lwork < iws) {
|
||||
//
|
||||
// Not enough workspace to use optimal NB: reduce NB and
|
||||
// determine the minimum value of NB.
|
||||
//
|
||||
nb = *lwork / ldwork;
|
||||
// Computing MAX
|
||||
i__1 = 2, i__2 = ilaenv_(&c__2, "DORGQR", " ", m, n, k, &c_n1)
|
||||
;
|
||||
nbmin = max(i__1,i__2);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nb >= nbmin && nb < *k && nx < *k) {
|
||||
//
|
||||
// Use blocked code after the last block.
|
||||
// The first kk columns are handled by the block method.
|
||||
//
|
||||
ki = (*k - nx - 1) / nb * nb;
|
||||
// Computing MIN
|
||||
i__1 = *k, i__2 = ki + nb;
|
||||
kk = min(i__1,i__2);
|
||||
//
|
||||
// Set A(1:kk,kk+1:n) to zero.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = kk + 1; j <= i__1; ++j) {
|
||||
i__2 = kk;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
a[i__ + j * a_dim1] = 0.;
|
||||
// L10:
|
||||
}
|
||||
// L20:
|
||||
}
|
||||
} else {
|
||||
kk = 0;
|
||||
}
|
||||
//
|
||||
// Use unblocked code for the last or only block.
|
||||
//
|
||||
if (kk < *n) {
|
||||
i__1 = *m - kk;
|
||||
i__2 = *n - kk;
|
||||
i__3 = *k - kk;
|
||||
dorg2r_(&i__1, &i__2, &i__3, &a[kk + 1 + (kk + 1) * a_dim1], lda, &
|
||||
tau[kk + 1], &work[1], &iinfo);
|
||||
}
|
||||
if (kk > 0) {
|
||||
//
|
||||
// Use blocked code
|
||||
//
|
||||
i__1 = -nb;
|
||||
for (i__ = ki + 1; i__1 < 0 ? i__ >= 1 : i__ <= 1; i__ += i__1) {
|
||||
// Computing MIN
|
||||
i__2 = nb, i__3 = *k - i__ + 1;
|
||||
ib = min(i__2,i__3);
|
||||
if (i__ + ib <= *n) {
|
||||
//
|
||||
// Form the triangular factor of the block reflector
|
||||
// H = H(i) H(i+1) . . . H(i+ib-1)
|
||||
//
|
||||
i__2 = *m - i__ + 1;
|
||||
dlarft_("Forward", "Columnwise", &i__2, &ib, &a[i__ + i__ *
|
||||
a_dim1], lda, &tau[i__], &work[1], &ldwork);
|
||||
//
|
||||
// Apply H to A(i:m,i+ib:n) from the left
|
||||
//
|
||||
i__2 = *m - i__ + 1;
|
||||
i__3 = *n - i__ - ib + 1;
|
||||
dlarfb_("Left", "No transpose", "Forward", "Columnwise", &
|
||||
i__2, &i__3, &ib, &a[i__ + i__ * a_dim1], lda, &work[
|
||||
1], &ldwork, &a[i__ + (i__ + ib) * a_dim1], lda, &
|
||||
work[ib + 1], &ldwork);
|
||||
}
|
||||
//
|
||||
// Apply H to rows i:m of current block
|
||||
//
|
||||
i__2 = *m - i__ + 1;
|
||||
dorg2r_(&i__2, &ib, &ib, &a[i__ + i__ * a_dim1], lda, &tau[i__], &
|
||||
work[1], &iinfo);
|
||||
//
|
||||
// Set rows 1:i-1 of current block to zero
|
||||
//
|
||||
i__2 = i__ + ib - 1;
|
||||
for (j = i__; j <= i__2; ++j) {
|
||||
i__3 = i__ - 1;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
a[l + j * a_dim1] = 0.;
|
||||
// L30:
|
||||
}
|
||||
// L40:
|
||||
}
|
||||
// L50:
|
||||
}
|
||||
}
|
||||
work[1] = (double) iws;
|
||||
return 0;
|
||||
//
|
||||
// End of DORGQR
|
||||
//
|
||||
} // dorgqr_
|
||||
|
||||
Vendored
+684
@@ -0,0 +1,684 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DORM2R multiplies a general matrix by the orthogonal matrix from a QR factorization determined by sgeqrf (unblocked algorithm).
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DORM2R + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorm2r.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorm2r.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorm2r.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
|
||||
// WORK, INFO )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// CHARACTER SIDE, TRANS
|
||||
// INTEGER INFO, K, LDA, LDC, M, N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DORM2R overwrites the general real m by n matrix C with
|
||||
//>
|
||||
//> Q * C if SIDE = 'L' and TRANS = 'N', or
|
||||
//>
|
||||
//> Q**T* C if SIDE = 'L' and TRANS = 'T', or
|
||||
//>
|
||||
//> C * Q if SIDE = 'R' and TRANS = 'N', or
|
||||
//>
|
||||
//> C * Q**T if SIDE = 'R' and TRANS = 'T',
|
||||
//>
|
||||
//> where Q is a real orthogonal matrix defined as the product of k
|
||||
//> elementary reflectors
|
||||
//>
|
||||
//> Q = H(1) H(2) . . . H(k)
|
||||
//>
|
||||
//> as returned by DGEQRF. Q is of order m if SIDE = 'L' and of order n
|
||||
//> if SIDE = 'R'.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] SIDE
|
||||
//> \verbatim
|
||||
//> SIDE is CHARACTER*1
|
||||
//> = 'L': apply Q or Q**T from the Left
|
||||
//> = 'R': apply Q or Q**T from the Right
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TRANS
|
||||
//> \verbatim
|
||||
//> TRANS is CHARACTER*1
|
||||
//> = 'N': apply Q (No transpose)
|
||||
//> = 'T': apply Q**T (Transpose)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix C. M >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix C. N >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] K
|
||||
//> \verbatim
|
||||
//> K is INTEGER
|
||||
//> The number of elementary reflectors whose product defines
|
||||
//> the matrix Q.
|
||||
//> If SIDE = 'L', M >= K >= 0;
|
||||
//> if SIDE = 'R', N >= K >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension (LDA,K)
|
||||
//> The i-th column must contain the vector which defines the
|
||||
//> elementary reflector H(i), for i = 1,2,...,k, as returned by
|
||||
//> DGEQRF in the first k columns of its array argument A.
|
||||
//> A is modified by the routine but restored on exit.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> The leading dimension of the array A.
|
||||
//> If SIDE = 'L', LDA >= max(1,M);
|
||||
//> if SIDE = 'R', LDA >= max(1,N).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TAU
|
||||
//> \verbatim
|
||||
//> TAU is DOUBLE PRECISION array, dimension (K)
|
||||
//> TAU(i) must contain the scalar factor of the elementary
|
||||
//> reflector H(i), as returned by DGEQRF.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] C
|
||||
//> \verbatim
|
||||
//> C is DOUBLE PRECISION array, dimension (LDC,N)
|
||||
//> On entry, the m by n matrix C.
|
||||
//> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDC
|
||||
//> \verbatim
|
||||
//> LDC is INTEGER
|
||||
//> The leading dimension of the array C. LDC >= max(1,M).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] WORK
|
||||
//> \verbatim
|
||||
//> WORK is DOUBLE PRECISION array, dimension
|
||||
//> (N) if SIDE = 'L',
|
||||
//> (M) if SIDE = 'R'
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] INFO
|
||||
//> \verbatim
|
||||
//> INFO is INTEGER
|
||||
//> = 0: successful exit
|
||||
//> < 0: if INFO = -i, the i-th argument had an illegal value
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup doubleOTHERcomputational
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dorm2r_(char *side, char *trans, int *m, int *n, int *k,
|
||||
double *a, int *lda, double *tau, double *c__, int *ldc, double *work,
|
||||
int *info)
|
||||
{
|
||||
// Table of constant values
|
||||
int c__1 = 1;
|
||||
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, c_dim1, c_offset, i__1, i__2;
|
||||
|
||||
// Local variables
|
||||
int i__, i1, i2, i3, ic, jc, mi, ni, nq;
|
||||
double aii;
|
||||
int left;
|
||||
extern /* Subroutine */ int dlarf_(char *, int *, int *, double *, int *,
|
||||
double *, double *, int *, double *);
|
||||
extern int lsame_(char *, char *);
|
||||
extern /* Subroutine */ int xerbla_(char *, int *);
|
||||
int notran;
|
||||
|
||||
//
|
||||
// -- LAPACK computational routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Test the input arguments
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
--tau;
|
||||
c_dim1 = *ldc;
|
||||
c_offset = 1 + c_dim1;
|
||||
c__ -= c_offset;
|
||||
--work;
|
||||
|
||||
// Function Body
|
||||
*info = 0;
|
||||
left = lsame_(side, "L");
|
||||
notran = lsame_(trans, "N");
|
||||
//
|
||||
// NQ is the order of Q
|
||||
//
|
||||
if (left) {
|
||||
nq = *m;
|
||||
} else {
|
||||
nq = *n;
|
||||
}
|
||||
if (! left && ! lsame_(side, "R")) {
|
||||
*info = -1;
|
||||
} else if (! notran && ! lsame_(trans, "T")) {
|
||||
*info = -2;
|
||||
} else if (*m < 0) {
|
||||
*info = -3;
|
||||
} else if (*n < 0) {
|
||||
*info = -4;
|
||||
} else if (*k < 0 || *k > nq) {
|
||||
*info = -5;
|
||||
} else if (*lda < max(1,nq)) {
|
||||
*info = -7;
|
||||
} else if (*ldc < max(1,*m)) {
|
||||
*info = -10;
|
||||
}
|
||||
if (*info != 0) {
|
||||
i__1 = -(*info);
|
||||
xerbla_("DORM2R", &i__1);
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible
|
||||
//
|
||||
if (*m == 0 || *n == 0 || *k == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (left && ! notran || ! left && notran) {
|
||||
i1 = 1;
|
||||
i2 = *k;
|
||||
i3 = 1;
|
||||
} else {
|
||||
i1 = *k;
|
||||
i2 = 1;
|
||||
i3 = -1;
|
||||
}
|
||||
if (left) {
|
||||
ni = *n;
|
||||
jc = 1;
|
||||
} else {
|
||||
mi = *m;
|
||||
ic = 1;
|
||||
}
|
||||
i__1 = i2;
|
||||
i__2 = i3;
|
||||
for (i__ = i1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
|
||||
if (left) {
|
||||
//
|
||||
// H(i) is applied to C(i:m,1:n)
|
||||
//
|
||||
mi = *m - i__ + 1;
|
||||
ic = i__;
|
||||
} else {
|
||||
//
|
||||
// H(i) is applied to C(1:m,i:n)
|
||||
//
|
||||
ni = *n - i__ + 1;
|
||||
jc = i__;
|
||||
}
|
||||
//
|
||||
// Apply H(i)
|
||||
//
|
||||
aii = a[i__ + i__ * a_dim1];
|
||||
a[i__ + i__ * a_dim1] = 1.;
|
||||
dlarf_(side, &mi, &ni, &a[i__ + i__ * a_dim1], &c__1, &tau[i__], &c__[
|
||||
ic + jc * c_dim1], ldc, &work[1]);
|
||||
a[i__ + i__ * a_dim1] = aii;
|
||||
// L10:
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DORM2R
|
||||
//
|
||||
} // dorm2r_
|
||||
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
//> \brief \b DORMQR
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
//> \htmlonly
|
||||
//> Download DORMQR + dependencies
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormqr.f">
|
||||
//> [TGZ]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormqr.f">
|
||||
//> [ZIP]</a>
|
||||
//> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormqr.f">
|
||||
//> [TXT]</a>
|
||||
//> \endhtmlonly
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DORMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
|
||||
// WORK, LWORK, INFO )
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// CHARACTER SIDE, TRANS
|
||||
// INTEGER INFO, K, LDA, LDC, LWORK, M, N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DORMQR overwrites the general real M-by-N matrix C with
|
||||
//>
|
||||
//> SIDE = 'L' SIDE = 'R'
|
||||
//> TRANS = 'N': Q * C C * Q
|
||||
//> TRANS = 'T': Q**T * C C * Q**T
|
||||
//>
|
||||
//> where Q is a real orthogonal matrix defined as the product of k
|
||||
//> elementary reflectors
|
||||
//>
|
||||
//> Q = H(1) H(2) . . . H(k)
|
||||
//>
|
||||
//> as returned by DGEQRF. Q is of order M if SIDE = 'L' and of order N
|
||||
//> if SIDE = 'R'.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] SIDE
|
||||
//> \verbatim
|
||||
//> SIDE is CHARACTER*1
|
||||
//> = 'L': apply Q or Q**T from the Left;
|
||||
//> = 'R': apply Q or Q**T from the Right.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TRANS
|
||||
//> \verbatim
|
||||
//> TRANS is CHARACTER*1
|
||||
//> = 'N': No transpose, apply Q;
|
||||
//> = 'T': Transpose, apply Q**T.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> The number of rows of the matrix C. M >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> The number of columns of the matrix C. N >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] K
|
||||
//> \verbatim
|
||||
//> K is INTEGER
|
||||
//> The number of elementary reflectors whose product defines
|
||||
//> the matrix Q.
|
||||
//> If SIDE = 'L', M >= K >= 0;
|
||||
//> if SIDE = 'R', N >= K >= 0.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension (LDA,K)
|
||||
//> The i-th column must contain the vector which defines the
|
||||
//> elementary reflector H(i), for i = 1,2,...,k, as returned by
|
||||
//> DGEQRF in the first k columns of its array argument A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> The leading dimension of the array A.
|
||||
//> If SIDE = 'L', LDA >= max(1,M);
|
||||
//> if SIDE = 'R', LDA >= max(1,N).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TAU
|
||||
//> \verbatim
|
||||
//> TAU is DOUBLE PRECISION array, dimension (K)
|
||||
//> TAU(i) must contain the scalar factor of the elementary
|
||||
//> reflector H(i), as returned by DGEQRF.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] C
|
||||
//> \verbatim
|
||||
//> C is DOUBLE PRECISION array, dimension (LDC,N)
|
||||
//> On entry, the M-by-N matrix C.
|
||||
//> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDC
|
||||
//> \verbatim
|
||||
//> LDC is INTEGER
|
||||
//> The leading dimension of the array C. LDC >= max(1,M).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] WORK
|
||||
//> \verbatim
|
||||
//> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
|
||||
//> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LWORK
|
||||
//> \verbatim
|
||||
//> LWORK is INTEGER
|
||||
//> The dimension of the array WORK.
|
||||
//> If SIDE = 'L', LWORK >= max(1,N);
|
||||
//> if SIDE = 'R', LWORK >= max(1,M).
|
||||
//> For good performance, LWORK should generally be larger.
|
||||
//>
|
||||
//> If LWORK = -1, then a workspace query is assumed; the routine
|
||||
//> only calculates the optimal size of the WORK array, returns
|
||||
//> this value as the first entry of the WORK array, and no error
|
||||
//> message related to LWORK is issued by XERBLA.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[out] INFO
|
||||
//> \verbatim
|
||||
//> INFO is INTEGER
|
||||
//> = 0: successful exit
|
||||
//> < 0: if INFO = -i, the i-th argument had an illegal value
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup doubleOTHERcomputational
|
||||
//
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dormqr_(char *side, char *trans, int *m, int *n, int *k,
|
||||
double *a, int *lda, double *tau, double *c__, int *ldc, double *work,
|
||||
int *lwork, int *info)
|
||||
{
|
||||
// Table of constant values
|
||||
int c__1 = 1;
|
||||
int c_n1 = -1;
|
||||
int c__2 = 2;
|
||||
int c__65 = 65;
|
||||
|
||||
// System generated locals
|
||||
address a__1[2];
|
||||
int a_dim1, a_offset, c_dim1, c_offset, i__1, i__2, i__3[2], i__4, i__5;
|
||||
char ch__1[2+1]={'\0'};
|
||||
|
||||
// Local variables
|
||||
int i__, i1, i2, i3, ib, ic, jc, nb, mi, ni, nq, nw, iwt;
|
||||
int left;
|
||||
extern int lsame_(char *, char *);
|
||||
int nbmin, iinfo;
|
||||
extern /* Subroutine */ int dorm2r_(char *, char *, int *, int *, int *,
|
||||
double *, int *, double *, double *, int *, double *, int *),
|
||||
dlarfb_(char *, char *, char *, char *, int *, int *, int *,
|
||||
double *, int *, double *, int *, double *, int *, double *, int *
|
||||
), dlarft_(char *, char *, int *, int *, double *, int *, double *
|
||||
, double *, int *), xerbla_(char *, int *);
|
||||
extern int ilaenv_(int *, char *, char *, int *, int *, int *, int *);
|
||||
int notran;
|
||||
int ldwork, lwkopt;
|
||||
int lquery;
|
||||
|
||||
//
|
||||
// -- LAPACK computational routine (version 3.7.0) --
|
||||
// -- LAPACK is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Executable Statements ..
|
||||
//
|
||||
// Test the input arguments
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
--tau;
|
||||
c_dim1 = *ldc;
|
||||
c_offset = 1 + c_dim1;
|
||||
c__ -= c_offset;
|
||||
--work;
|
||||
|
||||
// Function Body
|
||||
*info = 0;
|
||||
left = lsame_(side, "L");
|
||||
notran = lsame_(trans, "N");
|
||||
lquery = *lwork == -1;
|
||||
//
|
||||
// NQ is the order of Q and NW is the minimum dimension of WORK
|
||||
//
|
||||
if (left) {
|
||||
nq = *m;
|
||||
nw = *n;
|
||||
} else {
|
||||
nq = *n;
|
||||
nw = *m;
|
||||
}
|
||||
if (! left && ! lsame_(side, "R")) {
|
||||
*info = -1;
|
||||
} else if (! notran && ! lsame_(trans, "T")) {
|
||||
*info = -2;
|
||||
} else if (*m < 0) {
|
||||
*info = -3;
|
||||
} else if (*n < 0) {
|
||||
*info = -4;
|
||||
} else if (*k < 0 || *k > nq) {
|
||||
*info = -5;
|
||||
} else if (*lda < max(1,nq)) {
|
||||
*info = -7;
|
||||
} else if (*ldc < max(1,*m)) {
|
||||
*info = -10;
|
||||
} else if (*lwork < max(1,nw) && ! lquery) {
|
||||
*info = -12;
|
||||
}
|
||||
if (*info == 0) {
|
||||
//
|
||||
// Compute the workspace requirements
|
||||
//
|
||||
// Computing MIN
|
||||
// Writing concatenation
|
||||
i__3[0] = 1, a__1[0] = side;
|
||||
i__3[1] = 1, a__1[1] = trans;
|
||||
s_cat(ch__1, a__1, i__3, &c__2);
|
||||
i__1 = 64, i__2 = ilaenv_(&c__1, "DORMQR", ch__1, m, n, k, &c_n1);
|
||||
nb = min(i__1,i__2);
|
||||
lwkopt = max(1,nw) * nb + 4160;
|
||||
work[1] = (double) lwkopt;
|
||||
}
|
||||
if (*info != 0) {
|
||||
i__1 = -(*info);
|
||||
xerbla_("DORMQR", &i__1);
|
||||
return 0;
|
||||
} else if (lquery) {
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible
|
||||
//
|
||||
if (*m == 0 || *n == 0 || *k == 0) {
|
||||
work[1] = 1.;
|
||||
return 0;
|
||||
}
|
||||
nbmin = 2;
|
||||
ldwork = nw;
|
||||
if (nb > 1 && nb < *k) {
|
||||
if (*lwork < nw * nb + 4160) {
|
||||
nb = (*lwork - 4160) / ldwork;
|
||||
// Computing MAX
|
||||
// Writing concatenation
|
||||
i__3[0] = 1, a__1[0] = side;
|
||||
i__3[1] = 1, a__1[1] = trans;
|
||||
s_cat(ch__1, a__1, i__3, &c__2);
|
||||
i__1 = 2, i__2 = ilaenv_(&c__2, "DORMQR", ch__1, m, n, k, &c_n1);
|
||||
nbmin = max(i__1,i__2);
|
||||
}
|
||||
}
|
||||
if (nb < nbmin || nb >= *k) {
|
||||
//
|
||||
// Use unblocked code
|
||||
//
|
||||
dorm2r_(side, trans, m, n, k, &a[a_offset], lda, &tau[1], &c__[
|
||||
c_offset], ldc, &work[1], &iinfo);
|
||||
} else {
|
||||
//
|
||||
// Use blocked code
|
||||
//
|
||||
iwt = nw * nb + 1;
|
||||
if (left && ! notran || ! left && notran) {
|
||||
i1 = 1;
|
||||
i2 = *k;
|
||||
i3 = nb;
|
||||
} else {
|
||||
i1 = (*k - 1) / nb * nb + 1;
|
||||
i2 = 1;
|
||||
i3 = -nb;
|
||||
}
|
||||
if (left) {
|
||||
ni = *n;
|
||||
jc = 1;
|
||||
} else {
|
||||
mi = *m;
|
||||
ic = 1;
|
||||
}
|
||||
i__1 = i2;
|
||||
i__2 = i3;
|
||||
for (i__ = i1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
|
||||
// Computing MIN
|
||||
i__4 = nb, i__5 = *k - i__ + 1;
|
||||
ib = min(i__4,i__5);
|
||||
//
|
||||
// Form the triangular factor of the block reflector
|
||||
// H = H(i) H(i+1) . . . H(i+ib-1)
|
||||
//
|
||||
i__4 = nq - i__ + 1;
|
||||
dlarft_("Forward", "Columnwise", &i__4, &ib, &a[i__ + i__ *
|
||||
a_dim1], lda, &tau[i__], &work[iwt], &c__65);
|
||||
if (left) {
|
||||
//
|
||||
// H or H**T is applied to C(i:m,1:n)
|
||||
//
|
||||
mi = *m - i__ + 1;
|
||||
ic = i__;
|
||||
} else {
|
||||
//
|
||||
// H or H**T is applied to C(1:m,i:n)
|
||||
//
|
||||
ni = *n - i__ + 1;
|
||||
jc = i__;
|
||||
}
|
||||
//
|
||||
// Apply H or H**T
|
||||
//
|
||||
dlarfb_(side, trans, "Forward", "Columnwise", &mi, &ni, &ib, &a[
|
||||
i__ + i__ * a_dim1], lda, &work[iwt], &c__65, &c__[ic +
|
||||
jc * c_dim1], ldc, &work[1], &ldwork);
|
||||
// L10:
|
||||
}
|
||||
}
|
||||
work[1] = (double) lwkopt;
|
||||
return 0;
|
||||
//
|
||||
// End of DORMQR
|
||||
//
|
||||
} // dormqr_
|
||||
|
||||
Vendored
+164
@@ -0,0 +1,164 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DROT
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// DOUBLE PRECISION C,S
|
||||
// INTEGER INCX,INCY,N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION DX(*),DY(*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DROT applies a plane rotation.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> number of elements in input vector(s)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] DX
|
||||
//> \verbatim
|
||||
//> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCX
|
||||
//> \verbatim
|
||||
//> INCX is INTEGER
|
||||
//> storage spacing between elements of DX
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] DY
|
||||
//> \verbatim
|
||||
//> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCY
|
||||
//> \verbatim
|
||||
//> INCY is INTEGER
|
||||
//> storage spacing between elements of DY
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] C
|
||||
//> \verbatim
|
||||
//> C is DOUBLE PRECISION
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] S
|
||||
//> \verbatim
|
||||
//> S is DOUBLE PRECISION
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date November 2017
|
||||
//
|
||||
//> \ingroup double_blas_level1
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> jack dongarra, linpack, 3/11/78.
|
||||
//> modified 12/3/93, array(1) declarations changed to array(*)
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int drot_(int *n, double *dx, int *incx, double *dy, int *
|
||||
incy, double *c__, double *s)
|
||||
{
|
||||
// System generated locals
|
||||
int i__1;
|
||||
|
||||
// Local variables
|
||||
int i__, ix, iy;
|
||||
double dtemp;
|
||||
|
||||
//
|
||||
// -- Reference BLAS level1 routine (version 3.8.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// November 2017
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// Parameter adjustments
|
||||
--dy;
|
||||
--dx;
|
||||
|
||||
// Function Body
|
||||
if (*n <= 0) {
|
||||
return 0;
|
||||
}
|
||||
if (*incx == 1 && *incy == 1) {
|
||||
//
|
||||
// code for both increments equal to 1
|
||||
//
|
||||
i__1 = *n;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
dtemp = *c__ * dx[i__] + *s * dy[i__];
|
||||
dy[i__] = *c__ * dy[i__] - *s * dx[i__];
|
||||
dx[i__] = dtemp;
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// code for unequal increments or equal increments not equal
|
||||
// to 1
|
||||
//
|
||||
ix = 1;
|
||||
iy = 1;
|
||||
if (*incx < 0) {
|
||||
ix = (-(*n) + 1) * *incx + 1;
|
||||
}
|
||||
if (*incy < 0) {
|
||||
iy = (-(*n) + 1) * *incy + 1;
|
||||
}
|
||||
i__1 = *n;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
dtemp = *c__ * dx[ix] + *s * dy[iy];
|
||||
dy[iy] = *c__ * dy[iy] - *s * dx[ix];
|
||||
dx[ix] = dtemp;
|
||||
ix += *incx;
|
||||
iy += *incy;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
} // drot_
|
||||
|
||||
Vendored
+155
@@ -0,0 +1,155 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DSCAL
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DSCAL(N,DA,DX,INCX)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// DOUBLE PRECISION DA
|
||||
// INTEGER INCX,N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION DX(*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DSCAL scales a vector by a constant.
|
||||
//> uses unrolled loops for increment equal to 1.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> number of elements in input vector(s)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] DA
|
||||
//> \verbatim
|
||||
//> DA is DOUBLE PRECISION
|
||||
//> On entry, DA specifies the scalar alpha.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] DX
|
||||
//> \verbatim
|
||||
//> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCX
|
||||
//> \verbatim
|
||||
//> INCX is INTEGER
|
||||
//> storage spacing between elements of DX
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date November 2017
|
||||
//
|
||||
//> \ingroup double_blas_level1
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> jack dongarra, linpack, 3/11/78.
|
||||
//> modified 3/93 to return if incx .le. 0.
|
||||
//> modified 12/3/93, array(1) declarations changed to array(*)
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dscal_(int *n, double *da, double *dx, int *incx)
|
||||
{
|
||||
// System generated locals
|
||||
int i__1, i__2;
|
||||
|
||||
// Local variables
|
||||
int i__, m, mp1, nincx;
|
||||
|
||||
//
|
||||
// -- Reference BLAS level1 routine (version 3.8.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// November 2017
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// Parameter adjustments
|
||||
--dx;
|
||||
|
||||
// Function Body
|
||||
if (*n <= 0 || *incx <= 0) {
|
||||
return 0;
|
||||
}
|
||||
if (*incx == 1) {
|
||||
//
|
||||
// code for increment equal to 1
|
||||
//
|
||||
//
|
||||
// clean-up loop
|
||||
//
|
||||
m = *n % 5;
|
||||
if (m != 0) {
|
||||
i__1 = m;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
dx[i__] = *da * dx[i__];
|
||||
}
|
||||
if (*n < 5) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
mp1 = m + 1;
|
||||
i__1 = *n;
|
||||
for (i__ = mp1; i__ <= i__1; i__ += 5) {
|
||||
dx[i__] = *da * dx[i__];
|
||||
dx[i__ + 1] = *da * dx[i__ + 1];
|
||||
dx[i__ + 2] = *da * dx[i__ + 2];
|
||||
dx[i__ + 3] = *da * dx[i__ + 3];
|
||||
dx[i__ + 4] = *da * dx[i__ + 4];
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// code for increment not equal to 1
|
||||
//
|
||||
nincx = *n * *incx;
|
||||
i__1 = nincx;
|
||||
i__2 = *incx;
|
||||
for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
|
||||
dx[i__] = *da * dx[i__];
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
} // dscal_
|
||||
|
||||
Vendored
+178
@@ -0,0 +1,178 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DSWAP
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DSWAP(N,DX,INCX,DY,INCY)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// INTEGER INCX,INCY,N
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION DX(*),DY(*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DSWAP interchanges two vectors.
|
||||
//> uses unrolled loops for increments equal to 1.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> number of elements in input vector(s)
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] DX
|
||||
//> \verbatim
|
||||
//> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCX
|
||||
//> \verbatim
|
||||
//> INCX is INTEGER
|
||||
//> storage spacing between elements of DX
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] DY
|
||||
//> \verbatim
|
||||
//> DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCY
|
||||
//> \verbatim
|
||||
//> INCY is INTEGER
|
||||
//> storage spacing between elements of DY
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date November 2017
|
||||
//
|
||||
//> \ingroup double_blas_level1
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> jack dongarra, linpack, 3/11/78.
|
||||
//> modified 12/3/93, array(1) declarations changed to array(*)
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dswap_(int *n, double *dx, int *incx, double *dy, int *
|
||||
incy)
|
||||
{
|
||||
// System generated locals
|
||||
int i__1;
|
||||
|
||||
// Local variables
|
||||
int i__, m, ix, iy, mp1;
|
||||
double dtemp;
|
||||
|
||||
//
|
||||
// -- Reference BLAS level1 routine (version 3.8.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// November 2017
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// Parameter adjustments
|
||||
--dy;
|
||||
--dx;
|
||||
|
||||
// Function Body
|
||||
if (*n <= 0) {
|
||||
return 0;
|
||||
}
|
||||
if (*incx == 1 && *incy == 1) {
|
||||
//
|
||||
// code for both increments equal to 1
|
||||
//
|
||||
//
|
||||
// clean-up loop
|
||||
//
|
||||
m = *n % 3;
|
||||
if (m != 0) {
|
||||
i__1 = m;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
dtemp = dx[i__];
|
||||
dx[i__] = dy[i__];
|
||||
dy[i__] = dtemp;
|
||||
}
|
||||
if (*n < 3) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
mp1 = m + 1;
|
||||
i__1 = *n;
|
||||
for (i__ = mp1; i__ <= i__1; i__ += 3) {
|
||||
dtemp = dx[i__];
|
||||
dx[i__] = dy[i__];
|
||||
dy[i__] = dtemp;
|
||||
dtemp = dx[i__ + 1];
|
||||
dx[i__ + 1] = dy[i__ + 1];
|
||||
dy[i__ + 1] = dtemp;
|
||||
dtemp = dx[i__ + 2];
|
||||
dx[i__ + 2] = dy[i__ + 2];
|
||||
dy[i__ + 2] = dtemp;
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// code for unequal increments or equal increments not equal
|
||||
// to 1
|
||||
//
|
||||
ix = 1;
|
||||
iy = 1;
|
||||
if (*incx < 0) {
|
||||
ix = (-(*n) + 1) * *incx + 1;
|
||||
}
|
||||
if (*incy < 0) {
|
||||
iy = (-(*n) + 1) * *incy + 1;
|
||||
}
|
||||
i__1 = *n;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
dtemp = dx[ix];
|
||||
dx[ix] = dy[iy];
|
||||
dy[iy] = dtemp;
|
||||
ix += *incx;
|
||||
iy += *incy;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
} // dswap_
|
||||
|
||||
Vendored
+509
@@ -0,0 +1,509 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DTRMM
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// DOUBLE PRECISION ALPHA
|
||||
// INTEGER LDA,LDB,M,N
|
||||
// CHARACTER DIAG,SIDE,TRANSA,UPLO
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A(LDA,*),B(LDB,*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DTRMM performs one of the matrix-matrix operations
|
||||
//>
|
||||
//> B := alpha*op( A )*B, or B := alpha*B*op( A ),
|
||||
//>
|
||||
//> where alpha is a scalar, B is an m by n matrix, A is a unit, or
|
||||
//> non-unit, upper or lower triangular matrix and op( A ) is one of
|
||||
//>
|
||||
//> op( A ) = A or op( A ) = A**T.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] SIDE
|
||||
//> \verbatim
|
||||
//> SIDE is CHARACTER*1
|
||||
//> On entry, SIDE specifies whether op( A ) multiplies B from
|
||||
//> the left or right as follows:
|
||||
//>
|
||||
//> SIDE = 'L' or 'l' B := alpha*op( A )*B.
|
||||
//>
|
||||
//> SIDE = 'R' or 'r' B := alpha*B*op( A ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] UPLO
|
||||
//> \verbatim
|
||||
//> UPLO is CHARACTER*1
|
||||
//> On entry, UPLO specifies whether the matrix A is an upper or
|
||||
//> lower triangular matrix as follows:
|
||||
//>
|
||||
//> UPLO = 'U' or 'u' A is an upper triangular matrix.
|
||||
//>
|
||||
//> UPLO = 'L' or 'l' A is a lower triangular matrix.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TRANSA
|
||||
//> \verbatim
|
||||
//> TRANSA is CHARACTER*1
|
||||
//> On entry, TRANSA specifies the form of op( A ) to be used in
|
||||
//> the matrix multiplication as follows:
|
||||
//>
|
||||
//> TRANSA = 'N' or 'n' op( A ) = A.
|
||||
//>
|
||||
//> TRANSA = 'T' or 't' op( A ) = A**T.
|
||||
//>
|
||||
//> TRANSA = 'C' or 'c' op( A ) = A**T.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] DIAG
|
||||
//> \verbatim
|
||||
//> DIAG is CHARACTER*1
|
||||
//> On entry, DIAG specifies whether or not A is unit triangular
|
||||
//> as follows:
|
||||
//>
|
||||
//> DIAG = 'U' or 'u' A is assumed to be unit triangular.
|
||||
//>
|
||||
//> DIAG = 'N' or 'n' A is not assumed to be unit
|
||||
//> triangular.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> On entry, M specifies the number of rows of B. M must be at
|
||||
//> least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> On entry, N specifies the number of columns of B. N must be
|
||||
//> at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] ALPHA
|
||||
//> \verbatim
|
||||
//> ALPHA is DOUBLE PRECISION.
|
||||
//> On entry, ALPHA specifies the scalar alpha. When alpha is
|
||||
//> zero then A is not referenced and B need not be set before
|
||||
//> entry.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension ( LDA, k ), where k is m
|
||||
//> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
|
||||
//> Before entry with UPLO = 'U' or 'u', the leading k by k
|
||||
//> upper triangular part of the array A must contain the upper
|
||||
//> triangular matrix and the strictly lower triangular part of
|
||||
//> A is not referenced.
|
||||
//> Before entry with UPLO = 'L' or 'l', the leading k by k
|
||||
//> lower triangular part of the array A must contain the lower
|
||||
//> triangular matrix and the strictly upper triangular part of
|
||||
//> A is not referenced.
|
||||
//> Note that when DIAG = 'U' or 'u', the diagonal elements of
|
||||
//> A are not referenced either, but are assumed to be unity.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> On entry, LDA specifies the first dimension of A as declared
|
||||
//> in the calling (sub) program. When SIDE = 'L' or 'l' then
|
||||
//> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
|
||||
//> then LDA must be at least max( 1, n ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] B
|
||||
//> \verbatim
|
||||
//> B is DOUBLE PRECISION array, dimension ( LDB, N )
|
||||
//> Before entry, the leading m by n part of the array B must
|
||||
//> contain the matrix B, and on exit is overwritten by the
|
||||
//> transformed matrix.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDB
|
||||
//> \verbatim
|
||||
//> LDB is INTEGER
|
||||
//> On entry, LDB specifies the first dimension of B as declared
|
||||
//> in the calling (sub) program. LDB must be at least
|
||||
//> max( 1, m ).
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup double_blas_level3
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> Level 3 Blas routine.
|
||||
//>
|
||||
//> -- Written on 8-February-1989.
|
||||
//> Jack Dongarra, Argonne National Laboratory.
|
||||
//> Iain Duff, AERE Harwell.
|
||||
//> Jeremy Du Croz, Numerical Algorithms Group Ltd.
|
||||
//> Sven Hammarling, Numerical Algorithms Group Ltd.
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dtrmm_(char *side, char *uplo, char *transa, char *diag,
|
||||
int *m, int *n, double *alpha, double *a, int *lda, double *b, int *
|
||||
ldb)
|
||||
{
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, b_dim1, b_offset, i__1, i__2, i__3;
|
||||
|
||||
// Local variables
|
||||
int i__, j, k, info;
|
||||
double temp;
|
||||
int lside;
|
||||
extern int lsame_(char *, char *);
|
||||
int nrowa;
|
||||
int upper;
|
||||
extern /* Subroutine */ int xerbla_(char *, int *);
|
||||
int nounit;
|
||||
|
||||
//
|
||||
// -- Reference BLAS level3 routine (version 3.7.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
//
|
||||
// Test the input parameters.
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
b_dim1 = *ldb;
|
||||
b_offset = 1 + b_dim1;
|
||||
b -= b_offset;
|
||||
|
||||
// Function Body
|
||||
lside = lsame_(side, "L");
|
||||
if (lside) {
|
||||
nrowa = *m;
|
||||
} else {
|
||||
nrowa = *n;
|
||||
}
|
||||
nounit = lsame_(diag, "N");
|
||||
upper = lsame_(uplo, "U");
|
||||
info = 0;
|
||||
if (! lside && ! lsame_(side, "R")) {
|
||||
info = 1;
|
||||
} else if (! upper && ! lsame_(uplo, "L")) {
|
||||
info = 2;
|
||||
} else if (! lsame_(transa, "N") && ! lsame_(transa, "T") && ! lsame_(
|
||||
transa, "C")) {
|
||||
info = 3;
|
||||
} else if (! lsame_(diag, "U") && ! lsame_(diag, "N")) {
|
||||
info = 4;
|
||||
} else if (*m < 0) {
|
||||
info = 5;
|
||||
} else if (*n < 0) {
|
||||
info = 6;
|
||||
} else if (*lda < max(1,nrowa)) {
|
||||
info = 9;
|
||||
} else if (*ldb < max(1,*m)) {
|
||||
info = 11;
|
||||
}
|
||||
if (info != 0) {
|
||||
xerbla_("DTRMM ", &info);
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible.
|
||||
//
|
||||
if (*m == 0 || *n == 0) {
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// And when alpha.eq.zero.
|
||||
//
|
||||
if (*alpha == 0.) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
b[i__ + j * b_dim1] = 0.;
|
||||
// L10:
|
||||
}
|
||||
// L20:
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Start the operations.
|
||||
//
|
||||
if (lside) {
|
||||
if (lsame_(transa, "N")) {
|
||||
//
|
||||
// Form B := alpha*A*B.
|
||||
//
|
||||
if (upper) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (k = 1; k <= i__2; ++k) {
|
||||
if (b[k + j * b_dim1] != 0.) {
|
||||
temp = *alpha * b[k + j * b_dim1];
|
||||
i__3 = k - 1;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
b[i__ + j * b_dim1] += temp * a[i__ + k *
|
||||
a_dim1];
|
||||
// L30:
|
||||
}
|
||||
if (nounit) {
|
||||
temp *= a[k + k * a_dim1];
|
||||
}
|
||||
b[k + j * b_dim1] = temp;
|
||||
}
|
||||
// L40:
|
||||
}
|
||||
// L50:
|
||||
}
|
||||
} else {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
for (k = *m; k >= 1; --k) {
|
||||
if (b[k + j * b_dim1] != 0.) {
|
||||
temp = *alpha * b[k + j * b_dim1];
|
||||
b[k + j * b_dim1] = temp;
|
||||
if (nounit) {
|
||||
b[k + j * b_dim1] *= a[k + k * a_dim1];
|
||||
}
|
||||
i__2 = *m;
|
||||
for (i__ = k + 1; i__ <= i__2; ++i__) {
|
||||
b[i__ + j * b_dim1] += temp * a[i__ + k *
|
||||
a_dim1];
|
||||
// L60:
|
||||
}
|
||||
}
|
||||
// L70:
|
||||
}
|
||||
// L80:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form B := alpha*A**T*B.
|
||||
//
|
||||
if (upper) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
for (i__ = *m; i__ >= 1; --i__) {
|
||||
temp = b[i__ + j * b_dim1];
|
||||
if (nounit) {
|
||||
temp *= a[i__ + i__ * a_dim1];
|
||||
}
|
||||
i__2 = i__ - 1;
|
||||
for (k = 1; k <= i__2; ++k) {
|
||||
temp += a[k + i__ * a_dim1] * b[k + j * b_dim1];
|
||||
// L90:
|
||||
}
|
||||
b[i__ + j * b_dim1] = *alpha * temp;
|
||||
// L100:
|
||||
}
|
||||
// L110:
|
||||
}
|
||||
} else {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp = b[i__ + j * b_dim1];
|
||||
if (nounit) {
|
||||
temp *= a[i__ + i__ * a_dim1];
|
||||
}
|
||||
i__3 = *m;
|
||||
for (k = i__ + 1; k <= i__3; ++k) {
|
||||
temp += a[k + i__ * a_dim1] * b[k + j * b_dim1];
|
||||
// L120:
|
||||
}
|
||||
b[i__ + j * b_dim1] = *alpha * temp;
|
||||
// L130:
|
||||
}
|
||||
// L140:
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (lsame_(transa, "N")) {
|
||||
//
|
||||
// Form B := alpha*B*A.
|
||||
//
|
||||
if (upper) {
|
||||
for (j = *n; j >= 1; --j) {
|
||||
temp = *alpha;
|
||||
if (nounit) {
|
||||
temp *= a[j + j * a_dim1];
|
||||
}
|
||||
i__1 = *m;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
b[i__ + j * b_dim1] = temp * b[i__ + j * b_dim1];
|
||||
// L150:
|
||||
}
|
||||
i__1 = j - 1;
|
||||
for (k = 1; k <= i__1; ++k) {
|
||||
if (a[k + j * a_dim1] != 0.) {
|
||||
temp = *alpha * a[k + j * a_dim1];
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
b[i__ + j * b_dim1] += temp * b[i__ + k *
|
||||
b_dim1];
|
||||
// L160:
|
||||
}
|
||||
}
|
||||
// L170:
|
||||
}
|
||||
// L180:
|
||||
}
|
||||
} else {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
temp = *alpha;
|
||||
if (nounit) {
|
||||
temp *= a[j + j * a_dim1];
|
||||
}
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
b[i__ + j * b_dim1] = temp * b[i__ + j * b_dim1];
|
||||
// L190:
|
||||
}
|
||||
i__2 = *n;
|
||||
for (k = j + 1; k <= i__2; ++k) {
|
||||
if (a[k + j * a_dim1] != 0.) {
|
||||
temp = *alpha * a[k + j * a_dim1];
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
b[i__ + j * b_dim1] += temp * b[i__ + k *
|
||||
b_dim1];
|
||||
// L200:
|
||||
}
|
||||
}
|
||||
// L210:
|
||||
}
|
||||
// L220:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form B := alpha*B*A**T.
|
||||
//
|
||||
if (upper) {
|
||||
i__1 = *n;
|
||||
for (k = 1; k <= i__1; ++k) {
|
||||
i__2 = k - 1;
|
||||
for (j = 1; j <= i__2; ++j) {
|
||||
if (a[j + k * a_dim1] != 0.) {
|
||||
temp = *alpha * a[j + k * a_dim1];
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
b[i__ + j * b_dim1] += temp * b[i__ + k *
|
||||
b_dim1];
|
||||
// L230:
|
||||
}
|
||||
}
|
||||
// L240:
|
||||
}
|
||||
temp = *alpha;
|
||||
if (nounit) {
|
||||
temp *= a[k + k * a_dim1];
|
||||
}
|
||||
if (temp != 1.) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
b[i__ + k * b_dim1] = temp * b[i__ + k * b_dim1];
|
||||
// L250:
|
||||
}
|
||||
}
|
||||
// L260:
|
||||
}
|
||||
} else {
|
||||
for (k = *n; k >= 1; --k) {
|
||||
i__1 = *n;
|
||||
for (j = k + 1; j <= i__1; ++j) {
|
||||
if (a[j + k * a_dim1] != 0.) {
|
||||
temp = *alpha * a[j + k * a_dim1];
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
b[i__ + j * b_dim1] += temp * b[i__ + k *
|
||||
b_dim1];
|
||||
// L270:
|
||||
}
|
||||
}
|
||||
// L280:
|
||||
}
|
||||
temp = *alpha;
|
||||
if (nounit) {
|
||||
temp *= a[k + k * a_dim1];
|
||||
}
|
||||
if (temp != 1.) {
|
||||
i__1 = *m;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
b[i__ + k * b_dim1] = temp * b[i__ + k * b_dim1];
|
||||
// L290:
|
||||
}
|
||||
}
|
||||
// L300:
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DTRMM .
|
||||
//
|
||||
} // dtrmm_
|
||||
|
||||
Vendored
+396
@@ -0,0 +1,396 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b DTRMV
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE DTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// INTEGER INCX,LDA,N
|
||||
// CHARACTER DIAG,TRANS,UPLO
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// DOUBLE PRECISION A(LDA,*),X(*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> DTRMV performs one of the matrix-vector operations
|
||||
//>
|
||||
//> x := A*x, or x := A**T*x,
|
||||
//>
|
||||
//> where x is an n element vector and A is an n by n unit, or non-unit,
|
||||
//> upper or lower triangular matrix.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] UPLO
|
||||
//> \verbatim
|
||||
//> UPLO is CHARACTER*1
|
||||
//> On entry, UPLO specifies whether the matrix is an upper or
|
||||
//> lower triangular matrix as follows:
|
||||
//>
|
||||
//> UPLO = 'U' or 'u' A is an upper triangular matrix.
|
||||
//>
|
||||
//> UPLO = 'L' or 'l' A is a lower triangular matrix.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TRANS
|
||||
//> \verbatim
|
||||
//> TRANS is CHARACTER*1
|
||||
//> On entry, TRANS specifies the operation to be performed as
|
||||
//> follows:
|
||||
//>
|
||||
//> TRANS = 'N' or 'n' x := A*x.
|
||||
//>
|
||||
//> TRANS = 'T' or 't' x := A**T*x.
|
||||
//>
|
||||
//> TRANS = 'C' or 'c' x := A**T*x.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] DIAG
|
||||
//> \verbatim
|
||||
//> DIAG is CHARACTER*1
|
||||
//> On entry, DIAG specifies whether or not A is unit
|
||||
//> triangular as follows:
|
||||
//>
|
||||
//> DIAG = 'U' or 'u' A is assumed to be unit triangular.
|
||||
//>
|
||||
//> DIAG = 'N' or 'n' A is not assumed to be unit
|
||||
//> triangular.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> On entry, N specifies the order of the matrix A.
|
||||
//> N must be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is DOUBLE PRECISION array, dimension ( LDA, N )
|
||||
//> Before entry with UPLO = 'U' or 'u', the leading n by n
|
||||
//> upper triangular part of the array A must contain the upper
|
||||
//> triangular matrix and the strictly lower triangular part of
|
||||
//> A is not referenced.
|
||||
//> Before entry with UPLO = 'L' or 'l', the leading n by n
|
||||
//> lower triangular part of the array A must contain the lower
|
||||
//> triangular matrix and the strictly upper triangular part of
|
||||
//> A is not referenced.
|
||||
//> Note that when DIAG = 'U' or 'u', the diagonal elements of
|
||||
//> A are not referenced either, but are assumed to be unity.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> On entry, LDA specifies the first dimension of A as declared
|
||||
//> in the calling (sub) program. LDA must be at least
|
||||
//> max( 1, n ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] X
|
||||
//> \verbatim
|
||||
//> X is DOUBLE PRECISION array, dimension at least
|
||||
//> ( 1 + ( n - 1 )*abs( INCX ) ).
|
||||
//> Before entry, the incremented array X must contain the n
|
||||
//> element vector x. On exit, X is overwritten with the
|
||||
//> transformed vector x.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] INCX
|
||||
//> \verbatim
|
||||
//> INCX is INTEGER
|
||||
//> On entry, INCX specifies the increment for the elements of
|
||||
//> X. INCX must not be zero.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup double_blas_level2
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> Level 2 Blas routine.
|
||||
//> The vector and matrix arguments are not referenced when N = 0, or M = 0
|
||||
//>
|
||||
//> -- Written on 22-October-1986.
|
||||
//> Jack Dongarra, Argonne National Lab.
|
||||
//> Jeremy Du Croz, Nag Central Office.
|
||||
//> Sven Hammarling, Nag Central Office.
|
||||
//> Richard Hanson, Sandia National Labs.
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int dtrmv_(char *uplo, char *trans, char *diag, int *n,
|
||||
double *a, int *lda, double *x, int *incx)
|
||||
{
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, i__1, i__2;
|
||||
|
||||
// Local variables
|
||||
int i__, j, ix, jx, kx, info;
|
||||
double temp;
|
||||
extern int lsame_(char *, char *);
|
||||
extern /* Subroutine */ int xerbla_(char *, int *);
|
||||
int nounit;
|
||||
|
||||
//
|
||||
// -- Reference BLAS level2 routine (version 3.7.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
//
|
||||
// Test the input parameters.
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
--x;
|
||||
|
||||
// Function Body
|
||||
info = 0;
|
||||
if (! lsame_(uplo, "U") && ! lsame_(uplo, "L")) {
|
||||
info = 1;
|
||||
} else if (! lsame_(trans, "N") && ! lsame_(trans, "T") && ! lsame_(trans,
|
||||
"C")) {
|
||||
info = 2;
|
||||
} else if (! lsame_(diag, "U") && ! lsame_(diag, "N")) {
|
||||
info = 3;
|
||||
} else if (*n < 0) {
|
||||
info = 4;
|
||||
} else if (*lda < max(1,*n)) {
|
||||
info = 6;
|
||||
} else if (*incx == 0) {
|
||||
info = 8;
|
||||
}
|
||||
if (info != 0) {
|
||||
xerbla_("DTRMV ", &info);
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible.
|
||||
//
|
||||
if (*n == 0) {
|
||||
return 0;
|
||||
}
|
||||
nounit = lsame_(diag, "N");
|
||||
//
|
||||
// Set up the start point in X if the increment is not unity. This
|
||||
// will be ( N - 1 )*INCX too small for descending loops.
|
||||
//
|
||||
if (*incx <= 0) {
|
||||
kx = 1 - (*n - 1) * *incx;
|
||||
} else if (*incx != 1) {
|
||||
kx = 1;
|
||||
}
|
||||
//
|
||||
// Start the operations. In this version the elements of A are
|
||||
// accessed sequentially with one pass through A.
|
||||
//
|
||||
if (lsame_(trans, "N")) {
|
||||
//
|
||||
// Form x := A*x.
|
||||
//
|
||||
if (lsame_(uplo, "U")) {
|
||||
if (*incx == 1) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (x[j] != 0.) {
|
||||
temp = x[j];
|
||||
i__2 = j - 1;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
x[i__] += temp * a[i__ + j * a_dim1];
|
||||
// L10:
|
||||
}
|
||||
if (nounit) {
|
||||
x[j] *= a[j + j * a_dim1];
|
||||
}
|
||||
}
|
||||
// L20:
|
||||
}
|
||||
} else {
|
||||
jx = kx;
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (x[jx] != 0.) {
|
||||
temp = x[jx];
|
||||
ix = kx;
|
||||
i__2 = j - 1;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
x[ix] += temp * a[i__ + j * a_dim1];
|
||||
ix += *incx;
|
||||
// L30:
|
||||
}
|
||||
if (nounit) {
|
||||
x[jx] *= a[j + j * a_dim1];
|
||||
}
|
||||
}
|
||||
jx += *incx;
|
||||
// L40:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (*incx == 1) {
|
||||
for (j = *n; j >= 1; --j) {
|
||||
if (x[j] != 0.) {
|
||||
temp = x[j];
|
||||
i__1 = j + 1;
|
||||
for (i__ = *n; i__ >= i__1; --i__) {
|
||||
x[i__] += temp * a[i__ + j * a_dim1];
|
||||
// L50:
|
||||
}
|
||||
if (nounit) {
|
||||
x[j] *= a[j + j * a_dim1];
|
||||
}
|
||||
}
|
||||
// L60:
|
||||
}
|
||||
} else {
|
||||
kx += (*n - 1) * *incx;
|
||||
jx = kx;
|
||||
for (j = *n; j >= 1; --j) {
|
||||
if (x[jx] != 0.) {
|
||||
temp = x[jx];
|
||||
ix = kx;
|
||||
i__1 = j + 1;
|
||||
for (i__ = *n; i__ >= i__1; --i__) {
|
||||
x[ix] += temp * a[i__ + j * a_dim1];
|
||||
ix -= *incx;
|
||||
// L70:
|
||||
}
|
||||
if (nounit) {
|
||||
x[jx] *= a[j + j * a_dim1];
|
||||
}
|
||||
}
|
||||
jx -= *incx;
|
||||
// L80:
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form x := A**T*x.
|
||||
//
|
||||
if (lsame_(uplo, "U")) {
|
||||
if (*incx == 1) {
|
||||
for (j = *n; j >= 1; --j) {
|
||||
temp = x[j];
|
||||
if (nounit) {
|
||||
temp *= a[j + j * a_dim1];
|
||||
}
|
||||
for (i__ = j - 1; i__ >= 1; --i__) {
|
||||
temp += a[i__ + j * a_dim1] * x[i__];
|
||||
// L90:
|
||||
}
|
||||
x[j] = temp;
|
||||
// L100:
|
||||
}
|
||||
} else {
|
||||
jx = kx + (*n - 1) * *incx;
|
||||
for (j = *n; j >= 1; --j) {
|
||||
temp = x[jx];
|
||||
ix = jx;
|
||||
if (nounit) {
|
||||
temp *= a[j + j * a_dim1];
|
||||
}
|
||||
for (i__ = j - 1; i__ >= 1; --i__) {
|
||||
ix -= *incx;
|
||||
temp += a[i__ + j * a_dim1] * x[ix];
|
||||
// L110:
|
||||
}
|
||||
x[jx] = temp;
|
||||
jx -= *incx;
|
||||
// L120:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (*incx == 1) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
temp = x[j];
|
||||
if (nounit) {
|
||||
temp *= a[j + j * a_dim1];
|
||||
}
|
||||
i__2 = *n;
|
||||
for (i__ = j + 1; i__ <= i__2; ++i__) {
|
||||
temp += a[i__ + j * a_dim1] * x[i__];
|
||||
// L130:
|
||||
}
|
||||
x[j] = temp;
|
||||
// L140:
|
||||
}
|
||||
} else {
|
||||
jx = kx;
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
temp = x[jx];
|
||||
ix = jx;
|
||||
if (nounit) {
|
||||
temp *= a[j + j * a_dim1];
|
||||
}
|
||||
i__2 = *n;
|
||||
for (i__ = j + 1; i__ <= i__2; ++i__) {
|
||||
ix += *incx;
|
||||
temp += a[i__ + j * a_dim1] * x[ix];
|
||||
// L150:
|
||||
}
|
||||
x[jx] = temp;
|
||||
jx += *incx;
|
||||
// L160:
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of DTRMV .
|
||||
//
|
||||
} // dtrmv_
|
||||
|
||||
Vendored
+1334
File diff suppressed because it is too large
Load Diff
Vendored
+444
@@ -0,0 +1,444 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b SGEMM
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE SGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// REAL ALPHA,BETA
|
||||
// INTEGER K,LDA,LDB,LDC,M,N
|
||||
// CHARACTER TRANSA,TRANSB
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// REAL A(LDA,*),B(LDB,*),C(LDC,*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> SGEMM performs one of the matrix-matrix operations
|
||||
//>
|
||||
//> C := alpha*op( A )*op( B ) + beta*C,
|
||||
//>
|
||||
//> where op( X ) is one of
|
||||
//>
|
||||
//> op( X ) = X or op( X ) = X**T,
|
||||
//>
|
||||
//> alpha and beta are scalars, and A, B and C are matrices, with op( A )
|
||||
//> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] TRANSA
|
||||
//> \verbatim
|
||||
//> TRANSA is CHARACTER*1
|
||||
//> On entry, TRANSA specifies the form of op( A ) to be used in
|
||||
//> the matrix multiplication as follows:
|
||||
//>
|
||||
//> TRANSA = 'N' or 'n', op( A ) = A.
|
||||
//>
|
||||
//> TRANSA = 'T' or 't', op( A ) = A**T.
|
||||
//>
|
||||
//> TRANSA = 'C' or 'c', op( A ) = A**T.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TRANSB
|
||||
//> \verbatim
|
||||
//> TRANSB is CHARACTER*1
|
||||
//> On entry, TRANSB specifies the form of op( B ) to be used in
|
||||
//> the matrix multiplication as follows:
|
||||
//>
|
||||
//> TRANSB = 'N' or 'n', op( B ) = B.
|
||||
//>
|
||||
//> TRANSB = 'T' or 't', op( B ) = B**T.
|
||||
//>
|
||||
//> TRANSB = 'C' or 'c', op( B ) = B**T.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> On entry, M specifies the number of rows of the matrix
|
||||
//> op( A ) and of the matrix C. M must be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> On entry, N specifies the number of columns of the matrix
|
||||
//> op( B ) and the number of columns of the matrix C. N must be
|
||||
//> at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] K
|
||||
//> \verbatim
|
||||
//> K is INTEGER
|
||||
//> On entry, K specifies the number of columns of the matrix
|
||||
//> op( A ) and the number of rows of the matrix op( B ). K must
|
||||
//> be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] ALPHA
|
||||
//> \verbatim
|
||||
//> ALPHA is REAL
|
||||
//> On entry, ALPHA specifies the scalar alpha.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is REAL array, dimension ( LDA, ka ), where ka is
|
||||
//> k when TRANSA = 'N' or 'n', and is m otherwise.
|
||||
//> Before entry with TRANSA = 'N' or 'n', the leading m by k
|
||||
//> part of the array A must contain the matrix A, otherwise
|
||||
//> the leading k by m part of the array A must contain the
|
||||
//> matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> On entry, LDA specifies the first dimension of A as declared
|
||||
//> in the calling (sub) program. When TRANSA = 'N' or 'n' then
|
||||
//> LDA must be at least max( 1, m ), otherwise LDA must be at
|
||||
//> least max( 1, k ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] B
|
||||
//> \verbatim
|
||||
//> B is REAL array, dimension ( LDB, kb ), where kb is
|
||||
//> n when TRANSB = 'N' or 'n', and is k otherwise.
|
||||
//> Before entry with TRANSB = 'N' or 'n', the leading k by n
|
||||
//> part of the array B must contain the matrix B, otherwise
|
||||
//> the leading n by k part of the array B must contain the
|
||||
//> matrix B.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDB
|
||||
//> \verbatim
|
||||
//> LDB is INTEGER
|
||||
//> On entry, LDB specifies the first dimension of B as declared
|
||||
//> in the calling (sub) program. When TRANSB = 'N' or 'n' then
|
||||
//> LDB must be at least max( 1, k ), otherwise LDB must be at
|
||||
//> least max( 1, n ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] BETA
|
||||
//> \verbatim
|
||||
//> BETA is REAL
|
||||
//> On entry, BETA specifies the scalar beta. When BETA is
|
||||
//> supplied as zero then C need not be set on input.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] C
|
||||
//> \verbatim
|
||||
//> C is REAL array, dimension ( LDC, N )
|
||||
//> Before entry, the leading m by n part of the array C must
|
||||
//> contain the matrix C, except when beta is zero, in which
|
||||
//> case C need not be set on entry.
|
||||
//> On exit, the array C is overwritten by the m by n matrix
|
||||
//> ( alpha*op( A )*op( B ) + beta*C ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDC
|
||||
//> \verbatim
|
||||
//> LDC is INTEGER
|
||||
//> On entry, LDC specifies the first dimension of C as declared
|
||||
//> in the calling (sub) program. LDC must be at least
|
||||
//> max( 1, m ).
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup single_blas_level3
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> Level 3 Blas routine.
|
||||
//>
|
||||
//> -- Written on 8-February-1989.
|
||||
//> Jack Dongarra, Argonne National Laboratory.
|
||||
//> Iain Duff, AERE Harwell.
|
||||
//> Jeremy Du Croz, Numerical Algorithms Group Ltd.
|
||||
//> Sven Hammarling, Numerical Algorithms Group Ltd.
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int sgemm_(char *transa, char *transb, int *m, int *n, int *
|
||||
k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta,
|
||||
float *c__, int *ldc)
|
||||
{
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, b_dim1, b_offset, c_dim1, c_offset, i__1, i__2,
|
||||
i__3;
|
||||
|
||||
// Local variables
|
||||
int i__, j, l, info;
|
||||
int nota, notb;
|
||||
float temp;
|
||||
int ncola;
|
||||
extern int lsame_(char *, char *);
|
||||
int nrowa, nrowb;
|
||||
extern /* Subroutine */ int xerbla_(char *, int *);
|
||||
|
||||
//
|
||||
// -- Reference BLAS level3 routine (version 3.7.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
//
|
||||
// Set NOTA and NOTB as true if A and B respectively are not
|
||||
// transposed and set NROWA, NCOLA and NROWB as the number of rows
|
||||
// and columns of A and the number of rows of B respectively.
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
b_dim1 = *ldb;
|
||||
b_offset = 1 + b_dim1;
|
||||
b -= b_offset;
|
||||
c_dim1 = *ldc;
|
||||
c_offset = 1 + c_dim1;
|
||||
c__ -= c_offset;
|
||||
|
||||
// Function Body
|
||||
nota = lsame_(transa, "N");
|
||||
notb = lsame_(transb, "N");
|
||||
if (nota) {
|
||||
nrowa = *m;
|
||||
ncola = *k;
|
||||
} else {
|
||||
nrowa = *k;
|
||||
ncola = *m;
|
||||
}
|
||||
if (notb) {
|
||||
nrowb = *k;
|
||||
} else {
|
||||
nrowb = *n;
|
||||
}
|
||||
//
|
||||
// Test the input parameters.
|
||||
//
|
||||
info = 0;
|
||||
if (! nota && ! lsame_(transa, "C") && ! lsame_(transa, "T")) {
|
||||
info = 1;
|
||||
} else if (! notb && ! lsame_(transb, "C") && ! lsame_(transb, "T")) {
|
||||
info = 2;
|
||||
} else if (*m < 0) {
|
||||
info = 3;
|
||||
} else if (*n < 0) {
|
||||
info = 4;
|
||||
} else if (*k < 0) {
|
||||
info = 5;
|
||||
} else if (*lda < max(1,nrowa)) {
|
||||
info = 8;
|
||||
} else if (*ldb < max(1,nrowb)) {
|
||||
info = 10;
|
||||
} else if (*ldc < max(1,*m)) {
|
||||
info = 13;
|
||||
}
|
||||
if (info != 0) {
|
||||
xerbla_("SGEMM ", &info);
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible.
|
||||
//
|
||||
if (*m == 0 || *n == 0 || (*alpha == 0.f || *k == 0) && *beta == 1.f) {
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// And if alpha.eq.zero.
|
||||
//
|
||||
if (*alpha == 0.f) {
|
||||
if (*beta == 0.f) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = 0.f;
|
||||
// L10:
|
||||
}
|
||||
// L20:
|
||||
}
|
||||
} else {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
|
||||
// L30:
|
||||
}
|
||||
// L40:
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Start the operations.
|
||||
//
|
||||
if (notb) {
|
||||
if (nota) {
|
||||
//
|
||||
// Form C := alpha*A*B + beta*C.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (*beta == 0.f) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = 0.f;
|
||||
// L50:
|
||||
}
|
||||
} else if (*beta != 1.f) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
|
||||
// L60:
|
||||
}
|
||||
}
|
||||
i__2 = *k;
|
||||
for (l = 1; l <= i__2; ++l) {
|
||||
temp = *alpha * b[l + j * b_dim1];
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
c__[i__ + j * c_dim1] += temp * a[i__ + l * a_dim1];
|
||||
// L70:
|
||||
}
|
||||
// L80:
|
||||
}
|
||||
// L90:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A**T*B + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp = 0.f;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
temp += a[l + i__ * a_dim1] * b[l + j * b_dim1];
|
||||
// L100:
|
||||
}
|
||||
if (*beta == 0.f) {
|
||||
c__[i__ + j * c_dim1] = *alpha * temp;
|
||||
} else {
|
||||
c__[i__ + j * c_dim1] = *alpha * temp + *beta * c__[
|
||||
i__ + j * c_dim1];
|
||||
}
|
||||
// L110:
|
||||
}
|
||||
// L120:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (nota) {
|
||||
//
|
||||
// Form C := alpha*A*B**T + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (*beta == 0.f) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = 0.f;
|
||||
// L130:
|
||||
}
|
||||
} else if (*beta != 1.f) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
c__[i__ + j * c_dim1] = *beta * c__[i__ + j * c_dim1];
|
||||
// L140:
|
||||
}
|
||||
}
|
||||
i__2 = *k;
|
||||
for (l = 1; l <= i__2; ++l) {
|
||||
temp = *alpha * b[j + l * b_dim1];
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
c__[i__ + j * c_dim1] += temp * a[i__ + l * a_dim1];
|
||||
// L150:
|
||||
}
|
||||
// L160:
|
||||
}
|
||||
// L170:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A**T*B**T + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp = 0.f;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
temp += a[l + i__ * a_dim1] * b[j + l * b_dim1];
|
||||
// L180:
|
||||
}
|
||||
if (*beta == 0.f) {
|
||||
c__[i__ + j * c_dim1] = *alpha * temp;
|
||||
} else {
|
||||
c__[i__ + j * c_dim1] = *alpha * temp + *beta * c__[
|
||||
i__ + j * c_dim1];
|
||||
}
|
||||
// L190:
|
||||
}
|
||||
// L200:
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of SGEMM .
|
||||
//
|
||||
} // sgemm_
|
||||
|
||||
Vendored
+752
@@ -0,0 +1,752 @@
|
||||
/* -- translated by f2c (version 20201020 (for_lapack)). -- */
|
||||
|
||||
#include "f2c.h"
|
||||
|
||||
//> \brief \b ZGEMM
|
||||
//
|
||||
// =========== DOCUMENTATION ===========
|
||||
//
|
||||
// Online html documentation available at
|
||||
// http://www.netlib.org/lapack/explore-html/
|
||||
//
|
||||
// Definition:
|
||||
// ===========
|
||||
//
|
||||
// SUBROUTINE ZGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// COMPLEX*16 ALPHA,BETA
|
||||
// INTEGER K,LDA,LDB,LDC,M,N
|
||||
// CHARACTER TRANSA,TRANSB
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
|
||||
// ..
|
||||
//
|
||||
//
|
||||
//> \par Purpose:
|
||||
// =============
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> ZGEMM performs one of the matrix-matrix operations
|
||||
//>
|
||||
//> C := alpha*op( A )*op( B ) + beta*C,
|
||||
//>
|
||||
//> where op( X ) is one of
|
||||
//>
|
||||
//> op( X ) = X or op( X ) = X**T or op( X ) = X**H,
|
||||
//>
|
||||
//> alpha and beta are scalars, and A, B and C are matrices, with op( A )
|
||||
//> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
|
||||
//> \endverbatim
|
||||
//
|
||||
// Arguments:
|
||||
// ==========
|
||||
//
|
||||
//> \param[in] TRANSA
|
||||
//> \verbatim
|
||||
//> TRANSA is CHARACTER*1
|
||||
//> On entry, TRANSA specifies the form of op( A ) to be used in
|
||||
//> the matrix multiplication as follows:
|
||||
//>
|
||||
//> TRANSA = 'N' or 'n', op( A ) = A.
|
||||
//>
|
||||
//> TRANSA = 'T' or 't', op( A ) = A**T.
|
||||
//>
|
||||
//> TRANSA = 'C' or 'c', op( A ) = A**H.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] TRANSB
|
||||
//> \verbatim
|
||||
//> TRANSB is CHARACTER*1
|
||||
//> On entry, TRANSB specifies the form of op( B ) to be used in
|
||||
//> the matrix multiplication as follows:
|
||||
//>
|
||||
//> TRANSB = 'N' or 'n', op( B ) = B.
|
||||
//>
|
||||
//> TRANSB = 'T' or 't', op( B ) = B**T.
|
||||
//>
|
||||
//> TRANSB = 'C' or 'c', op( B ) = B**H.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] M
|
||||
//> \verbatim
|
||||
//> M is INTEGER
|
||||
//> On entry, M specifies the number of rows of the matrix
|
||||
//> op( A ) and of the matrix C. M must be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] N
|
||||
//> \verbatim
|
||||
//> N is INTEGER
|
||||
//> On entry, N specifies the number of columns of the matrix
|
||||
//> op( B ) and the number of columns of the matrix C. N must be
|
||||
//> at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] K
|
||||
//> \verbatim
|
||||
//> K is INTEGER
|
||||
//> On entry, K specifies the number of columns of the matrix
|
||||
//> op( A ) and the number of rows of the matrix op( B ). K must
|
||||
//> be at least zero.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] ALPHA
|
||||
//> \verbatim
|
||||
//> ALPHA is COMPLEX*16
|
||||
//> On entry, ALPHA specifies the scalar alpha.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] A
|
||||
//> \verbatim
|
||||
//> A is COMPLEX*16 array, dimension ( LDA, ka ), where ka is
|
||||
//> k when TRANSA = 'N' or 'n', and is m otherwise.
|
||||
//> Before entry with TRANSA = 'N' or 'n', the leading m by k
|
||||
//> part of the array A must contain the matrix A, otherwise
|
||||
//> the leading k by m part of the array A must contain the
|
||||
//> matrix A.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDA
|
||||
//> \verbatim
|
||||
//> LDA is INTEGER
|
||||
//> On entry, LDA specifies the first dimension of A as declared
|
||||
//> in the calling (sub) program. When TRANSA = 'N' or 'n' then
|
||||
//> LDA must be at least max( 1, m ), otherwise LDA must be at
|
||||
//> least max( 1, k ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] B
|
||||
//> \verbatim
|
||||
//> B is COMPLEX*16 array, dimension ( LDB, kb ), where kb is
|
||||
//> n when TRANSB = 'N' or 'n', and is k otherwise.
|
||||
//> Before entry with TRANSB = 'N' or 'n', the leading k by n
|
||||
//> part of the array B must contain the matrix B, otherwise
|
||||
//> the leading n by k part of the array B must contain the
|
||||
//> matrix B.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDB
|
||||
//> \verbatim
|
||||
//> LDB is INTEGER
|
||||
//> On entry, LDB specifies the first dimension of B as declared
|
||||
//> in the calling (sub) program. When TRANSB = 'N' or 'n' then
|
||||
//> LDB must be at least max( 1, k ), otherwise LDB must be at
|
||||
//> least max( 1, n ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] BETA
|
||||
//> \verbatim
|
||||
//> BETA is COMPLEX*16
|
||||
//> On entry, BETA specifies the scalar beta. When BETA is
|
||||
//> supplied as zero then C need not be set on input.
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in,out] C
|
||||
//> \verbatim
|
||||
//> C is COMPLEX*16 array, dimension ( LDC, N )
|
||||
//> Before entry, the leading m by n part of the array C must
|
||||
//> contain the matrix C, except when beta is zero, in which
|
||||
//> case C need not be set on entry.
|
||||
//> On exit, the array C is overwritten by the m by n matrix
|
||||
//> ( alpha*op( A )*op( B ) + beta*C ).
|
||||
//> \endverbatim
|
||||
//>
|
||||
//> \param[in] LDC
|
||||
//> \verbatim
|
||||
//> LDC is INTEGER
|
||||
//> On entry, LDC specifies the first dimension of C as declared
|
||||
//> in the calling (sub) program. LDC must be at least
|
||||
//> max( 1, m ).
|
||||
//> \endverbatim
|
||||
//
|
||||
// Authors:
|
||||
// ========
|
||||
//
|
||||
//> \author Univ. of Tennessee
|
||||
//> \author Univ. of California Berkeley
|
||||
//> \author Univ. of Colorado Denver
|
||||
//> \author NAG Ltd.
|
||||
//
|
||||
//> \date December 2016
|
||||
//
|
||||
//> \ingroup complex16_blas_level3
|
||||
//
|
||||
//> \par Further Details:
|
||||
// =====================
|
||||
//>
|
||||
//> \verbatim
|
||||
//>
|
||||
//> Level 3 Blas routine.
|
||||
//>
|
||||
//> -- Written on 8-February-1989.
|
||||
//> Jack Dongarra, Argonne National Laboratory.
|
||||
//> Iain Duff, AERE Harwell.
|
||||
//> Jeremy Du Croz, Numerical Algorithms Group Ltd.
|
||||
//> Sven Hammarling, Numerical Algorithms Group Ltd.
|
||||
//> \endverbatim
|
||||
//>
|
||||
// =====================================================================
|
||||
/* Subroutine */ int zgemm_(char *transa, char *transb, int *m, int *n, int *
|
||||
k, doublecomplex *alpha, doublecomplex *a, int *lda, doublecomplex *b,
|
||||
int *ldb, doublecomplex *beta, doublecomplex *c__, int *ldc)
|
||||
{
|
||||
// Table of constant values
|
||||
doublecomplex c_b1 = {1.,0.};
|
||||
doublecomplex c_b2 = {0.,0.};
|
||||
|
||||
// System generated locals
|
||||
int a_dim1, a_offset, b_dim1, b_offset, c_dim1, c_offset, i__1, i__2,
|
||||
i__3, i__4, i__5, i__6;
|
||||
doublecomplex z__1, z__2, z__3, z__4;
|
||||
|
||||
// Local variables
|
||||
int i__, j, l, info;
|
||||
int nota, notb;
|
||||
doublecomplex temp;
|
||||
int conja, conjb;
|
||||
int ncola;
|
||||
extern int lsame_(char *, char *);
|
||||
int nrowa, nrowb;
|
||||
extern /* Subroutine */ int xerbla_(char *, int *);
|
||||
|
||||
//
|
||||
// -- Reference BLAS level3 routine (version 3.7.0) --
|
||||
// -- Reference BLAS is a software package provided by Univ. of Tennessee, --
|
||||
// -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
|
||||
// December 2016
|
||||
//
|
||||
// .. Scalar Arguments ..
|
||||
// ..
|
||||
// .. Array Arguments ..
|
||||
// ..
|
||||
//
|
||||
// =====================================================================
|
||||
//
|
||||
// .. External Functions ..
|
||||
// ..
|
||||
// .. External Subroutines ..
|
||||
// ..
|
||||
// .. Intrinsic Functions ..
|
||||
// ..
|
||||
// .. Local Scalars ..
|
||||
// ..
|
||||
// .. Parameters ..
|
||||
// ..
|
||||
//
|
||||
// Set NOTA and NOTB as true if A and B respectively are not
|
||||
// conjugated or transposed, set CONJA and CONJB as true if A and
|
||||
// B respectively are to be transposed but not conjugated and set
|
||||
// NROWA, NCOLA and NROWB as the number of rows and columns of A
|
||||
// and the number of rows of B respectively.
|
||||
//
|
||||
// Parameter adjustments
|
||||
a_dim1 = *lda;
|
||||
a_offset = 1 + a_dim1;
|
||||
a -= a_offset;
|
||||
b_dim1 = *ldb;
|
||||
b_offset = 1 + b_dim1;
|
||||
b -= b_offset;
|
||||
c_dim1 = *ldc;
|
||||
c_offset = 1 + c_dim1;
|
||||
c__ -= c_offset;
|
||||
|
||||
// Function Body
|
||||
nota = lsame_(transa, "N");
|
||||
notb = lsame_(transb, "N");
|
||||
conja = lsame_(transa, "C");
|
||||
conjb = lsame_(transb, "C");
|
||||
if (nota) {
|
||||
nrowa = *m;
|
||||
ncola = *k;
|
||||
} else {
|
||||
nrowa = *k;
|
||||
ncola = *m;
|
||||
}
|
||||
if (notb) {
|
||||
nrowb = *k;
|
||||
} else {
|
||||
nrowb = *n;
|
||||
}
|
||||
//
|
||||
// Test the input parameters.
|
||||
//
|
||||
info = 0;
|
||||
if (! nota && ! conja && ! lsame_(transa, "T")) {
|
||||
info = 1;
|
||||
} else if (! notb && ! conjb && ! lsame_(transb, "T")) {
|
||||
info = 2;
|
||||
} else if (*m < 0) {
|
||||
info = 3;
|
||||
} else if (*n < 0) {
|
||||
info = 4;
|
||||
} else if (*k < 0) {
|
||||
info = 5;
|
||||
} else if (*lda < max(1,nrowa)) {
|
||||
info = 8;
|
||||
} else if (*ldb < max(1,nrowb)) {
|
||||
info = 10;
|
||||
} else if (*ldc < max(1,*m)) {
|
||||
info = 13;
|
||||
}
|
||||
if (info != 0) {
|
||||
xerbla_("ZGEMM ", &info);
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Quick return if possible.
|
||||
//
|
||||
if (*m == 0 || *n == 0 || (alpha->r == 0. && alpha->i == 0. || *k == 0) &&
|
||||
(beta->r == 1. && beta->i == 0.)) {
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// And when alpha.eq.zero.
|
||||
//
|
||||
if (alpha->r == 0. && alpha->i == 0.) {
|
||||
if (beta->r == 0. && beta->i == 0.) {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
c__[i__3].r = 0., c__[i__3].i = 0.;
|
||||
// L10:
|
||||
}
|
||||
// L20:
|
||||
}
|
||||
} else {
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
z__1.r = beta->r * c__[i__4].r - beta->i * c__[i__4].i,
|
||||
z__1.i = beta->r * c__[i__4].i + beta->i * c__[
|
||||
i__4].r;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
// L30:
|
||||
}
|
||||
// L40:
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
// Start the operations.
|
||||
//
|
||||
if (notb) {
|
||||
if (nota) {
|
||||
//
|
||||
// Form C := alpha*A*B + beta*C.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (beta->r == 0. && beta->i == 0.) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
c__[i__3].r = 0., c__[i__3].i = 0.;
|
||||
// L50:
|
||||
}
|
||||
} else if (beta->r != 1. || beta->i != 0.) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
z__1.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, z__1.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
// L60:
|
||||
}
|
||||
}
|
||||
i__2 = *k;
|
||||
for (l = 1; l <= i__2; ++l) {
|
||||
i__3 = l + j * b_dim1;
|
||||
z__1.r = alpha->r * b[i__3].r - alpha->i * b[i__3].i,
|
||||
z__1.i = alpha->r * b[i__3].i + alpha->i * b[i__3]
|
||||
.r;
|
||||
temp.r = z__1.r, temp.i = z__1.i;
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
i__4 = i__ + j * c_dim1;
|
||||
i__5 = i__ + j * c_dim1;
|
||||
i__6 = i__ + l * a_dim1;
|
||||
z__2.r = temp.r * a[i__6].r - temp.i * a[i__6].i,
|
||||
z__2.i = temp.r * a[i__6].i + temp.i * a[i__6]
|
||||
.r;
|
||||
z__1.r = c__[i__5].r + z__2.r, z__1.i = c__[i__5].i +
|
||||
z__2.i;
|
||||
c__[i__4].r = z__1.r, c__[i__4].i = z__1.i;
|
||||
// L70:
|
||||
}
|
||||
// L80:
|
||||
}
|
||||
// L90:
|
||||
}
|
||||
} else if (conja) {
|
||||
//
|
||||
// Form C := alpha*A**H*B + beta*C.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0., temp.i = 0.;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
d_cnjg(&z__3, &a[l + i__ * a_dim1]);
|
||||
i__4 = l + j * b_dim1;
|
||||
z__2.r = z__3.r * b[i__4].r - z__3.i * b[i__4].i,
|
||||
z__2.i = z__3.r * b[i__4].i + z__3.i * b[i__4]
|
||||
.r;
|
||||
z__1.r = temp.r + z__2.r, z__1.i = temp.i + z__2.i;
|
||||
temp.r = z__1.r, temp.i = z__1.i;
|
||||
// L100:
|
||||
}
|
||||
if (beta->r == 0. && beta->i == 0.) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
z__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, z__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
}
|
||||
// L110:
|
||||
}
|
||||
// L120:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A**T*B + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0., temp.i = 0.;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
i__4 = l + i__ * a_dim1;
|
||||
i__5 = l + j * b_dim1;
|
||||
z__2.r = a[i__4].r * b[i__5].r - a[i__4].i * b[i__5]
|
||||
.i, z__2.i = a[i__4].r * b[i__5].i + a[i__4]
|
||||
.i * b[i__5].r;
|
||||
z__1.r = temp.r + z__2.r, z__1.i = temp.i + z__2.i;
|
||||
temp.r = z__1.r, temp.i = z__1.i;
|
||||
// L130:
|
||||
}
|
||||
if (beta->r == 0. && beta->i == 0.) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
z__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, z__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
}
|
||||
// L140:
|
||||
}
|
||||
// L150:
|
||||
}
|
||||
}
|
||||
} else if (nota) {
|
||||
if (conjb) {
|
||||
//
|
||||
// Form C := alpha*A*B**H + beta*C.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (beta->r == 0. && beta->i == 0.) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
c__[i__3].r = 0., c__[i__3].i = 0.;
|
||||
// L160:
|
||||
}
|
||||
} else if (beta->r != 1. || beta->i != 0.) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
z__1.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, z__1.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
// L170:
|
||||
}
|
||||
}
|
||||
i__2 = *k;
|
||||
for (l = 1; l <= i__2; ++l) {
|
||||
d_cnjg(&z__2, &b[j + l * b_dim1]);
|
||||
z__1.r = alpha->r * z__2.r - alpha->i * z__2.i, z__1.i =
|
||||
alpha->r * z__2.i + alpha->i * z__2.r;
|
||||
temp.r = z__1.r, temp.i = z__1.i;
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
i__4 = i__ + j * c_dim1;
|
||||
i__5 = i__ + j * c_dim1;
|
||||
i__6 = i__ + l * a_dim1;
|
||||
z__2.r = temp.r * a[i__6].r - temp.i * a[i__6].i,
|
||||
z__2.i = temp.r * a[i__6].i + temp.i * a[i__6]
|
||||
.r;
|
||||
z__1.r = c__[i__5].r + z__2.r, z__1.i = c__[i__5].i +
|
||||
z__2.i;
|
||||
c__[i__4].r = z__1.r, c__[i__4].i = z__1.i;
|
||||
// L180:
|
||||
}
|
||||
// L190:
|
||||
}
|
||||
// L200:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A*B**T + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
if (beta->r == 0. && beta->i == 0.) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
c__[i__3].r = 0., c__[i__3].i = 0.;
|
||||
// L210:
|
||||
}
|
||||
} else if (beta->r != 1. || beta->i != 0.) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
z__1.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, z__1.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
// L220:
|
||||
}
|
||||
}
|
||||
i__2 = *k;
|
||||
for (l = 1; l <= i__2; ++l) {
|
||||
i__3 = j + l * b_dim1;
|
||||
z__1.r = alpha->r * b[i__3].r - alpha->i * b[i__3].i,
|
||||
z__1.i = alpha->r * b[i__3].i + alpha->i * b[i__3]
|
||||
.r;
|
||||
temp.r = z__1.r, temp.i = z__1.i;
|
||||
i__3 = *m;
|
||||
for (i__ = 1; i__ <= i__3; ++i__) {
|
||||
i__4 = i__ + j * c_dim1;
|
||||
i__5 = i__ + j * c_dim1;
|
||||
i__6 = i__ + l * a_dim1;
|
||||
z__2.r = temp.r * a[i__6].r - temp.i * a[i__6].i,
|
||||
z__2.i = temp.r * a[i__6].i + temp.i * a[i__6]
|
||||
.r;
|
||||
z__1.r = c__[i__5].r + z__2.r, z__1.i = c__[i__5].i +
|
||||
z__2.i;
|
||||
c__[i__4].r = z__1.r, c__[i__4].i = z__1.i;
|
||||
// L230:
|
||||
}
|
||||
// L240:
|
||||
}
|
||||
// L250:
|
||||
}
|
||||
}
|
||||
} else if (conja) {
|
||||
if (conjb) {
|
||||
//
|
||||
// Form C := alpha*A**H*B**H + beta*C.
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0., temp.i = 0.;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
d_cnjg(&z__3, &a[l + i__ * a_dim1]);
|
||||
d_cnjg(&z__4, &b[j + l * b_dim1]);
|
||||
z__2.r = z__3.r * z__4.r - z__3.i * z__4.i, z__2.i =
|
||||
z__3.r * z__4.i + z__3.i * z__4.r;
|
||||
z__1.r = temp.r + z__2.r, z__1.i = temp.i + z__2.i;
|
||||
temp.r = z__1.r, temp.i = z__1.i;
|
||||
// L260:
|
||||
}
|
||||
if (beta->r == 0. && beta->i == 0.) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
z__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, z__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
}
|
||||
// L270:
|
||||
}
|
||||
// L280:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A**H*B**T + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0., temp.i = 0.;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
d_cnjg(&z__3, &a[l + i__ * a_dim1]);
|
||||
i__4 = j + l * b_dim1;
|
||||
z__2.r = z__3.r * b[i__4].r - z__3.i * b[i__4].i,
|
||||
z__2.i = z__3.r * b[i__4].i + z__3.i * b[i__4]
|
||||
.r;
|
||||
z__1.r = temp.r + z__2.r, z__1.i = temp.i + z__2.i;
|
||||
temp.r = z__1.r, temp.i = z__1.i;
|
||||
// L290:
|
||||
}
|
||||
if (beta->r == 0. && beta->i == 0.) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
z__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, z__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
}
|
||||
// L300:
|
||||
}
|
||||
// L310:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (conjb) {
|
||||
//
|
||||
// Form C := alpha*A**T*B**H + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0., temp.i = 0.;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
i__4 = l + i__ * a_dim1;
|
||||
d_cnjg(&z__3, &b[j + l * b_dim1]);
|
||||
z__2.r = a[i__4].r * z__3.r - a[i__4].i * z__3.i,
|
||||
z__2.i = a[i__4].r * z__3.i + a[i__4].i *
|
||||
z__3.r;
|
||||
z__1.r = temp.r + z__2.r, z__1.i = temp.i + z__2.i;
|
||||
temp.r = z__1.r, temp.i = z__1.i;
|
||||
// L320:
|
||||
}
|
||||
if (beta->r == 0. && beta->i == 0.) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
z__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, z__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
}
|
||||
// L330:
|
||||
}
|
||||
// L340:
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Form C := alpha*A**T*B**T + beta*C
|
||||
//
|
||||
i__1 = *n;
|
||||
for (j = 1; j <= i__1; ++j) {
|
||||
i__2 = *m;
|
||||
for (i__ = 1; i__ <= i__2; ++i__) {
|
||||
temp.r = 0., temp.i = 0.;
|
||||
i__3 = *k;
|
||||
for (l = 1; l <= i__3; ++l) {
|
||||
i__4 = l + i__ * a_dim1;
|
||||
i__5 = j + l * b_dim1;
|
||||
z__2.r = a[i__4].r * b[i__5].r - a[i__4].i * b[i__5]
|
||||
.i, z__2.i = a[i__4].r * b[i__5].i + a[i__4]
|
||||
.i * b[i__5].r;
|
||||
z__1.r = temp.r + z__2.r, z__1.i = temp.i + z__2.i;
|
||||
temp.r = z__1.r, temp.i = z__1.i;
|
||||
// L350:
|
||||
}
|
||||
if (beta->r == 0. && beta->i == 0.) {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__1.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__1.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
} else {
|
||||
i__3 = i__ + j * c_dim1;
|
||||
z__2.r = alpha->r * temp.r - alpha->i * temp.i,
|
||||
z__2.i = alpha->r * temp.i + alpha->i *
|
||||
temp.r;
|
||||
i__4 = i__ + j * c_dim1;
|
||||
z__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4]
|
||||
.i, z__3.i = beta->r * c__[i__4].i + beta->i *
|
||||
c__[i__4].r;
|
||||
z__1.r = z__2.r + z__3.r, z__1.i = z__2.i + z__3.i;
|
||||
c__[i__3].r = z__1.r, c__[i__3].i = z__1.i;
|
||||
}
|
||||
// L360:
|
||||
}
|
||||
// L370:
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
//
|
||||
// End of ZGEMM .
|
||||
//
|
||||
} // zgemm_
|
||||
|
||||
Vendored
+6
-6
@@ -1,9 +1,9 @@
|
||||
# Binaries branch name: ffmpeg/4.x_20211220
|
||||
# Binaries were created for OpenCV: 0e274fc4bed8a64ba4f1c201a21304286e217afc
|
||||
ocv_update(FFMPEG_BINARIES_COMMIT "4d348507d156ec797a88a887cfa7f9129a35afac")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN32 "eece4ec8304188117ffc7d5dfd0fc0ae")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN64 "20deefbfe023c8b8d11a52e5a6527c6a")
|
||||
ocv_update(FFMPEG_FILE_HASH_CMAKE "8862c87496e2e8c375965e1277dee1c7")
|
||||
# Binaries branch name: ffmpeg/5.x_20241121
|
||||
# Binaries were created for OpenCV: ce7c0f0e651dbd7991f2c6a2327f2697f2102296
|
||||
ocv_update(FFMPEG_BINARIES_COMMIT "b2b3a3188ebbe73492ce4554c12b416512a5dec3")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN32 "6e9aa1b8796e9ac19fca4278523c5dff")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN64 "0fe534d69035e3801bc88418611019b4")
|
||||
ocv_update(FFMPEG_FILE_HASH_CMAKE "e09efc33312d1173be8a9446f3b088fe")
|
||||
|
||||
function(download_win_ffmpeg script_var)
|
||||
set(${script_var} "" PARENT_SCOPE)
|
||||
|
||||
Vendored
+202
@@ -0,0 +1,202 @@
|
||||
|
||||
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 [yyyy] [name of copyright owner]
|
||||
|
||||
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.
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
Origin: https://github.com/google/flatbuffers/tree/v23.5.9
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_ALLOCATOR_H_
|
||||
#define FLATBUFFERS_ALLOCATOR_H_
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
// Allocator interface. This is flatbuffers-specific and meant only for
|
||||
// `vector_downward` usage.
|
||||
class Allocator {
|
||||
public:
|
||||
virtual ~Allocator() {}
|
||||
|
||||
// Allocate `size` bytes of memory.
|
||||
virtual uint8_t *allocate(size_t size) = 0;
|
||||
|
||||
// Deallocate `size` bytes of memory at `p` allocated by this allocator.
|
||||
virtual void deallocate(uint8_t *p, size_t size) = 0;
|
||||
|
||||
// Reallocate `new_size` bytes of memory, replacing the old region of size
|
||||
// `old_size` at `p`. In contrast to a normal realloc, this grows downwards,
|
||||
// and is intended specifcally for `vector_downward` use.
|
||||
// `in_use_back` and `in_use_front` indicate how much of `old_size` is
|
||||
// actually in use at each end, and needs to be copied.
|
||||
virtual uint8_t *reallocate_downward(uint8_t *old_p, size_t old_size,
|
||||
size_t new_size, size_t in_use_back,
|
||||
size_t in_use_front) {
|
||||
FLATBUFFERS_ASSERT(new_size > old_size); // vector_downward only grows
|
||||
uint8_t *new_p = allocate(new_size);
|
||||
memcpy_downward(old_p, old_size, new_p, new_size, in_use_back,
|
||||
in_use_front);
|
||||
deallocate(old_p, old_size);
|
||||
return new_p;
|
||||
}
|
||||
|
||||
protected:
|
||||
// Called by `reallocate_downward` to copy memory from `old_p` of `old_size`
|
||||
// to `new_p` of `new_size`. Only memory of size `in_use_front` and
|
||||
// `in_use_back` will be copied from the front and back of the old memory
|
||||
// allocation.
|
||||
void memcpy_downward(uint8_t *old_p, size_t old_size, uint8_t *new_p,
|
||||
size_t new_size, size_t in_use_back,
|
||||
size_t in_use_front) {
|
||||
memcpy(new_p + new_size - in_use_back, old_p + old_size - in_use_back,
|
||||
in_use_back);
|
||||
memcpy(new_p, old_p, in_use_front);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_ALLOCATOR_H_
|
||||
+256
@@ -0,0 +1,256 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_ARRAY_H_
|
||||
#define FLATBUFFERS_ARRAY_H_
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
#include "flatbuffers/stl_emulation.h"
|
||||
#include "flatbuffers/vector.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
// This is used as a helper type for accessing arrays.
|
||||
template<typename T, uint16_t length> class Array {
|
||||
// Array<T> can carry only POD data types (scalars or structs).
|
||||
typedef typename flatbuffers::bool_constant<flatbuffers::is_scalar<T>::value>
|
||||
scalar_tag;
|
||||
typedef
|
||||
typename flatbuffers::conditional<scalar_tag::value, T, const T *>::type
|
||||
IndirectHelperType;
|
||||
|
||||
public:
|
||||
typedef uint16_t size_type;
|
||||
typedef typename IndirectHelper<IndirectHelperType>::return_type return_type;
|
||||
typedef VectorConstIterator<T, return_type, uoffset_t> const_iterator;
|
||||
typedef VectorReverseIterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
// If T is a LE-scalar or a struct (!scalar_tag::value).
|
||||
static FLATBUFFERS_CONSTEXPR bool is_span_observable =
|
||||
(scalar_tag::value && (FLATBUFFERS_LITTLEENDIAN || sizeof(T) == 1)) ||
|
||||
!scalar_tag::value;
|
||||
|
||||
FLATBUFFERS_CONSTEXPR uint16_t size() const { return length; }
|
||||
|
||||
return_type Get(uoffset_t i) const {
|
||||
FLATBUFFERS_ASSERT(i < size());
|
||||
return IndirectHelper<IndirectHelperType>::Read(Data(), i);
|
||||
}
|
||||
|
||||
return_type operator[](uoffset_t i) const { return Get(i); }
|
||||
|
||||
// If this is a Vector of enums, T will be its storage type, not the enum
|
||||
// type. This function makes it convenient to retrieve value with enum
|
||||
// type E.
|
||||
template<typename E> E GetEnum(uoffset_t i) const {
|
||||
return static_cast<E>(Get(i));
|
||||
}
|
||||
|
||||
const_iterator begin() const { return const_iterator(Data(), 0); }
|
||||
const_iterator end() const { return const_iterator(Data(), size()); }
|
||||
|
||||
const_reverse_iterator rbegin() const {
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
const_reverse_iterator rend() const {
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
|
||||
const_iterator cbegin() const { return begin(); }
|
||||
const_iterator cend() const { return end(); }
|
||||
|
||||
const_reverse_iterator crbegin() const { return rbegin(); }
|
||||
const_reverse_iterator crend() const { return rend(); }
|
||||
|
||||
// Get a mutable pointer to elements inside this array.
|
||||
// This method used to mutate arrays of structs followed by a @p Mutate
|
||||
// operation. For primitive types use @p Mutate directly.
|
||||
// @warning Assignments and reads to/from the dereferenced pointer are not
|
||||
// automatically converted to the correct endianness.
|
||||
typename flatbuffers::conditional<scalar_tag::value, void, T *>::type
|
||||
GetMutablePointer(uoffset_t i) const {
|
||||
FLATBUFFERS_ASSERT(i < size());
|
||||
return const_cast<T *>(&data()[i]);
|
||||
}
|
||||
|
||||
// Change elements if you have a non-const pointer to this object.
|
||||
void Mutate(uoffset_t i, const T &val) { MutateImpl(scalar_tag(), i, val); }
|
||||
|
||||
// The raw data in little endian format. Use with care.
|
||||
const uint8_t *Data() const { return data_; }
|
||||
|
||||
uint8_t *Data() { return data_; }
|
||||
|
||||
// Similarly, but typed, much like std::vector::data
|
||||
const T *data() const { return reinterpret_cast<const T *>(Data()); }
|
||||
T *data() { return reinterpret_cast<T *>(Data()); }
|
||||
|
||||
// Copy data from a span with endian conversion.
|
||||
// If this Array and the span overlap, the behavior is undefined.
|
||||
void CopyFromSpan(flatbuffers::span<const T, length> src) {
|
||||
const auto p1 = reinterpret_cast<const uint8_t *>(src.data());
|
||||
const auto p2 = Data();
|
||||
FLATBUFFERS_ASSERT(!(p1 >= p2 && p1 < (p2 + length)) &&
|
||||
!(p2 >= p1 && p2 < (p1 + length)));
|
||||
(void)p1;
|
||||
(void)p2;
|
||||
CopyFromSpanImpl(flatbuffers::bool_constant<is_span_observable>(), src);
|
||||
}
|
||||
|
||||
protected:
|
||||
void MutateImpl(flatbuffers::true_type, uoffset_t i, const T &val) {
|
||||
FLATBUFFERS_ASSERT(i < size());
|
||||
WriteScalar(data() + i, val);
|
||||
}
|
||||
|
||||
void MutateImpl(flatbuffers::false_type, uoffset_t i, const T &val) {
|
||||
*(GetMutablePointer(i)) = val;
|
||||
}
|
||||
|
||||
void CopyFromSpanImpl(flatbuffers::true_type,
|
||||
flatbuffers::span<const T, length> src) {
|
||||
// Use std::memcpy() instead of std::copy() to avoid performance degradation
|
||||
// due to aliasing if T is char or unsigned char.
|
||||
// The size is known at compile time, so memcpy would be inlined.
|
||||
std::memcpy(data(), src.data(), length * sizeof(T));
|
||||
}
|
||||
|
||||
// Copy data from flatbuffers::span with endian conversion.
|
||||
void CopyFromSpanImpl(flatbuffers::false_type,
|
||||
flatbuffers::span<const T, length> src) {
|
||||
for (size_type k = 0; k < length; k++) { Mutate(k, src[k]); }
|
||||
}
|
||||
|
||||
// This class is only used to access pre-existing data. Don't ever
|
||||
// try to construct these manually.
|
||||
// 'constexpr' allows us to use 'size()' at compile time.
|
||||
// @note Must not use 'FLATBUFFERS_CONSTEXPR' here, as const is not allowed on
|
||||
// a constructor.
|
||||
#if defined(__cpp_constexpr)
|
||||
constexpr Array();
|
||||
#else
|
||||
Array();
|
||||
#endif
|
||||
|
||||
uint8_t data_[length * sizeof(T)];
|
||||
|
||||
private:
|
||||
// This class is a pointer. Copying will therefore create an invalid object.
|
||||
// Private and unimplemented copy constructor.
|
||||
Array(const Array &);
|
||||
Array &operator=(const Array &);
|
||||
};
|
||||
|
||||
// Specialization for Array[struct] with access using Offset<void> pointer.
|
||||
// This specialization used by idl_gen_text.cpp.
|
||||
template<typename T, uint16_t length, template<typename> class OffsetT>
|
||||
class Array<OffsetT<T>, length> {
|
||||
static_assert(flatbuffers::is_same<T, void>::value, "unexpected type T");
|
||||
|
||||
public:
|
||||
typedef const void *return_type;
|
||||
typedef uint16_t size_type;
|
||||
|
||||
const uint8_t *Data() const { return data_; }
|
||||
|
||||
// Make idl_gen_text.cpp::PrintContainer happy.
|
||||
return_type operator[](uoffset_t) const {
|
||||
FLATBUFFERS_ASSERT(false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
// This class is only used to access pre-existing data.
|
||||
Array();
|
||||
Array(const Array &);
|
||||
Array &operator=(const Array &);
|
||||
|
||||
uint8_t data_[1];
|
||||
};
|
||||
|
||||
template<class U, uint16_t N>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<U, N> make_span(Array<U, N> &arr)
|
||||
FLATBUFFERS_NOEXCEPT {
|
||||
static_assert(
|
||||
Array<U, N>::is_span_observable,
|
||||
"wrong type U, only plain struct, LE-scalar, or byte types are allowed");
|
||||
return span<U, N>(arr.data(), N);
|
||||
}
|
||||
|
||||
template<class U, uint16_t N>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<const U, N> make_span(
|
||||
const Array<U, N> &arr) FLATBUFFERS_NOEXCEPT {
|
||||
static_assert(
|
||||
Array<U, N>::is_span_observable,
|
||||
"wrong type U, only plain struct, LE-scalar, or byte types are allowed");
|
||||
return span<const U, N>(arr.data(), N);
|
||||
}
|
||||
|
||||
template<class U, uint16_t N>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<uint8_t, sizeof(U) * N>
|
||||
make_bytes_span(Array<U, N> &arr) FLATBUFFERS_NOEXCEPT {
|
||||
static_assert(Array<U, N>::is_span_observable,
|
||||
"internal error, Array<T> might hold only scalars or structs");
|
||||
return span<uint8_t, sizeof(U) * N>(arr.Data(), sizeof(U) * N);
|
||||
}
|
||||
|
||||
template<class U, uint16_t N>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<const uint8_t, sizeof(U) * N>
|
||||
make_bytes_span(const Array<U, N> &arr) FLATBUFFERS_NOEXCEPT {
|
||||
static_assert(Array<U, N>::is_span_observable,
|
||||
"internal error, Array<T> might hold only scalars or structs");
|
||||
return span<const uint8_t, sizeof(U) * N>(arr.Data(), sizeof(U) * N);
|
||||
}
|
||||
|
||||
// Cast a raw T[length] to a raw flatbuffers::Array<T, length>
|
||||
// without endian conversion. Use with care.
|
||||
// TODO: move these Cast-methods to `internal` namespace.
|
||||
template<typename T, uint16_t length>
|
||||
Array<T, length> &CastToArray(T (&arr)[length]) {
|
||||
return *reinterpret_cast<Array<T, length> *>(arr);
|
||||
}
|
||||
|
||||
template<typename T, uint16_t length>
|
||||
const Array<T, length> &CastToArray(const T (&arr)[length]) {
|
||||
return *reinterpret_cast<const Array<T, length> *>(arr);
|
||||
}
|
||||
|
||||
template<typename E, typename T, uint16_t length>
|
||||
Array<E, length> &CastToArrayOfEnum(T (&arr)[length]) {
|
||||
static_assert(sizeof(E) == sizeof(T), "invalid enum type E");
|
||||
return *reinterpret_cast<Array<E, length> *>(arr);
|
||||
}
|
||||
|
||||
template<typename E, typename T, uint16_t length>
|
||||
const Array<E, length> &CastToArrayOfEnum(const T (&arr)[length]) {
|
||||
static_assert(sizeof(E) == sizeof(T), "invalid enum type E");
|
||||
return *reinterpret_cast<const Array<E, length> *>(arr);
|
||||
}
|
||||
|
||||
template<typename T, uint16_t length>
|
||||
bool operator==(const Array<T, length> &lhs,
|
||||
const Array<T, length> &rhs) noexcept {
|
||||
return std::addressof(lhs) == std::addressof(rhs) ||
|
||||
(lhs.size() == rhs.size() &&
|
||||
std::memcmp(lhs.Data(), rhs.Data(), rhs.size() * sizeof(T)) == 0);
|
||||
}
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_ARRAY_H_
|
||||
+495
@@ -0,0 +1,495 @@
|
||||
#ifndef FLATBUFFERS_BASE_H_
|
||||
#define FLATBUFFERS_BASE_H_
|
||||
|
||||
// clang-format off
|
||||
|
||||
// If activate should be declared and included first.
|
||||
#if defined(FLATBUFFERS_MEMORY_LEAK_TRACKING) && \
|
||||
defined(_MSC_VER) && defined(_DEBUG)
|
||||
// The _CRTDBG_MAP_ALLOC inside <crtdbg.h> will replace
|
||||
// calloc/free (etc) to its debug version using #define directives.
|
||||
#define _CRTDBG_MAP_ALLOC
|
||||
#include <stdlib.h>
|
||||
#include <crtdbg.h>
|
||||
// Replace operator new by trace-enabled version.
|
||||
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
#if !defined(FLATBUFFERS_ASSERT)
|
||||
#include <assert.h>
|
||||
#define FLATBUFFERS_ASSERT assert
|
||||
#elif defined(FLATBUFFERS_ASSERT_INCLUDE)
|
||||
// Include file with forward declaration
|
||||
#include FLATBUFFERS_ASSERT_INCLUDE
|
||||
#endif
|
||||
|
||||
#ifndef ARDUINO
|
||||
#include <cstdint>
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#if defined(ARDUINO) && !defined(ARDUINOSTL_M_H) && defined(__AVR__)
|
||||
#include <utility.h>
|
||||
#else
|
||||
#include <utility>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
|
||||
#if defined(__unix__) && !defined(FLATBUFFERS_LOCALE_INDEPENDENT)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <android/api-level.h>
|
||||
#endif
|
||||
|
||||
#if defined(__ICCARM__)
|
||||
#include <intrinsics.h>
|
||||
#endif
|
||||
|
||||
// Note the __clang__ check is needed, because clang presents itself
|
||||
// as an older GNUC compiler (4.2).
|
||||
// Clang 3.3 and later implement all of the ISO C++ 2011 standard.
|
||||
// Clang 3.4 and later implement all of the ISO C++ 2014 standard.
|
||||
// http://clang.llvm.org/cxx_status.html
|
||||
|
||||
// Note the MSVC value '__cplusplus' may be incorrect:
|
||||
// The '__cplusplus' predefined macro in the MSVC stuck at the value 199711L,
|
||||
// indicating (erroneously!) that the compiler conformed to the C++98 Standard.
|
||||
// This value should be correct starting from MSVC2017-15.7-Preview-3.
|
||||
// The '__cplusplus' will be valid only if MSVC2017-15.7-P3 and the `/Zc:__cplusplus` switch is set.
|
||||
// Workaround (for details see MSDN):
|
||||
// Use the _MSC_VER and _MSVC_LANG definition instead of the __cplusplus for compatibility.
|
||||
// The _MSVC_LANG macro reports the Standard version regardless of the '/Zc:__cplusplus' switch.
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#define FLATBUFFERS_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
||||
#else
|
||||
#define FLATBUFFERS_GCC 0
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
#define FLATBUFFERS_CLANG (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
||||
#else
|
||||
#define FLATBUFFERS_CLANG 0
|
||||
#endif
|
||||
|
||||
/// @cond FLATBUFFERS_INTERNAL
|
||||
#if __cplusplus <= 199711L && \
|
||||
(!defined(_MSC_VER) || _MSC_VER < 1600) && \
|
||||
(!defined(__GNUC__) || \
|
||||
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ < 40400))
|
||||
#error A C++11 compatible compiler with support for the auto typing is \
|
||||
required for FlatBuffers.
|
||||
#error __cplusplus _MSC_VER __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__
|
||||
#endif
|
||||
|
||||
#if !defined(__clang__) && \
|
||||
defined(__GNUC__) && \
|
||||
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ < 40600)
|
||||
// Backwards compatibility for g++ 4.4, and 4.5 which don't have the nullptr
|
||||
// and constexpr keywords. Note the __clang__ check is needed, because clang
|
||||
// presents itself as an older GNUC compiler.
|
||||
#ifndef nullptr_t
|
||||
const class nullptr_t {
|
||||
public:
|
||||
template<class T> inline operator T*() const { return 0; }
|
||||
private:
|
||||
void operator&() const;
|
||||
} nullptr = {};
|
||||
#endif
|
||||
#ifndef constexpr
|
||||
#define constexpr const
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// The wire format uses a little endian encoding (since that's efficient for
|
||||
// the common platforms).
|
||||
#if defined(__s390x__)
|
||||
#define FLATBUFFERS_LITTLEENDIAN 0
|
||||
#endif // __s390x__
|
||||
#if !defined(FLATBUFFERS_LITTLEENDIAN)
|
||||
#if defined(__GNUC__) || defined(__clang__) || defined(__ICCARM__)
|
||||
#if (defined(__BIG_ENDIAN__) || \
|
||||
(defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
|
||||
#define FLATBUFFERS_LITTLEENDIAN 0
|
||||
#else
|
||||
#define FLATBUFFERS_LITTLEENDIAN 1
|
||||
#endif // __BIG_ENDIAN__
|
||||
#elif defined(_MSC_VER)
|
||||
#if defined(_M_PPC)
|
||||
#define FLATBUFFERS_LITTLEENDIAN 0
|
||||
#else
|
||||
#define FLATBUFFERS_LITTLEENDIAN 1
|
||||
#endif
|
||||
#else
|
||||
#error Unable to determine endianness, define FLATBUFFERS_LITTLEENDIAN.
|
||||
#endif
|
||||
#endif // !defined(FLATBUFFERS_LITTLEENDIAN)
|
||||
|
||||
#define FLATBUFFERS_VERSION_MAJOR 23
|
||||
#define FLATBUFFERS_VERSION_MINOR 5
|
||||
#define FLATBUFFERS_VERSION_REVISION 9
|
||||
#define FLATBUFFERS_STRING_EXPAND(X) #X
|
||||
#define FLATBUFFERS_STRING(X) FLATBUFFERS_STRING_EXPAND(X)
|
||||
namespace flatbuffers {
|
||||
// Returns version as string "MAJOR.MINOR.REVISION".
|
||||
const char* FLATBUFFERS_VERSION();
|
||||
}
|
||||
|
||||
#if (!defined(_MSC_VER) || _MSC_VER > 1600) && \
|
||||
(!defined(__GNUC__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 407)) || \
|
||||
defined(__clang__)
|
||||
#define FLATBUFFERS_FINAL_CLASS final
|
||||
#define FLATBUFFERS_OVERRIDE override
|
||||
#define FLATBUFFERS_EXPLICIT_CPP11 explicit
|
||||
#define FLATBUFFERS_VTABLE_UNDERLYING_TYPE : flatbuffers::voffset_t
|
||||
#else
|
||||
#define FLATBUFFERS_FINAL_CLASS
|
||||
#define FLATBUFFERS_OVERRIDE
|
||||
#define FLATBUFFERS_EXPLICIT_CPP11
|
||||
#define FLATBUFFERS_VTABLE_UNDERLYING_TYPE
|
||||
#endif
|
||||
|
||||
#if (!defined(_MSC_VER) || _MSC_VER >= 1900) && \
|
||||
(!defined(__GNUC__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)) || \
|
||||
(defined(__cpp_constexpr) && __cpp_constexpr >= 200704)
|
||||
#define FLATBUFFERS_CONSTEXPR constexpr
|
||||
#define FLATBUFFERS_CONSTEXPR_CPP11 constexpr
|
||||
#define FLATBUFFERS_CONSTEXPR_DEFINED
|
||||
#else
|
||||
#define FLATBUFFERS_CONSTEXPR const
|
||||
#define FLATBUFFERS_CONSTEXPR_CPP11
|
||||
#endif
|
||||
|
||||
#if (defined(__cplusplus) && __cplusplus >= 201402L) || \
|
||||
(defined(__cpp_constexpr) && __cpp_constexpr >= 201304)
|
||||
#define FLATBUFFERS_CONSTEXPR_CPP14 FLATBUFFERS_CONSTEXPR_CPP11
|
||||
#else
|
||||
#define FLATBUFFERS_CONSTEXPR_CPP14
|
||||
#endif
|
||||
|
||||
#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)) || \
|
||||
(defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 190023026)) || \
|
||||
defined(__clang__)
|
||||
#define FLATBUFFERS_NOEXCEPT noexcept
|
||||
#else
|
||||
#define FLATBUFFERS_NOEXCEPT
|
||||
#endif
|
||||
|
||||
// NOTE: the FLATBUFFERS_DELETE_FUNC macro may change the access mode to
|
||||
// private, so be sure to put it at the end or reset access mode explicitly.
|
||||
#if (!defined(_MSC_VER) || _MSC_FULL_VER >= 180020827) && \
|
||||
(!defined(__GNUC__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 404)) || \
|
||||
defined(__clang__)
|
||||
#define FLATBUFFERS_DELETE_FUNC(func) func = delete
|
||||
#else
|
||||
#define FLATBUFFERS_DELETE_FUNC(func) private: func
|
||||
#endif
|
||||
|
||||
#if (!defined(_MSC_VER) || _MSC_VER >= 1900) && \
|
||||
(!defined(__GNUC__) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 409)) || \
|
||||
defined(__clang__)
|
||||
#define FLATBUFFERS_DEFAULT_DECLARATION
|
||||
#endif
|
||||
|
||||
// Check if we can use template aliases
|
||||
// Not possible if Microsoft Compiler before 2012
|
||||
// Possible is the language feature __cpp_alias_templates is defined well
|
||||
// Or possible if the C++ std is C+11 or newer
|
||||
#if (defined(_MSC_VER) && _MSC_VER > 1700 /* MSVC2012 */) \
|
||||
|| (defined(__cpp_alias_templates) && __cpp_alias_templates >= 200704) \
|
||||
|| (defined(__cplusplus) && __cplusplus >= 201103L)
|
||||
#define FLATBUFFERS_TEMPLATES_ALIASES
|
||||
#endif
|
||||
|
||||
#ifndef FLATBUFFERS_HAS_STRING_VIEW
|
||||
// Only provide flatbuffers::string_view if __has_include can be used
|
||||
// to detect a header that provides an implementation
|
||||
#if defined(__has_include)
|
||||
// Check for std::string_view (in c++17)
|
||||
#if __has_include(<string_view>) && (__cplusplus >= 201606 || (defined(_HAS_CXX17) && _HAS_CXX17))
|
||||
#include <string_view>
|
||||
namespace flatbuffers {
|
||||
typedef std::string_view string_view;
|
||||
}
|
||||
#define FLATBUFFERS_HAS_STRING_VIEW 1
|
||||
// Check for std::experimental::string_view (in c++14, compiler-dependent)
|
||||
#elif __has_include(<experimental/string_view>) && (__cplusplus >= 201411)
|
||||
#include <experimental/string_view>
|
||||
namespace flatbuffers {
|
||||
typedef std::experimental::string_view string_view;
|
||||
}
|
||||
#define FLATBUFFERS_HAS_STRING_VIEW 1
|
||||
// Check for absl::string_view
|
||||
#elif __has_include("absl/strings/string_view.h") && \
|
||||
__has_include("absl/base/config.h") && \
|
||||
(__cplusplus >= 201411)
|
||||
#include "absl/base/config.h"
|
||||
#if !defined(ABSL_USES_STD_STRING_VIEW)
|
||||
#include "absl/strings/string_view.h"
|
||||
namespace flatbuffers {
|
||||
typedef absl::string_view string_view;
|
||||
}
|
||||
#define FLATBUFFERS_HAS_STRING_VIEW 1
|
||||
#endif
|
||||
#endif
|
||||
#endif // __has_include
|
||||
#endif // !FLATBUFFERS_HAS_STRING_VIEW
|
||||
|
||||
#ifndef FLATBUFFERS_GENERAL_HEAP_ALLOC_OK
|
||||
// Allow heap allocations to be used
|
||||
#define FLATBUFFERS_GENERAL_HEAP_ALLOC_OK 1
|
||||
#endif // !FLATBUFFERS_GENERAL_HEAP_ALLOC_OK
|
||||
|
||||
#ifndef FLATBUFFERS_HAS_NEW_STRTOD
|
||||
// Modern (C++11) strtod and strtof functions are available for use.
|
||||
// 1) nan/inf strings as argument of strtod;
|
||||
// 2) hex-float as argument of strtod/strtof.
|
||||
#if (defined(_MSC_VER) && _MSC_VER >= 1900) || \
|
||||
(defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 409)) || \
|
||||
(defined(__clang__))
|
||||
#define FLATBUFFERS_HAS_NEW_STRTOD 1
|
||||
#endif
|
||||
#endif // !FLATBUFFERS_HAS_NEW_STRTOD
|
||||
|
||||
#ifndef FLATBUFFERS_LOCALE_INDEPENDENT
|
||||
// Enable locale independent functions {strtof_l, strtod_l,strtoll_l,
|
||||
// strtoull_l}.
|
||||
#if (defined(_MSC_VER) && _MSC_VER >= 1800) || \
|
||||
(defined(__ANDROID_API__) && __ANDROID_API__>= 21) || \
|
||||
(defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 700)) && \
|
||||
(!defined(__Fuchsia__) && !defined(__ANDROID_API__))
|
||||
#define FLATBUFFERS_LOCALE_INDEPENDENT 1
|
||||
#else
|
||||
#define FLATBUFFERS_LOCALE_INDEPENDENT 0
|
||||
#endif
|
||||
#endif // !FLATBUFFERS_LOCALE_INDEPENDENT
|
||||
|
||||
// Suppress Undefined Behavior Sanitizer (recoverable only). Usage:
|
||||
// - __suppress_ubsan__("undefined")
|
||||
// - __suppress_ubsan__("signed-integer-overflow")
|
||||
#if defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >=7))
|
||||
#define __suppress_ubsan__(type) __attribute__((no_sanitize(type)))
|
||||
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 409)
|
||||
#define __suppress_ubsan__(type) __attribute__((no_sanitize_undefined))
|
||||
#else
|
||||
#define __suppress_ubsan__(type)
|
||||
#endif
|
||||
|
||||
// This is constexpr function used for checking compile-time constants.
|
||||
// Avoid `#pragma warning(disable: 4127) // C4127: expression is constant`.
|
||||
template<typename T> FLATBUFFERS_CONSTEXPR inline bool IsConstTrue(T t) {
|
||||
return !!t;
|
||||
}
|
||||
|
||||
// Enable C++ attribute [[]] if std:c++17 or higher.
|
||||
#if ((__cplusplus >= 201703L) \
|
||||
|| (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)))
|
||||
// All attributes unknown to an implementation are ignored without causing an error.
|
||||
#define FLATBUFFERS_ATTRIBUTE(attr) attr
|
||||
|
||||
#define FLATBUFFERS_FALLTHROUGH() [[fallthrough]]
|
||||
#else
|
||||
#define FLATBUFFERS_ATTRIBUTE(attr)
|
||||
|
||||
#if FLATBUFFERS_CLANG >= 30800
|
||||
#define FLATBUFFERS_FALLTHROUGH() [[clang::fallthrough]]
|
||||
#elif FLATBUFFERS_GCC >= 70300
|
||||
#define FLATBUFFERS_FALLTHROUGH() [[gnu::fallthrough]]
|
||||
#else
|
||||
#define FLATBUFFERS_FALLTHROUGH()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/// @endcond
|
||||
|
||||
/// @file
|
||||
namespace flatbuffers {
|
||||
|
||||
/// @cond FLATBUFFERS_INTERNAL
|
||||
// Our default offset / size type, 32bit on purpose on 64bit systems.
|
||||
// Also, using a consistent offset type maintains compatibility of serialized
|
||||
// offset values between 32bit and 64bit systems.
|
||||
typedef uint32_t uoffset_t;
|
||||
typedef uint64_t uoffset64_t;
|
||||
|
||||
// Signed offsets for references that can go in both directions.
|
||||
typedef int32_t soffset_t;
|
||||
typedef int64_t soffset64_t;
|
||||
|
||||
// Offset/index used in v-tables, can be changed to uint8_t in
|
||||
// format forks to save a bit of space if desired.
|
||||
typedef uint16_t voffset_t;
|
||||
|
||||
typedef uintmax_t largest_scalar_t;
|
||||
|
||||
// In 32bits, this evaluates to 2GB - 1
|
||||
#define FLATBUFFERS_MAX_BUFFER_SIZE std::numeric_limits<::flatbuffers::soffset_t>::max()
|
||||
#define FLATBUFFERS_MAX_64_BUFFER_SIZE std::numeric_limits<::flatbuffers::soffset64_t>::max()
|
||||
|
||||
// The minimum size buffer that can be a valid flatbuffer.
|
||||
// Includes the offset to the root table (uoffset_t), the offset to the vtable
|
||||
// of the root table (soffset_t), the size of the vtable (uint16_t), and the
|
||||
// size of the referring table (uint16_t).
|
||||
#define FLATBUFFERS_MIN_BUFFER_SIZE sizeof(uoffset_t) + sizeof(soffset_t) + \
|
||||
sizeof(uint16_t) + sizeof(uint16_t)
|
||||
|
||||
// We support aligning the contents of buffers up to this size.
|
||||
#ifndef FLATBUFFERS_MAX_ALIGNMENT
|
||||
#define FLATBUFFERS_MAX_ALIGNMENT 32
|
||||
#endif
|
||||
|
||||
/// @brief The length of a FlatBuffer file header.
|
||||
static const size_t kFileIdentifierLength = 4;
|
||||
|
||||
inline bool VerifyAlignmentRequirements(size_t align, size_t min_align = 1) {
|
||||
return (min_align <= align) && (align <= (FLATBUFFERS_MAX_ALIGNMENT)) &&
|
||||
(align & (align - 1)) == 0; // must be power of 2
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable: 4351) // C4351: new behavior: elements of array ... will be default initialized
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4127) // C4127: conditional expression is constant
|
||||
#endif
|
||||
|
||||
template<typename T> T EndianSwap(T t) {
|
||||
#if defined(_MSC_VER)
|
||||
#define FLATBUFFERS_BYTESWAP16 _byteswap_ushort
|
||||
#define FLATBUFFERS_BYTESWAP32 _byteswap_ulong
|
||||
#define FLATBUFFERS_BYTESWAP64 _byteswap_uint64
|
||||
#elif defined(__ICCARM__)
|
||||
#define FLATBUFFERS_BYTESWAP16 __REV16
|
||||
#define FLATBUFFERS_BYTESWAP32 __REV
|
||||
#define FLATBUFFERS_BYTESWAP64(x) \
|
||||
((__REV(static_cast<uint32_t>(x >> 32U))) | (static_cast<uint64_t>(__REV(static_cast<uint32_t>(x)))) << 32U)
|
||||
#else
|
||||
#if defined(__GNUC__) && __GNUC__ * 100 + __GNUC_MINOR__ < 408 && !defined(__clang__)
|
||||
// __builtin_bswap16 was missing prior to GCC 4.8.
|
||||
#define FLATBUFFERS_BYTESWAP16(x) \
|
||||
static_cast<uint16_t>(__builtin_bswap32(static_cast<uint32_t>(x) << 16))
|
||||
#else
|
||||
#define FLATBUFFERS_BYTESWAP16 __builtin_bswap16
|
||||
#endif
|
||||
#define FLATBUFFERS_BYTESWAP32 __builtin_bswap32
|
||||
#define FLATBUFFERS_BYTESWAP64 __builtin_bswap64
|
||||
#endif
|
||||
if (sizeof(T) == 1) { // Compile-time if-then's.
|
||||
return t;
|
||||
} else if (sizeof(T) == 2) {
|
||||
union { T t; uint16_t i; } u = { t };
|
||||
u.i = FLATBUFFERS_BYTESWAP16(u.i);
|
||||
return u.t;
|
||||
} else if (sizeof(T) == 4) {
|
||||
union { T t; uint32_t i; } u = { t };
|
||||
u.i = FLATBUFFERS_BYTESWAP32(u.i);
|
||||
return u.t;
|
||||
} else if (sizeof(T) == 8) {
|
||||
union { T t; uint64_t i; } u = { t };
|
||||
u.i = FLATBUFFERS_BYTESWAP64(u.i);
|
||||
return u.t;
|
||||
} else {
|
||||
FLATBUFFERS_ASSERT(0);
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
||||
template<typename T> T EndianScalar(T t) {
|
||||
#if FLATBUFFERS_LITTLEENDIAN
|
||||
return t;
|
||||
#else
|
||||
return EndianSwap(t);
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
// UBSAN: C++ aliasing type rules, see std::bit_cast<> for details.
|
||||
__suppress_ubsan__("alignment")
|
||||
T ReadScalar(const void *p) {
|
||||
return EndianScalar(*reinterpret_cast<const T *>(p));
|
||||
}
|
||||
|
||||
// See https://github.com/google/flatbuffers/issues/5950
|
||||
|
||||
#if (FLATBUFFERS_GCC >= 100000) && (FLATBUFFERS_GCC < 110000)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
// UBSAN: C++ aliasing type rules, see std::bit_cast<> for details.
|
||||
__suppress_ubsan__("alignment")
|
||||
void WriteScalar(void *p, T t) {
|
||||
*reinterpret_cast<T *>(p) = EndianScalar(t);
|
||||
}
|
||||
|
||||
template<typename T> struct Offset;
|
||||
template<typename T> __suppress_ubsan__("alignment") void WriteScalar(void *p, Offset<T> t) {
|
||||
*reinterpret_cast<uoffset_t *>(p) = EndianScalar(t.o);
|
||||
}
|
||||
|
||||
#if (FLATBUFFERS_GCC >= 100000) && (FLATBUFFERS_GCC < 110000)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
// Computes how many bytes you'd have to pad to be able to write an
|
||||
// "scalar_size" scalar if the buffer had grown to "buf_size" (downwards in
|
||||
// memory).
|
||||
__suppress_ubsan__("unsigned-integer-overflow")
|
||||
inline size_t PaddingBytes(size_t buf_size, size_t scalar_size) {
|
||||
return ((~buf_size) + 1) & (scalar_size - 1);
|
||||
}
|
||||
|
||||
// Generic 'operator==' with conditional specialisations.
|
||||
// T e - new value of a scalar field.
|
||||
// T def - default of scalar (is known at compile-time).
|
||||
template<typename T> inline bool IsTheSameAs(T e, T def) { return e == def; }
|
||||
|
||||
#if defined(FLATBUFFERS_NAN_DEFAULTS) && \
|
||||
defined(FLATBUFFERS_HAS_NEW_STRTOD) && (FLATBUFFERS_HAS_NEW_STRTOD > 0)
|
||||
// Like `operator==(e, def)` with weak NaN if T=(float|double).
|
||||
template<typename T> inline bool IsFloatTheSameAs(T e, T def) {
|
||||
return (e == def) || ((def != def) && (e != e));
|
||||
}
|
||||
template<> inline bool IsTheSameAs<float>(float e, float def) {
|
||||
return IsFloatTheSameAs(e, def);
|
||||
}
|
||||
template<> inline bool IsTheSameAs<double>(double e, double def) {
|
||||
return IsFloatTheSameAs(e, def);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check 'v' is out of closed range [low; high].
|
||||
// Workaround for GCC warning [-Werror=type-limits]:
|
||||
// comparison is always true due to limited range of data type.
|
||||
template<typename T>
|
||||
inline bool IsOutRange(const T &v, const T &low, const T &high) {
|
||||
return (v < low) || (high < v);
|
||||
}
|
||||
|
||||
// Check 'v' is in closed range [low; high].
|
||||
template<typename T>
|
||||
inline bool IsInRange(const T &v, const T &low, const T &high) {
|
||||
return !IsOutRange(v, low, high);
|
||||
}
|
||||
|
||||
} // namespace flatbuffers
|
||||
#endif // FLATBUFFERS_BASE_H_
|
||||
+199
@@ -0,0 +1,199 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_BUFFER_H_
|
||||
#define FLATBUFFERS_BUFFER_H_
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
// Wrapper for uoffset_t to allow safe template specialization.
|
||||
// Value is allowed to be 0 to indicate a null object (see e.g. AddOffset).
|
||||
template<typename T = void> struct Offset {
|
||||
// The type of offset to use.
|
||||
typedef uoffset_t offset_type;
|
||||
|
||||
offset_type o;
|
||||
Offset() : o(0) {}
|
||||
Offset(const offset_type _o) : o(_o) {}
|
||||
Offset<> Union() const { return o; }
|
||||
bool IsNull() const { return !o; }
|
||||
};
|
||||
|
||||
// Wrapper for uoffset64_t Offsets.
|
||||
template<typename T = void> struct Offset64 {
|
||||
// The type of offset to use.
|
||||
typedef uoffset64_t offset_type;
|
||||
|
||||
offset_type o;
|
||||
Offset64() : o(0) {}
|
||||
Offset64(const offset_type offset) : o(offset) {}
|
||||
Offset64<> Union() const { return o; }
|
||||
bool IsNull() const { return !o; }
|
||||
};
|
||||
|
||||
// Litmus check for ensuring the Offsets are the expected size.
|
||||
static_assert(sizeof(Offset<>) == 4, "Offset has wrong size");
|
||||
static_assert(sizeof(Offset64<>) == 8, "Offset64 has wrong size");
|
||||
|
||||
inline void EndianCheck() {
|
||||
int endiantest = 1;
|
||||
// If this fails, see FLATBUFFERS_LITTLEENDIAN above.
|
||||
FLATBUFFERS_ASSERT(*reinterpret_cast<char *>(&endiantest) ==
|
||||
FLATBUFFERS_LITTLEENDIAN);
|
||||
(void)endiantest;
|
||||
}
|
||||
|
||||
template<typename T> FLATBUFFERS_CONSTEXPR size_t AlignOf() {
|
||||
// clang-format off
|
||||
#ifdef _MSC_VER
|
||||
return __alignof(T);
|
||||
#else
|
||||
#ifndef alignof
|
||||
return __alignof__(T);
|
||||
#else
|
||||
return alignof(T);
|
||||
#endif
|
||||
#endif
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
// Lexicographically compare two strings (possibly containing nulls), and
|
||||
// return true if the first is less than the second.
|
||||
static inline bool StringLessThan(const char *a_data, uoffset_t a_size,
|
||||
const char *b_data, uoffset_t b_size) {
|
||||
const auto cmp = memcmp(a_data, b_data, (std::min)(a_size, b_size));
|
||||
return cmp == 0 ? a_size < b_size : cmp < 0;
|
||||
}
|
||||
|
||||
// When we read serialized data from memory, in the case of most scalars,
|
||||
// we want to just read T, but in the case of Offset, we want to actually
|
||||
// perform the indirection and return a pointer.
|
||||
// The template specialization below does just that.
|
||||
// It is wrapped in a struct since function templates can't overload on the
|
||||
// return type like this.
|
||||
// The typedef is for the convenience of callers of this function
|
||||
// (avoiding the need for a trailing return decltype)
|
||||
template<typename T> struct IndirectHelper {
|
||||
typedef T return_type;
|
||||
typedef T mutable_return_type;
|
||||
static const size_t element_stride = sizeof(T);
|
||||
|
||||
static return_type Read(const uint8_t *p, const size_t i) {
|
||||
return EndianScalar((reinterpret_cast<const T *>(p))[i]);
|
||||
}
|
||||
static mutable_return_type Read(uint8_t *p, const size_t i) {
|
||||
return reinterpret_cast<mutable_return_type>(
|
||||
Read(const_cast<const uint8_t *>(p), i));
|
||||
}
|
||||
};
|
||||
|
||||
// For vector of Offsets.
|
||||
template<typename T, template<typename> class OffsetT>
|
||||
struct IndirectHelper<OffsetT<T>> {
|
||||
typedef const T *return_type;
|
||||
typedef T *mutable_return_type;
|
||||
typedef typename OffsetT<T>::offset_type offset_type;
|
||||
static const offset_type element_stride = sizeof(offset_type);
|
||||
|
||||
static return_type Read(const uint8_t *const p, const offset_type i) {
|
||||
// Offsets are relative to themselves, so first update the pointer to
|
||||
// point to the offset location.
|
||||
const uint8_t *const offset_location = p + i * element_stride;
|
||||
|
||||
// Then read the scalar value of the offset (which may be 32 or 64-bits) and
|
||||
// then determine the relative location from the offset location.
|
||||
return reinterpret_cast<return_type>(
|
||||
offset_location + ReadScalar<offset_type>(offset_location));
|
||||
}
|
||||
static mutable_return_type Read(uint8_t *const p, const offset_type i) {
|
||||
// Offsets are relative to themselves, so first update the pointer to
|
||||
// point to the offset location.
|
||||
uint8_t *const offset_location = p + i * element_stride;
|
||||
|
||||
// Then read the scalar value of the offset (which may be 32 or 64-bits) and
|
||||
// then determine the relative location from the offset location.
|
||||
return reinterpret_cast<mutable_return_type>(
|
||||
offset_location + ReadScalar<offset_type>(offset_location));
|
||||
}
|
||||
};
|
||||
|
||||
// For vector of structs.
|
||||
template<typename T> struct IndirectHelper<const T *> {
|
||||
typedef const T *return_type;
|
||||
typedef T *mutable_return_type;
|
||||
static const size_t element_stride = sizeof(T);
|
||||
|
||||
static return_type Read(const uint8_t *const p, const size_t i) {
|
||||
// Structs are stored inline, relative to the first struct pointer.
|
||||
return reinterpret_cast<return_type>(p + i * element_stride);
|
||||
}
|
||||
static mutable_return_type Read(uint8_t *const p, const size_t i) {
|
||||
// Structs are stored inline, relative to the first struct pointer.
|
||||
return reinterpret_cast<mutable_return_type>(p + i * element_stride);
|
||||
}
|
||||
};
|
||||
|
||||
/// @brief Get a pointer to the file_identifier section of the buffer.
|
||||
/// @return Returns a const char pointer to the start of the file_identifier
|
||||
/// characters in the buffer. The returned char * has length
|
||||
/// 'flatbuffers::FlatBufferBuilder::kFileIdentifierLength'.
|
||||
/// This function is UNDEFINED for FlatBuffers whose schema does not include
|
||||
/// a file_identifier (likely points at padding or the start of a the root
|
||||
/// vtable).
|
||||
inline const char *GetBufferIdentifier(const void *buf,
|
||||
bool size_prefixed = false) {
|
||||
return reinterpret_cast<const char *>(buf) +
|
||||
((size_prefixed) ? 2 * sizeof(uoffset_t) : sizeof(uoffset_t));
|
||||
}
|
||||
|
||||
// Helper to see if the identifier in a buffer has the expected value.
|
||||
inline bool BufferHasIdentifier(const void *buf, const char *identifier,
|
||||
bool size_prefixed = false) {
|
||||
return strncmp(GetBufferIdentifier(buf, size_prefixed), identifier,
|
||||
flatbuffers::kFileIdentifierLength) == 0;
|
||||
}
|
||||
|
||||
/// @cond FLATBUFFERS_INTERNAL
|
||||
// Helpers to get a typed pointer to the root object contained in the buffer.
|
||||
template<typename T> T *GetMutableRoot(void *buf) {
|
||||
if (!buf) return nullptr;
|
||||
EndianCheck();
|
||||
return reinterpret_cast<T *>(
|
||||
reinterpret_cast<uint8_t *>(buf) +
|
||||
EndianScalar(*reinterpret_cast<uoffset_t *>(buf)));
|
||||
}
|
||||
|
||||
template<typename T, typename SizeT = uoffset_t>
|
||||
T *GetMutableSizePrefixedRoot(void *buf) {
|
||||
return GetMutableRoot<T>(reinterpret_cast<uint8_t *>(buf) + sizeof(SizeT));
|
||||
}
|
||||
|
||||
template<typename T> const T *GetRoot(const void *buf) {
|
||||
return GetMutableRoot<T>(const_cast<void *>(buf));
|
||||
}
|
||||
|
||||
template<typename T, typename SizeT = uoffset_t>
|
||||
const T *GetSizePrefixedRoot(const void *buf) {
|
||||
return GetRoot<T>(reinterpret_cast<const uint8_t *>(buf) + sizeof(SizeT));
|
||||
}
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_BUFFER_H_
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_BUFFER_REF_H_
|
||||
#define FLATBUFFERS_BUFFER_REF_H_
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
#include "flatbuffers/verifier.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
// Convenient way to bundle a buffer and its length, to pass it around
|
||||
// typed by its root.
|
||||
// A BufferRef does not own its buffer.
|
||||
struct BufferRefBase {}; // for std::is_base_of
|
||||
|
||||
template<typename T> struct BufferRef : BufferRefBase {
|
||||
BufferRef() : buf(nullptr), len(0), must_free(false) {}
|
||||
BufferRef(uint8_t *_buf, uoffset_t _len)
|
||||
: buf(_buf), len(_len), must_free(false) {}
|
||||
|
||||
~BufferRef() {
|
||||
if (must_free) free(buf);
|
||||
}
|
||||
|
||||
const T *GetRoot() const { return flatbuffers::GetRoot<T>(buf); }
|
||||
|
||||
bool Verify() {
|
||||
Verifier verifier(buf, len);
|
||||
return verifier.VerifyBuffer<T>(nullptr);
|
||||
}
|
||||
|
||||
uint8_t *buf;
|
||||
uoffset_t len;
|
||||
bool must_free;
|
||||
};
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_BUFFER_REF_H_
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_DEFAULT_ALLOCATOR_H_
|
||||
#define FLATBUFFERS_DEFAULT_ALLOCATOR_H_
|
||||
|
||||
#include "flatbuffers/allocator.h"
|
||||
#include "flatbuffers/base.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
// DefaultAllocator uses new/delete to allocate memory regions
|
||||
class DefaultAllocator : public Allocator {
|
||||
public:
|
||||
uint8_t *allocate(size_t size) FLATBUFFERS_OVERRIDE {
|
||||
return new uint8_t[size];
|
||||
}
|
||||
|
||||
void deallocate(uint8_t *p, size_t) FLATBUFFERS_OVERRIDE { delete[] p; }
|
||||
|
||||
static void dealloc(void *p, size_t) { delete[] static_cast<uint8_t *>(p); }
|
||||
};
|
||||
|
||||
// These functions allow for a null allocator to mean use the default allocator,
|
||||
// as used by DetachedBuffer and vector_downward below.
|
||||
// This is to avoid having a statically or dynamically allocated default
|
||||
// allocator, or having to move it between the classes that may own it.
|
||||
inline uint8_t *Allocate(Allocator *allocator, size_t size) {
|
||||
return allocator ? allocator->allocate(size)
|
||||
: DefaultAllocator().allocate(size);
|
||||
}
|
||||
|
||||
inline void Deallocate(Allocator *allocator, uint8_t *p, size_t size) {
|
||||
if (allocator)
|
||||
allocator->deallocate(p, size);
|
||||
else
|
||||
DefaultAllocator().deallocate(p, size);
|
||||
}
|
||||
|
||||
inline uint8_t *ReallocateDownward(Allocator *allocator, uint8_t *old_p,
|
||||
size_t old_size, size_t new_size,
|
||||
size_t in_use_back, size_t in_use_front) {
|
||||
return allocator ? allocator->reallocate_downward(old_p, old_size, new_size,
|
||||
in_use_back, in_use_front)
|
||||
: DefaultAllocator().reallocate_downward(
|
||||
old_p, old_size, new_size, in_use_back, in_use_front);
|
||||
}
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_DEFAULT_ALLOCATOR_H_
|
||||
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_DETACHED_BUFFER_H_
|
||||
#define FLATBUFFERS_DETACHED_BUFFER_H_
|
||||
|
||||
#include "flatbuffers/allocator.h"
|
||||
#include "flatbuffers/base.h"
|
||||
#include "flatbuffers/default_allocator.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
// DetachedBuffer is a finished flatbuffer memory region, detached from its
|
||||
// builder. The original memory region and allocator are also stored so that
|
||||
// the DetachedBuffer can manage the memory lifetime.
|
||||
class DetachedBuffer {
|
||||
public:
|
||||
DetachedBuffer()
|
||||
: allocator_(nullptr),
|
||||
own_allocator_(false),
|
||||
buf_(nullptr),
|
||||
reserved_(0),
|
||||
cur_(nullptr),
|
||||
size_(0) {}
|
||||
|
||||
DetachedBuffer(Allocator *allocator, bool own_allocator, uint8_t *buf,
|
||||
size_t reserved, uint8_t *cur, size_t sz)
|
||||
: allocator_(allocator),
|
||||
own_allocator_(own_allocator),
|
||||
buf_(buf),
|
||||
reserved_(reserved),
|
||||
cur_(cur),
|
||||
size_(sz) {}
|
||||
|
||||
DetachedBuffer(DetachedBuffer &&other) noexcept
|
||||
: allocator_(other.allocator_),
|
||||
own_allocator_(other.own_allocator_),
|
||||
buf_(other.buf_),
|
||||
reserved_(other.reserved_),
|
||||
cur_(other.cur_),
|
||||
size_(other.size_) {
|
||||
other.reset();
|
||||
}
|
||||
|
||||
DetachedBuffer &operator=(DetachedBuffer &&other) noexcept {
|
||||
if (this == &other) return *this;
|
||||
|
||||
destroy();
|
||||
|
||||
allocator_ = other.allocator_;
|
||||
own_allocator_ = other.own_allocator_;
|
||||
buf_ = other.buf_;
|
||||
reserved_ = other.reserved_;
|
||||
cur_ = other.cur_;
|
||||
size_ = other.size_;
|
||||
|
||||
other.reset();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
~DetachedBuffer() { destroy(); }
|
||||
|
||||
const uint8_t *data() const { return cur_; }
|
||||
|
||||
uint8_t *data() { return cur_; }
|
||||
|
||||
size_t size() const { return size_; }
|
||||
|
||||
// These may change access mode, leave these at end of public section
|
||||
FLATBUFFERS_DELETE_FUNC(DetachedBuffer(const DetachedBuffer &other));
|
||||
FLATBUFFERS_DELETE_FUNC(
|
||||
DetachedBuffer &operator=(const DetachedBuffer &other));
|
||||
|
||||
protected:
|
||||
Allocator *allocator_;
|
||||
bool own_allocator_;
|
||||
uint8_t *buf_;
|
||||
size_t reserved_;
|
||||
uint8_t *cur_;
|
||||
size_t size_;
|
||||
|
||||
inline void destroy() {
|
||||
if (buf_) Deallocate(allocator_, buf_, reserved_);
|
||||
if (own_allocator_ && allocator_) { delete allocator_; }
|
||||
reset();
|
||||
}
|
||||
|
||||
inline void reset() {
|
||||
allocator_ = nullptr;
|
||||
own_allocator_ = false;
|
||||
buf_ = nullptr;
|
||||
reserved_ = 0;
|
||||
cur_ = nullptr;
|
||||
size_ = 0;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_DETACHED_BUFFER_H_
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,273 @@
|
||||
/*
|
||||
* Copyright 2014 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_H_
|
||||
#define FLATBUFFERS_H_
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// TODO: These includes are for mitigating the pains of users editing their
|
||||
// source because they relied on flatbuffers.h to include everything for them.
|
||||
#include "flatbuffers/array.h"
|
||||
#include "flatbuffers/base.h"
|
||||
#include "flatbuffers/buffer.h"
|
||||
#include "flatbuffers/buffer_ref.h"
|
||||
#include "flatbuffers/detached_buffer.h"
|
||||
#include "flatbuffers/flatbuffer_builder.h"
|
||||
#include "flatbuffers/stl_emulation.h"
|
||||
#include "flatbuffers/string.h"
|
||||
#include "flatbuffers/struct.h"
|
||||
#include "flatbuffers/table.h"
|
||||
#include "flatbuffers/vector.h"
|
||||
#include "flatbuffers/vector_downward.h"
|
||||
#include "flatbuffers/verifier.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
/// @brief This can compute the start of a FlatBuffer from a root pointer, i.e.
|
||||
/// it is the opposite transformation of GetRoot().
|
||||
/// This may be useful if you want to pass on a root and have the recipient
|
||||
/// delete the buffer afterwards.
|
||||
inline const uint8_t *GetBufferStartFromRootPointer(const void *root) {
|
||||
auto table = reinterpret_cast<const Table *>(root);
|
||||
auto vtable = table->GetVTable();
|
||||
// Either the vtable is before the root or after the root.
|
||||
auto start = (std::min)(vtable, reinterpret_cast<const uint8_t *>(root));
|
||||
// Align to at least sizeof(uoffset_t).
|
||||
start = reinterpret_cast<const uint8_t *>(reinterpret_cast<uintptr_t>(start) &
|
||||
~(sizeof(uoffset_t) - 1));
|
||||
// Additionally, there may be a file_identifier in the buffer, and the root
|
||||
// offset. The buffer may have been aligned to any size between
|
||||
// sizeof(uoffset_t) and FLATBUFFERS_MAX_ALIGNMENT (see "force_align").
|
||||
// Sadly, the exact alignment is only known when constructing the buffer,
|
||||
// since it depends on the presence of values with said alignment properties.
|
||||
// So instead, we simply look at the next uoffset_t values (root,
|
||||
// file_identifier, and alignment padding) to see which points to the root.
|
||||
// None of the other values can "impersonate" the root since they will either
|
||||
// be 0 or four ASCII characters.
|
||||
static_assert(flatbuffers::kFileIdentifierLength == sizeof(uoffset_t),
|
||||
"file_identifier is assumed to be the same size as uoffset_t");
|
||||
for (auto possible_roots = FLATBUFFERS_MAX_ALIGNMENT / sizeof(uoffset_t) + 1;
|
||||
possible_roots; possible_roots--) {
|
||||
start -= sizeof(uoffset_t);
|
||||
if (ReadScalar<uoffset_t>(start) + start ==
|
||||
reinterpret_cast<const uint8_t *>(root))
|
||||
return start;
|
||||
}
|
||||
// We didn't find the root, either the "root" passed isn't really a root,
|
||||
// or the buffer is corrupt.
|
||||
// Assert, because calling this function with bad data may cause reads
|
||||
// outside of buffer boundaries.
|
||||
FLATBUFFERS_ASSERT(false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/// @brief This return the prefixed size of a FlatBuffer.
|
||||
template<typename SizeT = uoffset_t>
|
||||
inline SizeT GetPrefixedSize(const uint8_t *buf) {
|
||||
return ReadScalar<SizeT>(buf);
|
||||
}
|
||||
|
||||
// Base class for native objects (FlatBuffer data de-serialized into native
|
||||
// C++ data structures).
|
||||
// Contains no functionality, purely documentative.
|
||||
struct NativeTable {};
|
||||
|
||||
/// @brief Function types to be used with resolving hashes into objects and
|
||||
/// back again. The resolver gets a pointer to a field inside an object API
|
||||
/// object that is of the type specified in the schema using the attribute
|
||||
/// `cpp_type` (it is thus important whatever you write to this address
|
||||
/// matches that type). The value of this field is initially null, so you
|
||||
/// may choose to implement a delayed binding lookup using this function
|
||||
/// if you wish. The resolver does the opposite lookup, for when the object
|
||||
/// is being serialized again.
|
||||
typedef uint64_t hash_value_t;
|
||||
typedef std::function<void(void **pointer_adr, hash_value_t hash)>
|
||||
resolver_function_t;
|
||||
typedef std::function<hash_value_t(void *pointer)> rehasher_function_t;
|
||||
|
||||
// Helper function to test if a field is present, using any of the field
|
||||
// enums in the generated code.
|
||||
// `table` must be a generated table type. Since this is a template parameter,
|
||||
// this is not typechecked to be a subclass of Table, so beware!
|
||||
// Note: this function will return false for fields equal to the default
|
||||
// value, since they're not stored in the buffer (unless force_defaults was
|
||||
// used).
|
||||
template<typename T>
|
||||
bool IsFieldPresent(const T *table, typename T::FlatBuffersVTableOffset field) {
|
||||
// Cast, since Table is a private baseclass of any table types.
|
||||
return reinterpret_cast<const Table *>(table)->CheckField(
|
||||
static_cast<voffset_t>(field));
|
||||
}
|
||||
|
||||
// Utility function for reverse lookups on the EnumNames*() functions
|
||||
// (in the generated C++ code)
|
||||
// names must be NULL terminated.
|
||||
inline int LookupEnum(const char **names, const char *name) {
|
||||
for (const char **p = names; *p; p++)
|
||||
if (!strcmp(*p, name)) return static_cast<int>(p - names);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// These macros allow us to layout a struct with a guarantee that they'll end
|
||||
// up looking the same on different compilers and platforms.
|
||||
// It does this by disallowing the compiler to do any padding, and then
|
||||
// does padding itself by inserting extra padding fields that make every
|
||||
// element aligned to its own size.
|
||||
// Additionally, it manually sets the alignment of the struct as a whole,
|
||||
// which is typically its largest element, or a custom size set in the schema
|
||||
// by the force_align attribute.
|
||||
// These are used in the generated code only.
|
||||
|
||||
// clang-format off
|
||||
#if defined(_MSC_VER)
|
||||
#define FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(alignment) \
|
||||
__pragma(pack(1)) \
|
||||
struct __declspec(align(alignment))
|
||||
#define FLATBUFFERS_STRUCT_END(name, size) \
|
||||
__pragma(pack()) \
|
||||
static_assert(sizeof(name) == size, "compiler breaks packing rules")
|
||||
#elif defined(__GNUC__) || defined(__clang__) || defined(__ICCARM__)
|
||||
#define FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(alignment) \
|
||||
_Pragma("pack(1)") \
|
||||
struct __attribute__((aligned(alignment)))
|
||||
#define FLATBUFFERS_STRUCT_END(name, size) \
|
||||
_Pragma("pack()") \
|
||||
static_assert(sizeof(name) == size, "compiler breaks packing rules")
|
||||
#else
|
||||
#error Unknown compiler, please define structure alignment macros
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
// Minimal reflection via code generation.
|
||||
// Besides full-fat reflection (see reflection.h) and parsing/printing by
|
||||
// loading schemas (see idl.h), we can also have code generation for minimal
|
||||
// reflection data which allows pretty-printing and other uses without needing
|
||||
// a schema or a parser.
|
||||
// Generate code with --reflect-types (types only) or --reflect-names (names
|
||||
// also) to enable.
|
||||
// See minireflect.h for utilities using this functionality.
|
||||
|
||||
// These types are organized slightly differently as the ones in idl.h.
|
||||
enum SequenceType { ST_TABLE, ST_STRUCT, ST_UNION, ST_ENUM };
|
||||
|
||||
// Scalars have the same order as in idl.h
|
||||
// clang-format off
|
||||
#define FLATBUFFERS_GEN_ELEMENTARY_TYPES(ET) \
|
||||
ET(ET_UTYPE) \
|
||||
ET(ET_BOOL) \
|
||||
ET(ET_CHAR) \
|
||||
ET(ET_UCHAR) \
|
||||
ET(ET_SHORT) \
|
||||
ET(ET_USHORT) \
|
||||
ET(ET_INT) \
|
||||
ET(ET_UINT) \
|
||||
ET(ET_LONG) \
|
||||
ET(ET_ULONG) \
|
||||
ET(ET_FLOAT) \
|
||||
ET(ET_DOUBLE) \
|
||||
ET(ET_STRING) \
|
||||
ET(ET_SEQUENCE) // See SequenceType.
|
||||
|
||||
enum ElementaryType {
|
||||
#define FLATBUFFERS_ET(E) E,
|
||||
FLATBUFFERS_GEN_ELEMENTARY_TYPES(FLATBUFFERS_ET)
|
||||
#undef FLATBUFFERS_ET
|
||||
};
|
||||
|
||||
inline const char * const *ElementaryTypeNames() {
|
||||
static const char * const names[] = {
|
||||
#define FLATBUFFERS_ET(E) #E,
|
||||
FLATBUFFERS_GEN_ELEMENTARY_TYPES(FLATBUFFERS_ET)
|
||||
#undef FLATBUFFERS_ET
|
||||
};
|
||||
return names;
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
// Basic type info cost just 16bits per field!
|
||||
// We're explicitly defining the signedness since the signedness of integer
|
||||
// bitfields is otherwise implementation-defined and causes warnings on older
|
||||
// GCC compilers.
|
||||
struct TypeCode {
|
||||
// ElementaryType
|
||||
unsigned short base_type : 4;
|
||||
// Either vector (in table) or array (in struct)
|
||||
unsigned short is_repeating : 1;
|
||||
// Index into type_refs below, or -1 for none.
|
||||
signed short sequence_ref : 11;
|
||||
};
|
||||
|
||||
static_assert(sizeof(TypeCode) == 2, "TypeCode");
|
||||
|
||||
struct TypeTable;
|
||||
|
||||
// Signature of the static method present in each type.
|
||||
typedef const TypeTable *(*TypeFunction)();
|
||||
|
||||
struct TypeTable {
|
||||
SequenceType st;
|
||||
size_t num_elems; // of type_codes, values, names (but not type_refs).
|
||||
const TypeCode *type_codes; // num_elems count
|
||||
const TypeFunction *type_refs; // less than num_elems entries (see TypeCode).
|
||||
const int16_t *array_sizes; // less than num_elems entries (see TypeCode).
|
||||
const int64_t *values; // Only set for non-consecutive enum/union or structs.
|
||||
const char *const *names; // Only set if compiled with --reflect-names.
|
||||
};
|
||||
|
||||
// String which identifies the current version of FlatBuffers.
|
||||
inline const char *flatbuffers_version_string() {
|
||||
return "FlatBuffers " FLATBUFFERS_STRING(FLATBUFFERS_VERSION_MAJOR) "."
|
||||
FLATBUFFERS_STRING(FLATBUFFERS_VERSION_MINOR) "."
|
||||
FLATBUFFERS_STRING(FLATBUFFERS_VERSION_REVISION);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
#define FLATBUFFERS_DEFINE_BITMASK_OPERATORS(E, T)\
|
||||
inline E operator | (E lhs, E rhs){\
|
||||
return E(T(lhs) | T(rhs));\
|
||||
}\
|
||||
inline E operator & (E lhs, E rhs){\
|
||||
return E(T(lhs) & T(rhs));\
|
||||
}\
|
||||
inline E operator ^ (E lhs, E rhs){\
|
||||
return E(T(lhs) ^ T(rhs));\
|
||||
}\
|
||||
inline E operator ~ (E lhs){\
|
||||
return E(~T(lhs));\
|
||||
}\
|
||||
inline E operator |= (E &lhs, E rhs){\
|
||||
lhs = lhs | rhs;\
|
||||
return lhs;\
|
||||
}\
|
||||
inline E operator &= (E &lhs, E rhs){\
|
||||
lhs = lhs & rhs;\
|
||||
return lhs;\
|
||||
}\
|
||||
inline E operator ^= (E &lhs, E rhs){\
|
||||
lhs = lhs ^ rhs;\
|
||||
return lhs;\
|
||||
}\
|
||||
inline bool operator !(E rhs) \
|
||||
{\
|
||||
return !bool(T(rhs)); \
|
||||
}
|
||||
/// @endcond
|
||||
} // namespace flatbuffers
|
||||
|
||||
// clang-format on
|
||||
|
||||
#endif // FLATBUFFERS_H_
|
||||
@@ -0,0 +1,513 @@
|
||||
/*
|
||||
* Copyright 2017 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_STL_EMULATION_H_
|
||||
#define FLATBUFFERS_STL_EMULATION_H_
|
||||
|
||||
// clang-format off
|
||||
#include "flatbuffers/base.h"
|
||||
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <limits>
|
||||
|
||||
#ifndef FLATBUFFERS_USE_STD_OPTIONAL
|
||||
// Detect C++17 compatible compiler.
|
||||
// __cplusplus >= 201703L - a compiler has support of 'static inline' variables.
|
||||
#if (defined(__cplusplus) && __cplusplus >= 201703L) \
|
||||
|| (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
|
||||
#define FLATBUFFERS_USE_STD_OPTIONAL 1
|
||||
#else
|
||||
#define FLATBUFFERS_USE_STD_OPTIONAL 0
|
||||
#endif // (defined(__cplusplus) && __cplusplus >= 201703L) ...
|
||||
#endif // FLATBUFFERS_USE_STD_OPTIONAL
|
||||
|
||||
#if FLATBUFFERS_USE_STD_OPTIONAL
|
||||
#include <optional>
|
||||
#endif
|
||||
|
||||
#ifndef FLATBUFFERS_USE_STD_SPAN
|
||||
// Testing __cpp_lib_span requires including either <version> or <span>,
|
||||
// both of which were added in C++20.
|
||||
// See: https://en.cppreference.com/w/cpp/utility/feature_test
|
||||
#if defined(__cplusplus) && __cplusplus >= 202002L
|
||||
#define FLATBUFFERS_USE_STD_SPAN 1
|
||||
#endif
|
||||
#endif // FLATBUFFERS_USE_STD_SPAN
|
||||
|
||||
#if defined(FLATBUFFERS_USE_STD_SPAN)
|
||||
#include <array>
|
||||
#include <span>
|
||||
#else
|
||||
// Disable non-trivial ctors if FLATBUFFERS_SPAN_MINIMAL defined.
|
||||
#if !defined(FLATBUFFERS_TEMPLATES_ALIASES)
|
||||
#define FLATBUFFERS_SPAN_MINIMAL
|
||||
#else
|
||||
// Enable implicit construction of a span<T,N> from a std::array<T,N>.
|
||||
#include <array>
|
||||
#endif
|
||||
#endif // defined(FLATBUFFERS_USE_STD_SPAN)
|
||||
|
||||
// This header provides backwards compatibility for older versions of the STL.
|
||||
namespace flatbuffers {
|
||||
|
||||
#if defined(FLATBUFFERS_TEMPLATES_ALIASES)
|
||||
template <typename T>
|
||||
using numeric_limits = std::numeric_limits<T>;
|
||||
#else
|
||||
template <typename T> class numeric_limits :
|
||||
public std::numeric_limits<T> {};
|
||||
#endif // defined(FLATBUFFERS_TEMPLATES_ALIASES)
|
||||
|
||||
#if defined(FLATBUFFERS_TEMPLATES_ALIASES)
|
||||
template <typename T> using is_scalar = std::is_scalar<T>;
|
||||
template <typename T, typename U> using is_same = std::is_same<T,U>;
|
||||
template <typename T> using is_floating_point = std::is_floating_point<T>;
|
||||
template <typename T> using is_unsigned = std::is_unsigned<T>;
|
||||
template <typename T> using is_enum = std::is_enum<T>;
|
||||
template <typename T> using make_unsigned = std::make_unsigned<T>;
|
||||
template<bool B, class T, class F>
|
||||
using conditional = std::conditional<B, T, F>;
|
||||
template<class T, T v>
|
||||
using integral_constant = std::integral_constant<T, v>;
|
||||
template <bool B>
|
||||
using bool_constant = integral_constant<bool, B>;
|
||||
using true_type = std::true_type;
|
||||
using false_type = std::false_type;
|
||||
#else
|
||||
// MSVC 2010 doesn't support C++11 aliases.
|
||||
template <typename T> struct is_scalar : public std::is_scalar<T> {};
|
||||
template <typename T, typename U> struct is_same : public std::is_same<T,U> {};
|
||||
template <typename T> struct is_floating_point :
|
||||
public std::is_floating_point<T> {};
|
||||
template <typename T> struct is_unsigned : public std::is_unsigned<T> {};
|
||||
template <typename T> struct is_enum : public std::is_enum<T> {};
|
||||
template <typename T> struct make_unsigned : public std::make_unsigned<T> {};
|
||||
template<bool B, class T, class F>
|
||||
struct conditional : public std::conditional<B, T, F> {};
|
||||
template<class T, T v>
|
||||
struct integral_constant : public std::integral_constant<T, v> {};
|
||||
template <bool B>
|
||||
struct bool_constant : public integral_constant<bool, B> {};
|
||||
typedef bool_constant<true> true_type;
|
||||
typedef bool_constant<false> false_type;
|
||||
#endif // defined(FLATBUFFERS_TEMPLATES_ALIASES)
|
||||
|
||||
#if defined(FLATBUFFERS_TEMPLATES_ALIASES)
|
||||
template <class T> using unique_ptr = std::unique_ptr<T>;
|
||||
#else
|
||||
// MSVC 2010 doesn't support C++11 aliases.
|
||||
// We're manually "aliasing" the class here as we want to bring unique_ptr
|
||||
// into the flatbuffers namespace. We have unique_ptr in the flatbuffers
|
||||
// namespace we have a completely independent implementation (see below)
|
||||
// for C++98 STL implementations.
|
||||
template <class T> class unique_ptr : public std::unique_ptr<T> {
|
||||
public:
|
||||
unique_ptr() {}
|
||||
explicit unique_ptr(T* p) : std::unique_ptr<T>(p) {}
|
||||
unique_ptr(std::unique_ptr<T>&& u) { *this = std::move(u); }
|
||||
unique_ptr(unique_ptr&& u) { *this = std::move(u); }
|
||||
unique_ptr& operator=(std::unique_ptr<T>&& u) {
|
||||
std::unique_ptr<T>::reset(u.release());
|
||||
return *this;
|
||||
}
|
||||
unique_ptr& operator=(unique_ptr&& u) {
|
||||
std::unique_ptr<T>::reset(u.release());
|
||||
return *this;
|
||||
}
|
||||
unique_ptr& operator=(T* p) {
|
||||
return std::unique_ptr<T>::operator=(p);
|
||||
}
|
||||
};
|
||||
#endif // defined(FLATBUFFERS_TEMPLATES_ALIASES)
|
||||
|
||||
#if FLATBUFFERS_USE_STD_OPTIONAL
|
||||
template<class T>
|
||||
using Optional = std::optional<T>;
|
||||
using nullopt_t = std::nullopt_t;
|
||||
inline constexpr nullopt_t nullopt = std::nullopt;
|
||||
|
||||
#else
|
||||
// Limited implementation of Optional<T> type for a scalar T.
|
||||
// This implementation limited by trivial types compatible with
|
||||
// std::is_arithmetic<T> or std::is_enum<T> type traits.
|
||||
|
||||
// A tag to indicate an empty flatbuffers::optional<T>.
|
||||
struct nullopt_t {
|
||||
explicit FLATBUFFERS_CONSTEXPR_CPP11 nullopt_t(int) {}
|
||||
};
|
||||
|
||||
#if defined(FLATBUFFERS_CONSTEXPR_DEFINED)
|
||||
namespace internal {
|
||||
template <class> struct nullopt_holder {
|
||||
static constexpr nullopt_t instance_ = nullopt_t(0);
|
||||
};
|
||||
template<class Dummy>
|
||||
constexpr nullopt_t nullopt_holder<Dummy>::instance_;
|
||||
}
|
||||
static constexpr const nullopt_t &nullopt = internal::nullopt_holder<void>::instance_;
|
||||
|
||||
#else
|
||||
namespace internal {
|
||||
template <class> struct nullopt_holder {
|
||||
static const nullopt_t instance_;
|
||||
};
|
||||
template<class Dummy>
|
||||
const nullopt_t nullopt_holder<Dummy>::instance_ = nullopt_t(0);
|
||||
}
|
||||
static const nullopt_t &nullopt = internal::nullopt_holder<void>::instance_;
|
||||
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
class Optional FLATBUFFERS_FINAL_CLASS {
|
||||
// Non-scalar 'T' would extremely complicated Optional<T>.
|
||||
// Use is_scalar<T> checking because flatbuffers flatbuffers::is_arithmetic<T>
|
||||
// isn't implemented.
|
||||
static_assert(flatbuffers::is_scalar<T>::value, "unexpected type T");
|
||||
|
||||
public:
|
||||
~Optional() {}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 Optional() FLATBUFFERS_NOEXCEPT
|
||||
: value_(), has_value_(false) {}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 Optional(nullopt_t) FLATBUFFERS_NOEXCEPT
|
||||
: value_(), has_value_(false) {}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 Optional(T val) FLATBUFFERS_NOEXCEPT
|
||||
: value_(val), has_value_(true) {}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 Optional(const Optional &other) FLATBUFFERS_NOEXCEPT
|
||||
: value_(other.value_), has_value_(other.has_value_) {}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP14 Optional &operator=(const Optional &other) FLATBUFFERS_NOEXCEPT {
|
||||
value_ = other.value_;
|
||||
has_value_ = other.has_value_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP14 Optional &operator=(nullopt_t) FLATBUFFERS_NOEXCEPT {
|
||||
value_ = T();
|
||||
has_value_ = false;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP14 Optional &operator=(T val) FLATBUFFERS_NOEXCEPT {
|
||||
value_ = val;
|
||||
has_value_ = true;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void reset() FLATBUFFERS_NOEXCEPT {
|
||||
*this = nullopt;
|
||||
}
|
||||
|
||||
void swap(Optional &other) FLATBUFFERS_NOEXCEPT {
|
||||
std::swap(value_, other.value_);
|
||||
std::swap(has_value_, other.has_value_);
|
||||
}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 FLATBUFFERS_EXPLICIT_CPP11 operator bool() const FLATBUFFERS_NOEXCEPT {
|
||||
return has_value_;
|
||||
}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 bool has_value() const FLATBUFFERS_NOEXCEPT {
|
||||
return has_value_;
|
||||
}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 const T& operator*() const FLATBUFFERS_NOEXCEPT {
|
||||
return value_;
|
||||
}
|
||||
|
||||
const T& value() const {
|
||||
FLATBUFFERS_ASSERT(has_value());
|
||||
return value_;
|
||||
}
|
||||
|
||||
T value_or(T default_value) const FLATBUFFERS_NOEXCEPT {
|
||||
return has_value() ? value_ : default_value;
|
||||
}
|
||||
|
||||
private:
|
||||
T value_;
|
||||
bool has_value_;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 bool operator==(const Optional<T>& opt, nullopt_t) FLATBUFFERS_NOEXCEPT {
|
||||
return !opt;
|
||||
}
|
||||
template<class T>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 bool operator==(nullopt_t, const Optional<T>& opt) FLATBUFFERS_NOEXCEPT {
|
||||
return !opt;
|
||||
}
|
||||
|
||||
template<class T, class U>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 bool operator==(const Optional<T>& lhs, const U& rhs) FLATBUFFERS_NOEXCEPT {
|
||||
return static_cast<bool>(lhs) && (*lhs == rhs);
|
||||
}
|
||||
|
||||
template<class T, class U>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 bool operator==(const T& lhs, const Optional<U>& rhs) FLATBUFFERS_NOEXCEPT {
|
||||
return static_cast<bool>(rhs) && (lhs == *rhs);
|
||||
}
|
||||
|
||||
template<class T, class U>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 bool operator==(const Optional<T>& lhs, const Optional<U>& rhs) FLATBUFFERS_NOEXCEPT {
|
||||
return static_cast<bool>(lhs) != static_cast<bool>(rhs)
|
||||
? false
|
||||
: !static_cast<bool>(lhs) ? false : (*lhs == *rhs);
|
||||
}
|
||||
#endif // FLATBUFFERS_USE_STD_OPTIONAL
|
||||
|
||||
|
||||
// Very limited and naive partial implementation of C++20 std::span<T,Extent>.
|
||||
#if defined(FLATBUFFERS_USE_STD_SPAN)
|
||||
inline constexpr std::size_t dynamic_extent = std::dynamic_extent;
|
||||
template<class T, std::size_t Extent = std::dynamic_extent>
|
||||
using span = std::span<T, Extent>;
|
||||
|
||||
#else // !defined(FLATBUFFERS_USE_STD_SPAN)
|
||||
FLATBUFFERS_CONSTEXPR std::size_t dynamic_extent = static_cast<std::size_t>(-1);
|
||||
|
||||
// Exclude this code if MSVC2010 or non-STL Android is active.
|
||||
// The non-STL Android doesn't have `std::is_convertible` required for SFINAE.
|
||||
#if !defined(FLATBUFFERS_SPAN_MINIMAL)
|
||||
namespace internal {
|
||||
// This is SFINAE helper class for checking of a common condition:
|
||||
// > This overload only participates in overload resolution
|
||||
// > Check whether a pointer to an array of From can be converted
|
||||
// > to a pointer to an array of To.
|
||||
// This helper is used for checking of 'From -> const From'.
|
||||
template<class To, std::size_t Extent, class From, std::size_t N>
|
||||
struct is_span_convertible {
|
||||
using type =
|
||||
typename std::conditional<std::is_convertible<From (*)[], To (*)[]>::value
|
||||
&& (Extent == dynamic_extent || N == Extent),
|
||||
int, void>::type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct SpanIterator {
|
||||
// TODO: upgrade to std::random_access_iterator_tag.
|
||||
using iterator_category = std::forward_iterator_tag;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using value_type = typename std::remove_cv<T>::type;
|
||||
using reference = T&;
|
||||
using pointer = T*;
|
||||
|
||||
// Convince MSVC compiler that this iterator is trusted (it is verified).
|
||||
#ifdef _MSC_VER
|
||||
using _Unchecked_type = pointer;
|
||||
#endif // _MSC_VER
|
||||
|
||||
SpanIterator(pointer ptr) : ptr_(ptr) {}
|
||||
reference operator*() const { return *ptr_; }
|
||||
pointer operator->() { return ptr_; }
|
||||
SpanIterator& operator++() { ptr_++; return *this; }
|
||||
SpanIterator operator++(int) { auto tmp = *this; ++(*this); return tmp; }
|
||||
|
||||
friend bool operator== (const SpanIterator& lhs, const SpanIterator& rhs) { return lhs.ptr_ == rhs.ptr_; }
|
||||
friend bool operator!= (const SpanIterator& lhs, const SpanIterator& rhs) { return lhs.ptr_ != rhs.ptr_; }
|
||||
|
||||
private:
|
||||
pointer ptr_;
|
||||
};
|
||||
} // namespace internal
|
||||
#endif // !defined(FLATBUFFERS_SPAN_MINIMAL)
|
||||
|
||||
// T - element type; must be a complete type that is not an abstract
|
||||
// class type.
|
||||
// Extent - the number of elements in the sequence, or dynamic.
|
||||
template<class T, std::size_t Extent = dynamic_extent>
|
||||
class span FLATBUFFERS_FINAL_CLASS {
|
||||
public:
|
||||
typedef T element_type;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef T* pointer;
|
||||
typedef const T* const_pointer;
|
||||
typedef std::size_t size_type;
|
||||
|
||||
static FLATBUFFERS_CONSTEXPR size_type extent = Extent;
|
||||
|
||||
// Returns the number of elements in the span.
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 size_type size() const FLATBUFFERS_NOEXCEPT {
|
||||
return count_;
|
||||
}
|
||||
|
||||
// Returns the size of the sequence in bytes.
|
||||
FLATBUFFERS_CONSTEXPR_CPP11
|
||||
size_type size_bytes() const FLATBUFFERS_NOEXCEPT {
|
||||
return size() * sizeof(element_type);
|
||||
}
|
||||
|
||||
// Checks if the span is empty.
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 bool empty() const FLATBUFFERS_NOEXCEPT {
|
||||
return size() == 0;
|
||||
}
|
||||
|
||||
// Returns a pointer to the beginning of the sequence.
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 pointer data() const FLATBUFFERS_NOEXCEPT {
|
||||
return data_;
|
||||
}
|
||||
|
||||
#if !defined(FLATBUFFERS_SPAN_MINIMAL)
|
||||
using Iterator = internal::SpanIterator<T>;
|
||||
|
||||
Iterator begin() const { return Iterator(data()); }
|
||||
Iterator end() const { return Iterator(data() + size()); }
|
||||
#endif
|
||||
|
||||
// Returns a reference to the idx-th element of the sequence.
|
||||
// The behavior is undefined if the idx is greater than or equal to size().
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 reference operator[](size_type idx) const {
|
||||
return data()[idx];
|
||||
}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 span(const span &other) FLATBUFFERS_NOEXCEPT
|
||||
: data_(other.data_), count_(other.count_) {}
|
||||
|
||||
FLATBUFFERS_CONSTEXPR_CPP14 span &operator=(const span &other)
|
||||
FLATBUFFERS_NOEXCEPT {
|
||||
data_ = other.data_;
|
||||
count_ = other.count_;
|
||||
}
|
||||
|
||||
// Limited implementation of
|
||||
// `template <class It> constexpr std::span(It first, size_type count);`.
|
||||
//
|
||||
// Constructs a span that is a view over the range [first, first + count);
|
||||
// the resulting span has: data() == first and size() == count.
|
||||
// The behavior is undefined if [first, first + count) is not a valid range,
|
||||
// or if (extent != flatbuffers::dynamic_extent && count != extent).
|
||||
FLATBUFFERS_CONSTEXPR_CPP11
|
||||
explicit span(pointer first, size_type count) FLATBUFFERS_NOEXCEPT
|
||||
: data_ (Extent == dynamic_extent ? first : (Extent == count ? first : nullptr)),
|
||||
count_(Extent == dynamic_extent ? count : (Extent == count ? Extent : 0)) {
|
||||
// Make span empty if the count argument is incompatible with span<T,N>.
|
||||
}
|
||||
|
||||
// Exclude this code if MSVC2010 is active. The MSVC2010 isn't C++11
|
||||
// compliant, it doesn't support default template arguments for functions.
|
||||
#if defined(FLATBUFFERS_SPAN_MINIMAL)
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 span() FLATBUFFERS_NOEXCEPT : data_(nullptr),
|
||||
count_(0) {
|
||||
static_assert(extent == 0 || extent == dynamic_extent, "invalid span");
|
||||
}
|
||||
|
||||
#else
|
||||
// Constructs an empty span whose data() == nullptr and size() == 0.
|
||||
// This overload only participates in overload resolution if
|
||||
// extent == 0 || extent == flatbuffers::dynamic_extent.
|
||||
// A dummy template argument N is need dependency for SFINAE.
|
||||
template<std::size_t N = 0,
|
||||
typename internal::is_span_convertible<element_type, Extent, element_type, (N - N)>::type = 0>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 span() FLATBUFFERS_NOEXCEPT : data_(nullptr),
|
||||
count_(0) {
|
||||
static_assert(extent == 0 || extent == dynamic_extent, "invalid span");
|
||||
}
|
||||
|
||||
// Constructs a span that is a view over the array arr; the resulting span
|
||||
// has size() == N and data() == std::data(arr). These overloads only
|
||||
// participate in overload resolution if
|
||||
// extent == std::dynamic_extent || N == extent is true and
|
||||
// std::remove_pointer_t<decltype(std::data(arr))>(*)[]
|
||||
// is convertible to element_type (*)[].
|
||||
template<std::size_t N,
|
||||
typename internal::is_span_convertible<element_type, Extent, element_type, N>::type = 0>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 span(element_type (&arr)[N]) FLATBUFFERS_NOEXCEPT
|
||||
: data_(arr), count_(N) {}
|
||||
|
||||
template<class U, std::size_t N,
|
||||
typename internal::is_span_convertible<element_type, Extent, U, N>::type = 0>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 span(std::array<U, N> &arr) FLATBUFFERS_NOEXCEPT
|
||||
: data_(arr.data()), count_(N) {}
|
||||
|
||||
//template<class U, std::size_t N,
|
||||
// int = 0>
|
||||
//FLATBUFFERS_CONSTEXPR_CPP11 span(std::array<U, N> &arr) FLATBUFFERS_NOEXCEPT
|
||||
// : data_(arr.data()), count_(N) {}
|
||||
|
||||
template<class U, std::size_t N,
|
||||
typename internal::is_span_convertible<element_type, Extent, U, N>::type = 0>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 span(const std::array<U, N> &arr) FLATBUFFERS_NOEXCEPT
|
||||
: data_(arr.data()), count_(N) {}
|
||||
|
||||
// Converting constructor from another span s;
|
||||
// the resulting span has size() == s.size() and data() == s.data().
|
||||
// This overload only participates in overload resolution
|
||||
// if extent == std::dynamic_extent || N == extent is true and U (*)[]
|
||||
// is convertible to element_type (*)[].
|
||||
template<class U, std::size_t N,
|
||||
typename internal::is_span_convertible<element_type, Extent, U, N>::type = 0>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 span(const flatbuffers::span<U, N> &s) FLATBUFFERS_NOEXCEPT
|
||||
: span(s.data(), s.size()) {
|
||||
}
|
||||
|
||||
#endif // !defined(FLATBUFFERS_SPAN_MINIMAL)
|
||||
|
||||
private:
|
||||
// This is a naive implementation with 'count_' member even if (Extent != dynamic_extent).
|
||||
pointer const data_;
|
||||
size_type count_;
|
||||
};
|
||||
#endif // defined(FLATBUFFERS_USE_STD_SPAN)
|
||||
|
||||
#if !defined(FLATBUFFERS_SPAN_MINIMAL)
|
||||
template<class ElementType, std::size_t Extent>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11
|
||||
flatbuffers::span<ElementType, Extent> make_span(ElementType(&arr)[Extent]) FLATBUFFERS_NOEXCEPT {
|
||||
return span<ElementType, Extent>(arr);
|
||||
}
|
||||
|
||||
template<class ElementType, std::size_t Extent>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11
|
||||
flatbuffers::span<const ElementType, Extent> make_span(const ElementType(&arr)[Extent]) FLATBUFFERS_NOEXCEPT {
|
||||
return span<const ElementType, Extent>(arr);
|
||||
}
|
||||
|
||||
template<class ElementType, std::size_t Extent>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11
|
||||
flatbuffers::span<ElementType, Extent> make_span(std::array<ElementType, Extent> &arr) FLATBUFFERS_NOEXCEPT {
|
||||
return span<ElementType, Extent>(arr);
|
||||
}
|
||||
|
||||
template<class ElementType, std::size_t Extent>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11
|
||||
flatbuffers::span<const ElementType, Extent> make_span(const std::array<ElementType, Extent> &arr) FLATBUFFERS_NOEXCEPT {
|
||||
return span<const ElementType, Extent>(arr);
|
||||
}
|
||||
|
||||
template<class ElementType, std::size_t Extent>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11
|
||||
flatbuffers::span<ElementType, dynamic_extent> make_span(ElementType *first, std::size_t count) FLATBUFFERS_NOEXCEPT {
|
||||
return span<ElementType, dynamic_extent>(first, count);
|
||||
}
|
||||
|
||||
template<class ElementType, std::size_t Extent>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11
|
||||
flatbuffers::span<const ElementType, dynamic_extent> make_span(const ElementType *first, std::size_t count) FLATBUFFERS_NOEXCEPT {
|
||||
return span<const ElementType, dynamic_extent>(first, count);
|
||||
}
|
||||
#endif // !defined(FLATBUFFERS_SPAN_MINIMAL)
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_STL_EMULATION_H_
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_STRING_H_
|
||||
#define FLATBUFFERS_STRING_H_
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
#include "flatbuffers/vector.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
struct String : public Vector<char> {
|
||||
const char *c_str() const { return reinterpret_cast<const char *>(Data()); }
|
||||
std::string str() const { return std::string(c_str(), size()); }
|
||||
|
||||
// clang-format off
|
||||
#ifdef FLATBUFFERS_HAS_STRING_VIEW
|
||||
flatbuffers::string_view string_view() const {
|
||||
return flatbuffers::string_view(c_str(), size());
|
||||
}
|
||||
#endif // FLATBUFFERS_HAS_STRING_VIEW
|
||||
// clang-format on
|
||||
|
||||
bool operator<(const String &o) const {
|
||||
return StringLessThan(this->data(), this->size(), o.data(), o.size());
|
||||
}
|
||||
};
|
||||
|
||||
// Convenience function to get std::string from a String returning an empty
|
||||
// string on null pointer.
|
||||
static inline std::string GetString(const String *str) {
|
||||
return str ? str->str() : "";
|
||||
}
|
||||
|
||||
// Convenience function to get char* from a String returning an empty string on
|
||||
// null pointer.
|
||||
static inline const char *GetCstring(const String *str) {
|
||||
return str ? str->c_str() : "";
|
||||
}
|
||||
|
||||
#ifdef FLATBUFFERS_HAS_STRING_VIEW
|
||||
// Convenience function to get string_view from a String returning an empty
|
||||
// string_view on null pointer.
|
||||
static inline flatbuffers::string_view GetStringView(const String *str) {
|
||||
return str ? str->string_view() : flatbuffers::string_view();
|
||||
}
|
||||
#endif // FLATBUFFERS_HAS_STRING_VIEW
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_STRING_H_
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_STRUCT_H_
|
||||
#define FLATBUFFERS_STRUCT_H_
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
// "structs" are flat structures that do not have an offset table, thus
|
||||
// always have all members present and do not support forwards/backwards
|
||||
// compatible extensions.
|
||||
|
||||
class Struct FLATBUFFERS_FINAL_CLASS {
|
||||
public:
|
||||
template<typename T> T GetField(uoffset_t o) const {
|
||||
return ReadScalar<T>(&data_[o]);
|
||||
}
|
||||
|
||||
template<typename T> T GetStruct(uoffset_t o) const {
|
||||
return reinterpret_cast<T>(&data_[o]);
|
||||
}
|
||||
|
||||
const uint8_t *GetAddressOf(uoffset_t o) const { return &data_[o]; }
|
||||
uint8_t *GetAddressOf(uoffset_t o) { return &data_[o]; }
|
||||
|
||||
private:
|
||||
// private constructor & copy constructor: you obtain instances of this
|
||||
// class by pointing to existing data only
|
||||
Struct();
|
||||
Struct(const Struct &);
|
||||
Struct &operator=(const Struct &);
|
||||
|
||||
uint8_t data_[1];
|
||||
};
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_STRUCT_H_
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_TABLE_H_
|
||||
#define FLATBUFFERS_TABLE_H_
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
#include "flatbuffers/verifier.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
// "tables" use an offset table (possibly shared) that allows fields to be
|
||||
// omitted and added at will, but uses an extra indirection to read.
|
||||
class Table {
|
||||
public:
|
||||
const uint8_t *GetVTable() const {
|
||||
return data_ - ReadScalar<soffset_t>(data_);
|
||||
}
|
||||
|
||||
// This gets the field offset for any of the functions below it, or 0
|
||||
// if the field was not present.
|
||||
voffset_t GetOptionalFieldOffset(voffset_t field) const {
|
||||
// The vtable offset is always at the start.
|
||||
auto vtable = GetVTable();
|
||||
// The first element is the size of the vtable (fields + type id + itself).
|
||||
auto vtsize = ReadScalar<voffset_t>(vtable);
|
||||
// If the field we're accessing is outside the vtable, we're reading older
|
||||
// data, so it's the same as if the offset was 0 (not present).
|
||||
return field < vtsize ? ReadScalar<voffset_t>(vtable + field) : 0;
|
||||
}
|
||||
|
||||
template<typename T> T GetField(voffset_t field, T defaultval) const {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
return field_offset ? ReadScalar<T>(data_ + field_offset) : defaultval;
|
||||
}
|
||||
|
||||
template<typename P, typename OffsetSize = uoffset_t>
|
||||
P GetPointer(voffset_t field) {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
auto p = data_ + field_offset;
|
||||
return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
|
||||
: nullptr;
|
||||
}
|
||||
template<typename P, typename OffsetSize = uoffset_t>
|
||||
P GetPointer(voffset_t field) const {
|
||||
return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
|
||||
}
|
||||
|
||||
template<typename P> P GetPointer64(voffset_t field) {
|
||||
return GetPointer<P, uoffset64_t>(field);
|
||||
}
|
||||
|
||||
template<typename P> P GetPointer64(voffset_t field) const {
|
||||
return GetPointer<P, uoffset64_t>(field);
|
||||
}
|
||||
|
||||
template<typename P> P GetStruct(voffset_t field) const {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
auto p = const_cast<uint8_t *>(data_ + field_offset);
|
||||
return field_offset ? reinterpret_cast<P>(p) : nullptr;
|
||||
}
|
||||
|
||||
template<typename Raw, typename Face>
|
||||
flatbuffers::Optional<Face> GetOptional(voffset_t field) const {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
auto p = data_ + field_offset;
|
||||
return field_offset ? Optional<Face>(static_cast<Face>(ReadScalar<Raw>(p)))
|
||||
: Optional<Face>();
|
||||
}
|
||||
|
||||
template<typename T> bool SetField(voffset_t field, T val, T def) {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
if (!field_offset) return IsTheSameAs(val, def);
|
||||
WriteScalar(data_ + field_offset, val);
|
||||
return true;
|
||||
}
|
||||
template<typename T> bool SetField(voffset_t field, T val) {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
if (!field_offset) return false;
|
||||
WriteScalar(data_ + field_offset, val);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SetPointer(voffset_t field, const uint8_t *val) {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
if (!field_offset) return false;
|
||||
WriteScalar(data_ + field_offset,
|
||||
static_cast<uoffset_t>(val - (data_ + field_offset)));
|
||||
return true;
|
||||
}
|
||||
|
||||
uint8_t *GetAddressOf(voffset_t field) {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
return field_offset ? data_ + field_offset : nullptr;
|
||||
}
|
||||
const uint8_t *GetAddressOf(voffset_t field) const {
|
||||
return const_cast<Table *>(this)->GetAddressOf(field);
|
||||
}
|
||||
|
||||
bool CheckField(voffset_t field) const {
|
||||
return GetOptionalFieldOffset(field) != 0;
|
||||
}
|
||||
|
||||
// Verify the vtable of this table.
|
||||
// Call this once per table, followed by VerifyField once per field.
|
||||
bool VerifyTableStart(Verifier &verifier) const {
|
||||
return verifier.VerifyTableStart(data_);
|
||||
}
|
||||
|
||||
// Verify a particular field.
|
||||
template<typename T>
|
||||
bool VerifyField(const Verifier &verifier, voffset_t field,
|
||||
size_t align) const {
|
||||
// Calling GetOptionalFieldOffset should be safe now thanks to
|
||||
// VerifyTable().
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
// Check the actual field.
|
||||
return !field_offset || verifier.VerifyField<T>(data_, field_offset, align);
|
||||
}
|
||||
|
||||
// VerifyField for required fields.
|
||||
template<typename T>
|
||||
bool VerifyFieldRequired(const Verifier &verifier, voffset_t field,
|
||||
size_t align) const {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
return verifier.Check(field_offset != 0) &&
|
||||
verifier.VerifyField<T>(data_, field_offset, align);
|
||||
}
|
||||
|
||||
// Versions for offsets.
|
||||
template<typename OffsetT = uoffset_t>
|
||||
bool VerifyOffset(const Verifier &verifier, voffset_t field) const {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
return !field_offset || verifier.VerifyOffset<OffsetT>(data_, field_offset);
|
||||
}
|
||||
|
||||
template<typename OffsetT = uoffset_t>
|
||||
bool VerifyOffsetRequired(const Verifier &verifier, voffset_t field) const {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
return verifier.Check(field_offset != 0) &&
|
||||
verifier.VerifyOffset<OffsetT>(data_, field_offset);
|
||||
}
|
||||
|
||||
bool VerifyOffset64(const Verifier &verifier, voffset_t field) const {
|
||||
return VerifyOffset<uoffset64_t>(verifier, field);
|
||||
}
|
||||
|
||||
bool VerifyOffset64Required(const Verifier &verifier, voffset_t field) const {
|
||||
return VerifyOffsetRequired<uoffset64_t>(verifier, field);
|
||||
}
|
||||
|
||||
private:
|
||||
// private constructor & copy constructor: you obtain instances of this
|
||||
// class by pointing to existing data only
|
||||
Table();
|
||||
Table(const Table &other);
|
||||
Table &operator=(const Table &);
|
||||
|
||||
uint8_t data_[1];
|
||||
};
|
||||
|
||||
// This specialization allows avoiding warnings like:
|
||||
// MSVC C4800: type: forcing value to bool 'true' or 'false'.
|
||||
template<>
|
||||
inline flatbuffers::Optional<bool> Table::GetOptional<uint8_t, bool>(
|
||||
voffset_t field) const {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
auto p = data_ + field_offset;
|
||||
return field_offset ? Optional<bool>(ReadScalar<uint8_t>(p) != 0)
|
||||
: Optional<bool>();
|
||||
}
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_TABLE_H_
|
||||
+400
@@ -0,0 +1,400 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_VECTOR_H_
|
||||
#define FLATBUFFERS_VECTOR_H_
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
#include "flatbuffers/buffer.h"
|
||||
#include "flatbuffers/stl_emulation.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
struct String;
|
||||
|
||||
// An STL compatible iterator implementation for Vector below, effectively
|
||||
// calling Get() for every element.
|
||||
template<typename T, typename IT, typename Data = uint8_t *,
|
||||
typename SizeT = uoffset_t>
|
||||
struct VectorIterator {
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
typedef IT value_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef IT *pointer;
|
||||
typedef IT &reference;
|
||||
|
||||
static const SizeT element_stride = IndirectHelper<T>::element_stride;
|
||||
|
||||
VectorIterator(Data data, SizeT i) : data_(data + element_stride * i) {}
|
||||
VectorIterator(const VectorIterator &other) : data_(other.data_) {}
|
||||
VectorIterator() : data_(nullptr) {}
|
||||
|
||||
VectorIterator &operator=(const VectorIterator &other) {
|
||||
data_ = other.data_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
VectorIterator &operator=(VectorIterator &&other) {
|
||||
data_ = other.data_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator==(const VectorIterator &other) const {
|
||||
return data_ == other.data_;
|
||||
}
|
||||
|
||||
bool operator<(const VectorIterator &other) const {
|
||||
return data_ < other.data_;
|
||||
}
|
||||
|
||||
bool operator!=(const VectorIterator &other) const {
|
||||
return data_ != other.data_;
|
||||
}
|
||||
|
||||
difference_type operator-(const VectorIterator &other) const {
|
||||
return (data_ - other.data_) / element_stride;
|
||||
}
|
||||
|
||||
// Note: return type is incompatible with the standard
|
||||
// `reference operator*()`.
|
||||
IT operator*() const { return IndirectHelper<T>::Read(data_, 0); }
|
||||
|
||||
// Note: return type is incompatible with the standard
|
||||
// `pointer operator->()`.
|
||||
IT operator->() const { return IndirectHelper<T>::Read(data_, 0); }
|
||||
|
||||
VectorIterator &operator++() {
|
||||
data_ += element_stride;
|
||||
return *this;
|
||||
}
|
||||
|
||||
VectorIterator operator++(int) {
|
||||
VectorIterator temp(data_, 0);
|
||||
data_ += element_stride;
|
||||
return temp;
|
||||
}
|
||||
|
||||
VectorIterator operator+(const SizeT &offset) const {
|
||||
return VectorIterator(data_ + offset * element_stride, 0);
|
||||
}
|
||||
|
||||
VectorIterator &operator+=(const SizeT &offset) {
|
||||
data_ += offset * element_stride;
|
||||
return *this;
|
||||
}
|
||||
|
||||
VectorIterator &operator--() {
|
||||
data_ -= element_stride;
|
||||
return *this;
|
||||
}
|
||||
|
||||
VectorIterator operator--(int) {
|
||||
VectorIterator temp(data_, 0);
|
||||
data_ -= element_stride;
|
||||
return temp;
|
||||
}
|
||||
|
||||
VectorIterator operator-(const SizeT &offset) const {
|
||||
return VectorIterator(data_ - offset * element_stride, 0);
|
||||
}
|
||||
|
||||
VectorIterator &operator-=(const SizeT &offset) {
|
||||
data_ -= offset * element_stride;
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
Data data_;
|
||||
};
|
||||
|
||||
template<typename T, typename IT, typename SizeT = uoffset_t>
|
||||
using VectorConstIterator = VectorIterator<T, IT, const uint8_t *, SizeT>;
|
||||
|
||||
template<typename Iterator>
|
||||
struct VectorReverseIterator : public std::reverse_iterator<Iterator> {
|
||||
explicit VectorReverseIterator(Iterator iter)
|
||||
: std::reverse_iterator<Iterator>(iter) {}
|
||||
|
||||
// Note: return type is incompatible with the standard
|
||||
// `reference operator*()`.
|
||||
typename Iterator::value_type operator*() const {
|
||||
auto tmp = std::reverse_iterator<Iterator>::current;
|
||||
return *--tmp;
|
||||
}
|
||||
|
||||
// Note: return type is incompatible with the standard
|
||||
// `pointer operator->()`.
|
||||
typename Iterator::value_type operator->() const {
|
||||
auto tmp = std::reverse_iterator<Iterator>::current;
|
||||
return *--tmp;
|
||||
}
|
||||
};
|
||||
|
||||
// This is used as a helper type for accessing vectors.
|
||||
// Vector::data() assumes the vector elements start after the length field.
|
||||
template<typename T, typename SizeT = uoffset_t> class Vector {
|
||||
public:
|
||||
typedef VectorIterator<T,
|
||||
typename IndirectHelper<T>::mutable_return_type,
|
||||
uint8_t *, SizeT>
|
||||
iterator;
|
||||
typedef VectorConstIterator<T, typename IndirectHelper<T>::return_type,
|
||||
SizeT>
|
||||
const_iterator;
|
||||
typedef VectorReverseIterator<iterator> reverse_iterator;
|
||||
typedef VectorReverseIterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
typedef typename flatbuffers::bool_constant<flatbuffers::is_scalar<T>::value>
|
||||
scalar_tag;
|
||||
|
||||
static FLATBUFFERS_CONSTEXPR bool is_span_observable =
|
||||
scalar_tag::value && (FLATBUFFERS_LITTLEENDIAN || sizeof(T) == 1);
|
||||
|
||||
SizeT size() const { return EndianScalar(length_); }
|
||||
|
||||
// Deprecated: use size(). Here for backwards compatibility.
|
||||
FLATBUFFERS_ATTRIBUTE([[deprecated("use size() instead")]])
|
||||
SizeT Length() const { return size(); }
|
||||
|
||||
typedef SizeT size_type;
|
||||
typedef typename IndirectHelper<T>::return_type return_type;
|
||||
typedef typename IndirectHelper<T>::mutable_return_type
|
||||
mutable_return_type;
|
||||
typedef return_type value_type;
|
||||
|
||||
return_type Get(SizeT i) const {
|
||||
FLATBUFFERS_ASSERT(i < size());
|
||||
return IndirectHelper<T>::Read(Data(), i);
|
||||
}
|
||||
|
||||
return_type operator[](SizeT i) const { return Get(i); }
|
||||
|
||||
// If this is a Vector of enums, T will be its storage type, not the enum
|
||||
// type. This function makes it convenient to retrieve value with enum
|
||||
// type E.
|
||||
template<typename E> E GetEnum(SizeT i) const {
|
||||
return static_cast<E>(Get(i));
|
||||
}
|
||||
|
||||
// If this a vector of unions, this does the cast for you. There's no check
|
||||
// to make sure this is the right type!
|
||||
template<typename U> const U *GetAs(SizeT i) const {
|
||||
return reinterpret_cast<const U *>(Get(i));
|
||||
}
|
||||
|
||||
// If this a vector of unions, this does the cast for you. There's no check
|
||||
// to make sure this is actually a string!
|
||||
const String *GetAsString(SizeT i) const {
|
||||
return reinterpret_cast<const String *>(Get(i));
|
||||
}
|
||||
|
||||
const void *GetStructFromOffset(size_t o) const {
|
||||
return reinterpret_cast<const void *>(Data() + o);
|
||||
}
|
||||
|
||||
iterator begin() { return iterator(Data(), 0); }
|
||||
const_iterator begin() const { return const_iterator(Data(), 0); }
|
||||
|
||||
iterator end() { return iterator(Data(), size()); }
|
||||
const_iterator end() const { return const_iterator(Data(), size()); }
|
||||
|
||||
reverse_iterator rbegin() { return reverse_iterator(end()); }
|
||||
const_reverse_iterator rbegin() const {
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
|
||||
reverse_iterator rend() { return reverse_iterator(begin()); }
|
||||
const_reverse_iterator rend() const {
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
|
||||
const_iterator cbegin() const { return begin(); }
|
||||
|
||||
const_iterator cend() const { return end(); }
|
||||
|
||||
const_reverse_iterator crbegin() const { return rbegin(); }
|
||||
|
||||
const_reverse_iterator crend() const { return rend(); }
|
||||
|
||||
// Change elements if you have a non-const pointer to this object.
|
||||
// Scalars only. See reflection.h, and the documentation.
|
||||
void Mutate(SizeT i, const T &val) {
|
||||
FLATBUFFERS_ASSERT(i < size());
|
||||
WriteScalar(data() + i, val);
|
||||
}
|
||||
|
||||
// Change an element of a vector of tables (or strings).
|
||||
// "val" points to the new table/string, as you can obtain from
|
||||
// e.g. reflection::AddFlatBuffer().
|
||||
void MutateOffset(SizeT i, const uint8_t *val) {
|
||||
FLATBUFFERS_ASSERT(i < size());
|
||||
static_assert(sizeof(T) == sizeof(SizeT), "Unrelated types");
|
||||
WriteScalar(data() + i,
|
||||
static_cast<SizeT>(val - (Data() + i * sizeof(SizeT))));
|
||||
}
|
||||
|
||||
// Get a mutable pointer to tables/strings inside this vector.
|
||||
mutable_return_type GetMutableObject(SizeT i) const {
|
||||
FLATBUFFERS_ASSERT(i < size());
|
||||
return const_cast<mutable_return_type>(IndirectHelper<T>::Read(Data(), i));
|
||||
}
|
||||
|
||||
// The raw data in little endian format. Use with care.
|
||||
const uint8_t *Data() const {
|
||||
return reinterpret_cast<const uint8_t *>(&length_ + 1);
|
||||
}
|
||||
|
||||
uint8_t *Data() { return reinterpret_cast<uint8_t *>(&length_ + 1); }
|
||||
|
||||
// Similarly, but typed, much like std::vector::data
|
||||
const T *data() const { return reinterpret_cast<const T *>(Data()); }
|
||||
T *data() { return reinterpret_cast<T *>(Data()); }
|
||||
|
||||
template<typename K> return_type LookupByKey(K key) const {
|
||||
void *search_result = std::bsearch(
|
||||
&key, Data(), size(), IndirectHelper<T>::element_stride, KeyCompare<K>);
|
||||
|
||||
if (!search_result) {
|
||||
return nullptr; // Key not found.
|
||||
}
|
||||
|
||||
const uint8_t *element = reinterpret_cast<const uint8_t *>(search_result);
|
||||
|
||||
return IndirectHelper<T>::Read(element, 0);
|
||||
}
|
||||
|
||||
template<typename K> mutable_return_type MutableLookupByKey(K key) {
|
||||
return const_cast<mutable_return_type>(LookupByKey(key));
|
||||
}
|
||||
|
||||
protected:
|
||||
// This class is only used to access pre-existing data. Don't ever
|
||||
// try to construct these manually.
|
||||
Vector();
|
||||
|
||||
SizeT length_;
|
||||
|
||||
private:
|
||||
// This class is a pointer. Copying will therefore create an invalid object.
|
||||
// Private and unimplemented copy constructor.
|
||||
Vector(const Vector &);
|
||||
Vector &operator=(const Vector &);
|
||||
|
||||
template<typename K> static int KeyCompare(const void *ap, const void *bp) {
|
||||
const K *key = reinterpret_cast<const K *>(ap);
|
||||
const uint8_t *data = reinterpret_cast<const uint8_t *>(bp);
|
||||
auto table = IndirectHelper<T>::Read(data, 0);
|
||||
|
||||
// std::bsearch compares with the operands transposed, so we negate the
|
||||
// result here.
|
||||
return -table->KeyCompareWithValue(*key);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T> using Vector64 = Vector<T, uoffset64_t>;
|
||||
|
||||
template<class U>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<U> make_span(Vector<U> &vec)
|
||||
FLATBUFFERS_NOEXCEPT {
|
||||
static_assert(Vector<U>::is_span_observable,
|
||||
"wrong type U, only LE-scalar, or byte types are allowed");
|
||||
return span<U>(vec.data(), vec.size());
|
||||
}
|
||||
|
||||
template<class U>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<const U> make_span(
|
||||
const Vector<U> &vec) FLATBUFFERS_NOEXCEPT {
|
||||
static_assert(Vector<U>::is_span_observable,
|
||||
"wrong type U, only LE-scalar, or byte types are allowed");
|
||||
return span<const U>(vec.data(), vec.size());
|
||||
}
|
||||
|
||||
template<class U>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<uint8_t> make_bytes_span(
|
||||
Vector<U> &vec) FLATBUFFERS_NOEXCEPT {
|
||||
static_assert(Vector<U>::scalar_tag::value,
|
||||
"wrong type U, only LE-scalar, or byte types are allowed");
|
||||
return span<uint8_t>(vec.Data(), vec.size() * sizeof(U));
|
||||
}
|
||||
|
||||
template<class U>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<const uint8_t> make_bytes_span(
|
||||
const Vector<U> &vec) FLATBUFFERS_NOEXCEPT {
|
||||
static_assert(Vector<U>::scalar_tag::value,
|
||||
"wrong type U, only LE-scalar, or byte types are allowed");
|
||||
return span<const uint8_t>(vec.Data(), vec.size() * sizeof(U));
|
||||
}
|
||||
|
||||
// Convenient helper functions to get a span of any vector, regardless
|
||||
// of whether it is null or not (the field is not set).
|
||||
template<class U>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<U> make_span(Vector<U> *ptr)
|
||||
FLATBUFFERS_NOEXCEPT {
|
||||
static_assert(Vector<U>::is_span_observable,
|
||||
"wrong type U, only LE-scalar, or byte types are allowed");
|
||||
return ptr ? make_span(*ptr) : span<U>();
|
||||
}
|
||||
|
||||
template<class U>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<const U> make_span(
|
||||
const Vector<U> *ptr) FLATBUFFERS_NOEXCEPT {
|
||||
static_assert(Vector<U>::is_span_observable,
|
||||
"wrong type U, only LE-scalar, or byte types are allowed");
|
||||
return ptr ? make_span(*ptr) : span<const U>();
|
||||
}
|
||||
|
||||
// Represent a vector much like the template above, but in this case we
|
||||
// don't know what the element types are (used with reflection.h).
|
||||
class VectorOfAny {
|
||||
public:
|
||||
uoffset_t size() const { return EndianScalar(length_); }
|
||||
|
||||
const uint8_t *Data() const {
|
||||
return reinterpret_cast<const uint8_t *>(&length_ + 1);
|
||||
}
|
||||
uint8_t *Data() { return reinterpret_cast<uint8_t *>(&length_ + 1); }
|
||||
|
||||
protected:
|
||||
VectorOfAny();
|
||||
|
||||
uoffset_t length_;
|
||||
|
||||
private:
|
||||
VectorOfAny(const VectorOfAny &);
|
||||
VectorOfAny &operator=(const VectorOfAny &);
|
||||
};
|
||||
|
||||
template<typename T, typename U>
|
||||
Vector<Offset<T>> *VectorCast(Vector<Offset<U>> *ptr) {
|
||||
static_assert(std::is_base_of<T, U>::value, "Unrelated types");
|
||||
return reinterpret_cast<Vector<Offset<T>> *>(ptr);
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
const Vector<Offset<T>> *VectorCast(const Vector<Offset<U>> *ptr) {
|
||||
static_assert(std::is_base_of<T, U>::value, "Unrelated types");
|
||||
return reinterpret_cast<const Vector<Offset<T>> *>(ptr);
|
||||
}
|
||||
|
||||
// Convenient helper function to get the length of any vector, regardless
|
||||
// of whether it is null or not (the field is not set).
|
||||
template<typename T> static inline size_t VectorLength(const Vector<T> *v) {
|
||||
return v ? v->size() : 0;
|
||||
}
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_VERIFIER_H_
|
||||
@@ -0,0 +1,288 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_VECTOR_DOWNWARD_H_
|
||||
#define FLATBUFFERS_VECTOR_DOWNWARD_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
#include "flatbuffers/default_allocator.h"
|
||||
#include "flatbuffers/detached_buffer.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
// This is a minimal replication of std::vector<uint8_t> functionality,
|
||||
// except growing from higher to lower addresses. i.e. push_back() inserts data
|
||||
// in the lowest address in the vector.
|
||||
// Since this vector leaves the lower part unused, we support a "scratch-pad"
|
||||
// that can be stored there for temporary data, to share the allocated space.
|
||||
// Essentially, this supports 2 std::vectors in a single buffer.
|
||||
template<typename SizeT = uoffset_t> class vector_downward {
|
||||
public:
|
||||
explicit vector_downward(size_t initial_size, Allocator *allocator,
|
||||
bool own_allocator, size_t buffer_minalign,
|
||||
const SizeT max_size = FLATBUFFERS_MAX_BUFFER_SIZE)
|
||||
: allocator_(allocator),
|
||||
own_allocator_(own_allocator),
|
||||
initial_size_(initial_size),
|
||||
max_size_(max_size),
|
||||
buffer_minalign_(buffer_minalign),
|
||||
reserved_(0),
|
||||
size_(0),
|
||||
buf_(nullptr),
|
||||
cur_(nullptr),
|
||||
scratch_(nullptr) {}
|
||||
|
||||
vector_downward(vector_downward &&other) noexcept
|
||||
// clang-format on
|
||||
: allocator_(other.allocator_),
|
||||
own_allocator_(other.own_allocator_),
|
||||
initial_size_(other.initial_size_),
|
||||
max_size_(other.max_size_),
|
||||
buffer_minalign_(other.buffer_minalign_),
|
||||
reserved_(other.reserved_),
|
||||
size_(other.size_),
|
||||
buf_(other.buf_),
|
||||
cur_(other.cur_),
|
||||
scratch_(other.scratch_) {
|
||||
// No change in other.allocator_
|
||||
// No change in other.initial_size_
|
||||
// No change in other.buffer_minalign_
|
||||
other.own_allocator_ = false;
|
||||
other.reserved_ = 0;
|
||||
other.buf_ = nullptr;
|
||||
other.cur_ = nullptr;
|
||||
other.scratch_ = nullptr;
|
||||
}
|
||||
|
||||
vector_downward &operator=(vector_downward &&other) noexcept {
|
||||
// Move construct a temporary and swap idiom
|
||||
vector_downward temp(std::move(other));
|
||||
swap(temp);
|
||||
return *this;
|
||||
}
|
||||
|
||||
~vector_downward() {
|
||||
clear_buffer();
|
||||
clear_allocator();
|
||||
}
|
||||
|
||||
void reset() {
|
||||
clear_buffer();
|
||||
clear();
|
||||
}
|
||||
|
||||
void clear() {
|
||||
if (buf_) {
|
||||
cur_ = buf_ + reserved_;
|
||||
} else {
|
||||
reserved_ = 0;
|
||||
cur_ = nullptr;
|
||||
}
|
||||
size_ = 0;
|
||||
clear_scratch();
|
||||
}
|
||||
|
||||
void clear_scratch() { scratch_ = buf_; }
|
||||
|
||||
void clear_allocator() {
|
||||
if (own_allocator_ && allocator_) { delete allocator_; }
|
||||
allocator_ = nullptr;
|
||||
own_allocator_ = false;
|
||||
}
|
||||
|
||||
void clear_buffer() {
|
||||
if (buf_) Deallocate(allocator_, buf_, reserved_);
|
||||
buf_ = nullptr;
|
||||
}
|
||||
|
||||
// Relinquish the pointer to the caller.
|
||||
uint8_t *release_raw(size_t &allocated_bytes, size_t &offset) {
|
||||
auto *buf = buf_;
|
||||
allocated_bytes = reserved_;
|
||||
offset = vector_downward::offset();
|
||||
|
||||
// release_raw only relinquishes the buffer ownership.
|
||||
// Does not deallocate or reset the allocator. Destructor will do that.
|
||||
buf_ = nullptr;
|
||||
clear();
|
||||
return buf;
|
||||
}
|
||||
|
||||
// Relinquish the pointer to the caller.
|
||||
DetachedBuffer release() {
|
||||
// allocator ownership (if any) is transferred to DetachedBuffer.
|
||||
DetachedBuffer fb(allocator_, own_allocator_, buf_, reserved_, cur_,
|
||||
size());
|
||||
if (own_allocator_) {
|
||||
allocator_ = nullptr;
|
||||
own_allocator_ = false;
|
||||
}
|
||||
buf_ = nullptr;
|
||||
clear();
|
||||
return fb;
|
||||
}
|
||||
|
||||
size_t ensure_space(size_t len) {
|
||||
FLATBUFFERS_ASSERT(cur_ >= scratch_ && scratch_ >= buf_);
|
||||
// If the length is larger than the unused part of the buffer, we need to
|
||||
// grow.
|
||||
if (len > unused_buffer_size()) { reallocate(len); }
|
||||
FLATBUFFERS_ASSERT(size() < max_size_);
|
||||
return len;
|
||||
}
|
||||
|
||||
inline uint8_t *make_space(size_t len) {
|
||||
if (len) {
|
||||
ensure_space(len);
|
||||
cur_ -= len;
|
||||
size_ += static_cast<SizeT>(len);
|
||||
}
|
||||
return cur_;
|
||||
}
|
||||
|
||||
// Returns nullptr if using the DefaultAllocator.
|
||||
Allocator *get_custom_allocator() { return allocator_; }
|
||||
|
||||
// The current offset into the buffer.
|
||||
size_t offset() const { return cur_ - buf_; }
|
||||
|
||||
// The total size of the vector (both the buffer and scratch parts).
|
||||
inline SizeT size() const { return size_; }
|
||||
|
||||
// The size of the buffer part of the vector that is currently unused.
|
||||
SizeT unused_buffer_size() const { return static_cast<SizeT>(cur_ - scratch_); }
|
||||
|
||||
// The size of the scratch part of the vector.
|
||||
SizeT scratch_size() const { return static_cast<SizeT>(scratch_ - buf_); }
|
||||
|
||||
size_t capacity() const { return reserved_; }
|
||||
|
||||
uint8_t *data() const {
|
||||
FLATBUFFERS_ASSERT(cur_);
|
||||
return cur_;
|
||||
}
|
||||
|
||||
uint8_t *scratch_data() const {
|
||||
FLATBUFFERS_ASSERT(buf_);
|
||||
return buf_;
|
||||
}
|
||||
|
||||
uint8_t *scratch_end() const {
|
||||
FLATBUFFERS_ASSERT(scratch_);
|
||||
return scratch_;
|
||||
}
|
||||
|
||||
uint8_t *data_at(size_t offset) const { return buf_ + reserved_ - offset; }
|
||||
|
||||
void push(const uint8_t *bytes, size_t num) {
|
||||
if (num > 0) { memcpy(make_space(num), bytes, num); }
|
||||
}
|
||||
|
||||
// Specialized version of push() that avoids memcpy call for small data.
|
||||
template<typename T> void push_small(const T &little_endian_t) {
|
||||
make_space(sizeof(T));
|
||||
*reinterpret_cast<T *>(cur_) = little_endian_t;
|
||||
}
|
||||
|
||||
template<typename T> void scratch_push_small(const T &t) {
|
||||
ensure_space(sizeof(T));
|
||||
*reinterpret_cast<T *>(scratch_) = t;
|
||||
scratch_ += sizeof(T);
|
||||
}
|
||||
|
||||
// fill() is most frequently called with small byte counts (<= 4),
|
||||
// which is why we're using loops rather than calling memset.
|
||||
void fill(size_t zero_pad_bytes) {
|
||||
make_space(zero_pad_bytes);
|
||||
for (size_t i = 0; i < zero_pad_bytes; i++) cur_[i] = 0;
|
||||
}
|
||||
|
||||
// Version for when we know the size is larger.
|
||||
// Precondition: zero_pad_bytes > 0
|
||||
void fill_big(size_t zero_pad_bytes) {
|
||||
memset(make_space(zero_pad_bytes), 0, zero_pad_bytes);
|
||||
}
|
||||
|
||||
void pop(size_t bytes_to_remove) {
|
||||
cur_ += bytes_to_remove;
|
||||
size_ -= static_cast<SizeT>(bytes_to_remove);
|
||||
}
|
||||
|
||||
void scratch_pop(size_t bytes_to_remove) { scratch_ -= bytes_to_remove; }
|
||||
|
||||
void swap(vector_downward &other) {
|
||||
using std::swap;
|
||||
swap(allocator_, other.allocator_);
|
||||
swap(own_allocator_, other.own_allocator_);
|
||||
swap(initial_size_, other.initial_size_);
|
||||
swap(buffer_minalign_, other.buffer_minalign_);
|
||||
swap(reserved_, other.reserved_);
|
||||
swap(size_, other.size_);
|
||||
swap(max_size_, other.max_size_);
|
||||
swap(buf_, other.buf_);
|
||||
swap(cur_, other.cur_);
|
||||
swap(scratch_, other.scratch_);
|
||||
}
|
||||
|
||||
void swap_allocator(vector_downward &other) {
|
||||
using std::swap;
|
||||
swap(allocator_, other.allocator_);
|
||||
swap(own_allocator_, other.own_allocator_);
|
||||
}
|
||||
|
||||
private:
|
||||
// You shouldn't really be copying instances of this class.
|
||||
FLATBUFFERS_DELETE_FUNC(vector_downward(const vector_downward &));
|
||||
FLATBUFFERS_DELETE_FUNC(vector_downward &operator=(const vector_downward &));
|
||||
|
||||
Allocator *allocator_;
|
||||
bool own_allocator_;
|
||||
size_t initial_size_;
|
||||
|
||||
// The maximum size the vector can be.
|
||||
SizeT max_size_;
|
||||
size_t buffer_minalign_;
|
||||
size_t reserved_;
|
||||
SizeT size_;
|
||||
uint8_t *buf_;
|
||||
uint8_t *cur_; // Points at location between empty (below) and used (above).
|
||||
uint8_t *scratch_; // Points to the end of the scratchpad in use.
|
||||
|
||||
void reallocate(size_t len) {
|
||||
auto old_reserved = reserved_;
|
||||
auto old_size = size();
|
||||
auto old_scratch_size = scratch_size();
|
||||
reserved_ +=
|
||||
(std::max)(len, old_reserved ? old_reserved / 2 : initial_size_);
|
||||
reserved_ = (reserved_ + buffer_minalign_ - 1) & ~(buffer_minalign_ - 1);
|
||||
if (buf_) {
|
||||
buf_ = ReallocateDownward(allocator_, buf_, old_reserved, reserved_,
|
||||
old_size, old_scratch_size);
|
||||
} else {
|
||||
buf_ = Allocate(allocator_, reserved_);
|
||||
}
|
||||
cur_ = buf_ + reserved_ - old_size;
|
||||
scratch_ = buf_ + old_scratch_size;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_VECTOR_DOWNWARD_H_
|
||||
+330
@@ -0,0 +1,330 @@
|
||||
/*
|
||||
* Copyright 2021 Google Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_VERIFIER_H_
|
||||
#define FLATBUFFERS_VERIFIER_H_
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
#include "flatbuffers/vector.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
// Helper class to verify the integrity of a FlatBuffer
|
||||
class Verifier FLATBUFFERS_FINAL_CLASS {
|
||||
public:
|
||||
struct Options {
|
||||
// The maximum nesting of tables and vectors before we call it invalid.
|
||||
uoffset_t max_depth = 64;
|
||||
// The maximum number of tables we will verify before we call it invalid.
|
||||
uoffset_t max_tables = 1000000;
|
||||
// If true, verify all data is aligned.
|
||||
bool check_alignment = true;
|
||||
// If true, run verifier on nested flatbuffers
|
||||
bool check_nested_flatbuffers = true;
|
||||
// The maximum size of a buffer.
|
||||
size_t max_size = FLATBUFFERS_MAX_BUFFER_SIZE;
|
||||
// Use assertions to check for errors.
|
||||
bool assert = false;
|
||||
};
|
||||
|
||||
explicit Verifier(const uint8_t *const buf, const size_t buf_len,
|
||||
const Options &opts)
|
||||
: buf_(buf), size_(buf_len), opts_(opts) {
|
||||
FLATBUFFERS_ASSERT(size_ < opts.max_size);
|
||||
}
|
||||
|
||||
// Deprecated API, please construct with Verifier::Options.
|
||||
Verifier(const uint8_t *const buf, const size_t buf_len,
|
||||
const uoffset_t max_depth = 64, const uoffset_t max_tables = 1000000,
|
||||
const bool check_alignment = true)
|
||||
: Verifier(buf, buf_len, [&] {
|
||||
Options opts;
|
||||
opts.max_depth = max_depth;
|
||||
opts.max_tables = max_tables;
|
||||
opts.check_alignment = check_alignment;
|
||||
return opts;
|
||||
}()) {}
|
||||
|
||||
// Central location where any verification failures register.
|
||||
bool Check(const bool ok) const {
|
||||
// clang-format off
|
||||
#ifdef FLATBUFFERS_DEBUG_VERIFICATION_FAILURE
|
||||
if (opts_.assert) { FLATBUFFERS_ASSERT(ok); }
|
||||
#endif
|
||||
#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
|
||||
if (!ok)
|
||||
upper_bound_ = 0;
|
||||
#endif
|
||||
// clang-format on
|
||||
return ok;
|
||||
}
|
||||
|
||||
// Verify any range within the buffer.
|
||||
bool Verify(const size_t elem, const size_t elem_len) const {
|
||||
// clang-format off
|
||||
#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
|
||||
auto upper_bound = elem + elem_len;
|
||||
if (upper_bound_ < upper_bound)
|
||||
upper_bound_ = upper_bound;
|
||||
#endif
|
||||
// clang-format on
|
||||
return Check(elem_len < size_ && elem <= size_ - elem_len);
|
||||
}
|
||||
|
||||
bool VerifyAlignment(const size_t elem, const size_t align) const {
|
||||
return Check((elem & (align - 1)) == 0 || !opts_.check_alignment);
|
||||
}
|
||||
|
||||
// Verify a range indicated by sizeof(T).
|
||||
template<typename T> bool Verify(const size_t elem) const {
|
||||
return VerifyAlignment(elem, sizeof(T)) && Verify(elem, sizeof(T));
|
||||
}
|
||||
|
||||
bool VerifyFromPointer(const uint8_t *const p, const size_t len) {
|
||||
return Verify(static_cast<size_t>(p - buf_), len);
|
||||
}
|
||||
|
||||
// Verify relative to a known-good base pointer.
|
||||
bool VerifyFieldStruct(const uint8_t *const base, const voffset_t elem_off,
|
||||
const size_t elem_len, const size_t align) const {
|
||||
const auto f = static_cast<size_t>(base - buf_) + elem_off;
|
||||
return VerifyAlignment(f, align) && Verify(f, elem_len);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool VerifyField(const uint8_t *const base, const voffset_t elem_off,
|
||||
const size_t align) const {
|
||||
const auto f = static_cast<size_t>(base - buf_) + elem_off;
|
||||
return VerifyAlignment(f, align) && Verify(f, sizeof(T));
|
||||
}
|
||||
|
||||
// Verify a pointer (may be NULL) of a table type.
|
||||
template<typename T> bool VerifyTable(const T *const table) {
|
||||
return !table || table->Verify(*this);
|
||||
}
|
||||
|
||||
// Verify a pointer (may be NULL) of any vector type.
|
||||
template<int &..., typename T, typename LenT>
|
||||
bool VerifyVector(const Vector<T, LenT> *const vec) const {
|
||||
return !vec || VerifyVectorOrString<LenT>(
|
||||
reinterpret_cast<const uint8_t *>(vec), sizeof(T));
|
||||
}
|
||||
|
||||
// Verify a pointer (may be NULL) of a vector to struct.
|
||||
template<int &..., typename T, typename LenT>
|
||||
bool VerifyVector(const Vector<const T *, LenT> *const vec) const {
|
||||
return VerifyVector(reinterpret_cast<const Vector<T, LenT> *>(vec));
|
||||
}
|
||||
|
||||
// Verify a pointer (may be NULL) to string.
|
||||
bool VerifyString(const String *const str) const {
|
||||
size_t end;
|
||||
return !str || (VerifyVectorOrString<uoffset_t>(
|
||||
reinterpret_cast<const uint8_t *>(str), 1, &end) &&
|
||||
Verify(end, 1) && // Must have terminator
|
||||
Check(buf_[end] == '\0')); // Terminating byte must be 0.
|
||||
}
|
||||
|
||||
// Common code between vectors and strings.
|
||||
template<typename LenT = uoffset_t>
|
||||
bool VerifyVectorOrString(const uint8_t *const vec, const size_t elem_size,
|
||||
size_t *const end = nullptr) const {
|
||||
const auto vec_offset = static_cast<size_t>(vec - buf_);
|
||||
// Check we can read the size field.
|
||||
if (!Verify<LenT>(vec_offset)) return false;
|
||||
// Check the whole array. If this is a string, the byte past the array must
|
||||
// be 0.
|
||||
const LenT size = ReadScalar<LenT>(vec);
|
||||
const auto max_elems = opts_.max_size / elem_size;
|
||||
if (!Check(size < max_elems))
|
||||
return false; // Protect against byte_size overflowing.
|
||||
const auto byte_size = sizeof(LenT) + elem_size * size;
|
||||
if (end) *end = vec_offset + byte_size;
|
||||
return Verify(vec_offset, byte_size);
|
||||
}
|
||||
|
||||
// Special case for string contents, after the above has been called.
|
||||
bool VerifyVectorOfStrings(const Vector<Offset<String>> *const vec) const {
|
||||
if (vec) {
|
||||
for (uoffset_t i = 0; i < vec->size(); i++) {
|
||||
if (!VerifyString(vec->Get(i))) return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Special case for table contents, after the above has been called.
|
||||
template<typename T>
|
||||
bool VerifyVectorOfTables(const Vector<Offset<T>> *const vec) {
|
||||
if (vec) {
|
||||
for (uoffset_t i = 0; i < vec->size(); i++) {
|
||||
if (!vec->Get(i)->Verify(*this)) return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
__suppress_ubsan__("unsigned-integer-overflow") bool VerifyTableStart(
|
||||
const uint8_t *const table) {
|
||||
// Check the vtable offset.
|
||||
const auto tableo = static_cast<size_t>(table - buf_);
|
||||
if (!Verify<soffset_t>(tableo)) return false;
|
||||
// This offset may be signed, but doing the subtraction unsigned always
|
||||
// gives the result we want.
|
||||
const auto vtableo =
|
||||
tableo - static_cast<size_t>(ReadScalar<soffset_t>(table));
|
||||
// Check the vtable size field, then check vtable fits in its entirety.
|
||||
if (!(VerifyComplexity() && Verify<voffset_t>(vtableo) &&
|
||||
VerifyAlignment(ReadScalar<voffset_t>(buf_ + vtableo),
|
||||
sizeof(voffset_t))))
|
||||
return false;
|
||||
const auto vsize = ReadScalar<voffset_t>(buf_ + vtableo);
|
||||
return Check((vsize & 1) == 0) && Verify(vtableo, vsize);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool VerifyBufferFromStart(const char *const identifier, const size_t start) {
|
||||
// Buffers have to be of some size to be valid. The reason it is a runtime
|
||||
// check instead of static_assert, is that nested flatbuffers go through
|
||||
// this call and their size is determined at runtime.
|
||||
if (!Check(size_ >= FLATBUFFERS_MIN_BUFFER_SIZE)) return false;
|
||||
|
||||
// If an identifier is provided, check that we have a buffer
|
||||
if (identifier && !Check((size_ >= 2 * sizeof(flatbuffers::uoffset_t) &&
|
||||
BufferHasIdentifier(buf_ + start, identifier)))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Call T::Verify, which must be in the generated code for this type.
|
||||
const auto o = VerifyOffset<uoffset_t>(start);
|
||||
return Check(o != 0) &&
|
||||
reinterpret_cast<const T *>(buf_ + start + o)->Verify(*this)
|
||||
// clang-format off
|
||||
#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
|
||||
&& GetComputedSize()
|
||||
#endif
|
||||
;
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
template<typename T, int &..., typename SizeT>
|
||||
bool VerifyNestedFlatBuffer(const Vector<uint8_t, SizeT> *const buf,
|
||||
const char *const identifier) {
|
||||
// Caller opted out of this.
|
||||
if (!opts_.check_nested_flatbuffers) return true;
|
||||
|
||||
// An empty buffer is OK as it indicates not present.
|
||||
if (!buf) return true;
|
||||
|
||||
// If there is a nested buffer, it must be greater than the min size.
|
||||
if (!Check(buf->size() >= FLATBUFFERS_MIN_BUFFER_SIZE)) return false;
|
||||
|
||||
Verifier nested_verifier(buf->data(), buf->size(), opts_);
|
||||
return nested_verifier.VerifyBuffer<T>(identifier);
|
||||
}
|
||||
|
||||
// Verify this whole buffer, starting with root type T.
|
||||
template<typename T> bool VerifyBuffer() { return VerifyBuffer<T>(nullptr); }
|
||||
|
||||
template<typename T> bool VerifyBuffer(const char *const identifier) {
|
||||
return VerifyBufferFromStart<T>(identifier, 0);
|
||||
}
|
||||
|
||||
template<typename T, typename SizeT = uoffset_t>
|
||||
bool VerifySizePrefixedBuffer(const char *const identifier) {
|
||||
return Verify<SizeT>(0U) &&
|
||||
Check(ReadScalar<SizeT>(buf_) == size_ - sizeof(SizeT)) &&
|
||||
VerifyBufferFromStart<T>(identifier, sizeof(SizeT));
|
||||
}
|
||||
|
||||
template<typename OffsetT = uoffset_t, typename SOffsetT = soffset_t>
|
||||
size_t VerifyOffset(const size_t start) const {
|
||||
if (!Verify<OffsetT>(start)) return 0;
|
||||
const auto o = ReadScalar<OffsetT>(buf_ + start);
|
||||
// May not point to itself.
|
||||
if (!Check(o != 0)) return 0;
|
||||
// Can't wrap around larger than the max size.
|
||||
if (!Check(static_cast<SOffsetT>(o) >= 0)) return 0;
|
||||
// Must be inside the buffer to create a pointer from it (pointer outside
|
||||
// buffer is UB).
|
||||
if (!Verify(start + o, 1)) return 0;
|
||||
return o;
|
||||
}
|
||||
|
||||
template<typename OffsetT = uoffset_t>
|
||||
size_t VerifyOffset(const uint8_t *const base, const voffset_t start) const {
|
||||
return VerifyOffset<OffsetT>(static_cast<size_t>(base - buf_) + start);
|
||||
}
|
||||
|
||||
// Called at the start of a table to increase counters measuring data
|
||||
// structure depth and amount, and possibly bails out with false if limits set
|
||||
// by the constructor have been hit. Needs to be balanced with EndTable().
|
||||
bool VerifyComplexity() {
|
||||
depth_++;
|
||||
num_tables_++;
|
||||
return Check(depth_ <= opts_.max_depth && num_tables_ <= opts_.max_tables);
|
||||
}
|
||||
|
||||
// Called at the end of a table to pop the depth count.
|
||||
bool EndTable() {
|
||||
depth_--;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Returns the message size in bytes
|
||||
size_t GetComputedSize() const {
|
||||
// clang-format off
|
||||
#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
|
||||
uintptr_t size = upper_bound_;
|
||||
// Align the size to uoffset_t
|
||||
size = (size - 1 + sizeof(uoffset_t)) & ~(sizeof(uoffset_t) - 1);
|
||||
return (size > size_) ? 0 : size;
|
||||
#else
|
||||
// Must turn on FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE for this to work.
|
||||
(void)upper_bound_;
|
||||
FLATBUFFERS_ASSERT(false);
|
||||
return 0;
|
||||
#endif
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
std::vector<uint8_t> *GetFlexReuseTracker() { return flex_reuse_tracker_; }
|
||||
|
||||
void SetFlexReuseTracker(std::vector<uint8_t> *const rt) {
|
||||
flex_reuse_tracker_ = rt;
|
||||
}
|
||||
|
||||
private:
|
||||
const uint8_t *buf_;
|
||||
const size_t size_;
|
||||
const Options opts_;
|
||||
|
||||
mutable size_t upper_bound_ = 0;
|
||||
|
||||
uoffset_t depth_ = 0;
|
||||
uoffset_t num_tables_ = 0;
|
||||
std::vector<uint8_t> *flex_reuse_tracker_ = nullptr;
|
||||
};
|
||||
|
||||
// Specialization for 64-bit offsets.
|
||||
template<>
|
||||
inline size_t Verifier::VerifyOffset<uoffset64_t>(const size_t start) const {
|
||||
return VerifyOffset<uoffset64_t, soffset64_t>(start);
|
||||
}
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_VERIFIER_H_
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
cmake_minimum_required(VERSION ${MIN_VER_CMAKE} FATAL_ERROR)
|
||||
|
||||
set(HAL_LIB_NAME "")
|
||||
|
||||
set(RVV_HAL_FOUND TRUE CACHE INTERNAL "")
|
||||
set(RVV_HAL_VERSION "0.0.1" CACHE INTERNAL "")
|
||||
set(RVV_HAL_LIBRARIES ${HAL_LIB_NAME} CACHE INTERNAL "")
|
||||
set(RVV_HAL_HEADERS "hal_rvv.hpp" CACHE INTERNAL "")
|
||||
set(RVV_HAL_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "")
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
#ifndef OPENCV_HAL_RVV_HPP_INCLUDED
|
||||
#define OPENCV_HAL_RVV_HPP_INCLUDED
|
||||
|
||||
#include "opencv2/core/hal/interface.h"
|
||||
|
||||
#ifndef CV_HAL_RVV_071_ENABLED
|
||||
# if defined(__GNUC__) && __GNUC__ == 10 && __GNUC_MINOR__ == 4 && defined(__THEAD_VERSION__) && defined(__riscv_v) && __riscv_v == 7000
|
||||
# define CV_HAL_RVV_071_ENABLED 1
|
||||
# else
|
||||
# define CV_HAL_RVV_071_ENABLED 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if CV_HAL_RVV_071_ENABLED
|
||||
#include "version/hal_rvv_071.hpp"
|
||||
#endif
|
||||
|
||||
#if defined(__riscv_v) && __riscv_v == 1000000
|
||||
#include "hal_rvv_1p0/merge.hpp" // core
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+366
@@ -0,0 +1,366 @@
|
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
#ifndef OPENCV_HAL_RVV_MERGE_HPP_INCLUDED
|
||||
#define OPENCV_HAL_RVV_MERGE_HPP_INCLUDED
|
||||
|
||||
#include <riscv_vector.h>
|
||||
|
||||
namespace cv { namespace cv_hal_rvv {
|
||||
|
||||
#undef cv_hal_merge8u
|
||||
#define cv_hal_merge8u cv::cv_hal_rvv::merge8u
|
||||
#undef cv_hal_merge16u
|
||||
#define cv_hal_merge16u cv::cv_hal_rvv::merge16u
|
||||
#undef cv_hal_merge32s
|
||||
#define cv_hal_merge32s cv::cv_hal_rvv::merge32s
|
||||
#undef cv_hal_merge64s
|
||||
#define cv_hal_merge64s cv::cv_hal_rvv::merge64s
|
||||
|
||||
#if defined __GNUC__
|
||||
__attribute__((optimize("no-tree-vectorize")))
|
||||
#endif
|
||||
static int merge8u(const uchar** src, uchar* dst, int len, int cn ) {
|
||||
int k = cn % 4 ? cn % 4 : 4;
|
||||
int i = 0, j;
|
||||
int vl = __riscv_vsetvlmax_e8m1();
|
||||
if( k == 1 )
|
||||
{
|
||||
const uchar* src0 = src[0];
|
||||
for( ; i <= len - vl; i += vl)
|
||||
{
|
||||
auto a = __riscv_vle8_v_u8m1(src0 + i, vl);
|
||||
__riscv_vsse8_v_u8m1(dst + i*cn, sizeof(uchar)*2, a, vl);
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++)
|
||||
dst[i*cn] = src0[i];
|
||||
}
|
||||
else if( k == 2 )
|
||||
{
|
||||
const uchar *src0 = src[0], *src1 = src[1];
|
||||
for( ; i <= len - vl; i += vl)
|
||||
{
|
||||
auto a = __riscv_vle8_v_u8m1(src0 + i, vl);
|
||||
auto b = __riscv_vle8_v_u8m1(src1 + i, vl);
|
||||
__riscv_vsse8_v_u8m1(dst + i*cn, sizeof(uchar)*2, a, vl);
|
||||
__riscv_vsse8_v_u8m1(dst + i*cn + 1, sizeof(uchar)*2, b, vl);
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++ )
|
||||
{
|
||||
dst[i*cn] = src0[i];
|
||||
dst[i*cn+1] = src1[i];
|
||||
}
|
||||
}
|
||||
else if( k == 3 )
|
||||
{
|
||||
const uchar *src0 = src[0], *src1 = src[1], *src2 = src[2];
|
||||
for( ; i <= len - vl; i += vl)
|
||||
{
|
||||
auto a = __riscv_vle8_v_u8m1(src0 + i, vl);
|
||||
auto b = __riscv_vle8_v_u8m1(src1 + i, vl);
|
||||
auto c = __riscv_vle8_v_u8m1(src2 + i, vl);
|
||||
__riscv_vsse8_v_u8m1(dst + i*cn, sizeof(uchar)*3, a, vl);
|
||||
__riscv_vsse8_v_u8m1(dst + i*cn + 1, sizeof(uchar)*3, b, vl);
|
||||
__riscv_vsse8_v_u8m1(dst + i*cn + 2, sizeof(uchar)*3, c, vl);
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++ )
|
||||
{
|
||||
dst[i*cn] = src0[i];
|
||||
dst[i*cn+1] = src1[i];
|
||||
dst[i*cn+2] = src2[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const uchar *src0 = src[0], *src1 = src[1], *src2 = src[2], *src3 = src[3];
|
||||
for( ; i <= len - vl; i += vl)
|
||||
{
|
||||
auto a = __riscv_vle8_v_u8m1(src0 + i, vl);
|
||||
auto b = __riscv_vle8_v_u8m1(src1 + i, vl);
|
||||
auto c = __riscv_vle8_v_u8m1(src2 + i, vl);
|
||||
auto d = __riscv_vle8_v_u8m1(src3 + i, vl);
|
||||
__riscv_vsse8_v_u8m1(dst + i*cn, sizeof(uchar)*4, a, vl);
|
||||
__riscv_vsse8_v_u8m1(dst + i*cn + 1, sizeof(uchar)*4, b, vl);
|
||||
__riscv_vsse8_v_u8m1(dst + i*cn + 2, sizeof(uchar)*4, c, vl);
|
||||
__riscv_vsse8_v_u8m1(dst + i*cn + 3, sizeof(uchar)*4, d, vl);
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++ )
|
||||
{
|
||||
dst[i*cn] = src0[i];
|
||||
dst[i*cn+1] = src1[i];
|
||||
dst[i*cn+2] = src2[i];
|
||||
dst[i*cn+3] = src3[i];
|
||||
}
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; k < cn; k += 4 )
|
||||
{
|
||||
const uchar *src0 = src[k], *src1 = src[k+1], *src2 = src[k+2], *src3 = src[k+3];
|
||||
for( i = 0, j = k; i < len; i++, j += cn )
|
||||
{
|
||||
dst[j] = src0[i]; dst[j+1] = src1[i];
|
||||
dst[j+2] = src2[i]; dst[j+3] = src3[i];
|
||||
}
|
||||
}
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
|
||||
#if defined __GNUC__
|
||||
__attribute__((optimize("no-tree-vectorize")))
|
||||
#endif
|
||||
static int merge16u(const ushort** src, ushort* dst, int len, int cn ) {
|
||||
int k = cn % 4 ? cn % 4 : 4;
|
||||
int i = 0, j;
|
||||
int vl = __riscv_vsetvlmax_e16m1();
|
||||
if( k == 1 )
|
||||
{
|
||||
const ushort* src0 = src[0];
|
||||
for( ; i <= len - vl; i += vl)
|
||||
{
|
||||
auto a = __riscv_vle16_v_u16m1(src0 + i, vl);
|
||||
__riscv_vsse16_v_u16m1(dst + i*cn, sizeof(ushort)*2, a, vl);
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++)
|
||||
dst[i*cn] = src0[i];
|
||||
}
|
||||
else if( k == 2 )
|
||||
{
|
||||
const ushort *src0 = src[0], *src1 = src[1];
|
||||
for( ; i <= len - vl; i += vl)
|
||||
{
|
||||
auto a = __riscv_vle16_v_u16m1(src0 + i, vl);
|
||||
auto b = __riscv_vle16_v_u16m1(src1 + i, vl);
|
||||
__riscv_vsse16_v_u16m1(dst + i*cn, sizeof(ushort)*2, a, vl);
|
||||
__riscv_vsse16_v_u16m1(dst + i*cn + 1, sizeof(ushort)*2, b, vl);
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++ )
|
||||
{
|
||||
dst[i*cn] = src0[i];
|
||||
dst[i*cn+1] = src1[i];
|
||||
}
|
||||
}
|
||||
else if( k == 3 )
|
||||
{
|
||||
const ushort *src0 = src[0], *src1 = src[1], *src2 = src[2];
|
||||
for( ; i <= len - vl; i += vl)
|
||||
{
|
||||
auto a = __riscv_vle16_v_u16m1(src0 + i, vl);
|
||||
auto b = __riscv_vle16_v_u16m1(src1 + i, vl);
|
||||
auto c = __riscv_vle16_v_u16m1(src2 + i, vl);
|
||||
__riscv_vsse16_v_u16m1(dst + i*cn, sizeof(ushort)*3, a, vl);
|
||||
__riscv_vsse16_v_u16m1(dst + i*cn + 1, sizeof(ushort)*3, b, vl);
|
||||
__riscv_vsse16_v_u16m1(dst + i*cn + 2, sizeof(ushort)*3, c, vl);
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++ )
|
||||
{
|
||||
dst[i*cn] = src0[i];
|
||||
dst[i*cn+1] = src1[i];
|
||||
dst[i*cn+2] = src2[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const ushort *src0 = src[0], *src1 = src[1], *src2 = src[2], *src3 = src[3];
|
||||
for( ; i <= len - vl; i += vl)
|
||||
{
|
||||
auto a = __riscv_vle16_v_u16m1(src0 + i, vl);
|
||||
auto b = __riscv_vle16_v_u16m1(src1 + i, vl);
|
||||
auto c = __riscv_vle16_v_u16m1(src2 + i, vl);
|
||||
auto d = __riscv_vle16_v_u16m1(src3 + i, vl);
|
||||
__riscv_vsse16_v_u16m1(dst + i*cn, sizeof(ushort)*4, a, vl);
|
||||
__riscv_vsse16_v_u16m1(dst + i*cn + 1, sizeof(ushort)*4, b, vl);
|
||||
__riscv_vsse16_v_u16m1(dst + i*cn + 2, sizeof(ushort)*4, c, vl);
|
||||
__riscv_vsse16_v_u16m1(dst + i*cn + 3, sizeof(ushort)*4, d, vl);
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++ )
|
||||
{
|
||||
dst[i*cn] = src0[i];
|
||||
dst[i*cn+1] = src1[i];
|
||||
dst[i*cn+2] = src2[i];
|
||||
dst[i*cn+3] = src3[i];
|
||||
}
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; k < cn; k += 4 )
|
||||
{
|
||||
const uint16_t *src0 = src[k], *src1 = src[k+1], *src2 = src[k+2], *src3 = src[k+3];
|
||||
for( i = 0, j = k; i < len; i++, j += cn )
|
||||
{
|
||||
dst[j] = src0[i]; dst[j+1] = src1[i];
|
||||
dst[j+2] = src2[i]; dst[j+3] = src3[i];
|
||||
}
|
||||
}
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
|
||||
#if defined __GNUC__
|
||||
__attribute__((optimize("no-tree-vectorize")))
|
||||
#endif
|
||||
static int merge32s(const int** src, int* dst, int len, int cn ) {
|
||||
int k = cn % 4 ? cn % 4 : 4;
|
||||
int i, j;
|
||||
if( k == 1 )
|
||||
{
|
||||
const int* src0 = src[0];
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( i = j = 0; i < len; i++, j += cn )
|
||||
dst[j] = src0[i];
|
||||
}
|
||||
else if( k == 2 )
|
||||
{
|
||||
const int *src0 = src[0], *src1 = src[1];
|
||||
i = j = 0;
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++, j += cn )
|
||||
{
|
||||
dst[j] = src0[i];
|
||||
dst[j+1] = src1[i];
|
||||
}
|
||||
}
|
||||
else if( k == 3 )
|
||||
{
|
||||
const int *src0 = src[0], *src1 = src[1], *src2 = src[2];
|
||||
i = j = 0;
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++, j += cn )
|
||||
{
|
||||
dst[j] = src0[i];
|
||||
dst[j+1] = src1[i];
|
||||
dst[j+2] = src2[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const int *src0 = src[0], *src1 = src[1], *src2 = src[2], *src3 = src[3];
|
||||
i = j = 0;
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++, j += cn )
|
||||
{
|
||||
dst[j] = src0[i]; dst[j+1] = src1[i];
|
||||
dst[j+2] = src2[i]; dst[j+3] = src3[i];
|
||||
}
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; k < cn; k += 4 )
|
||||
{
|
||||
const int *src0 = src[k], *src1 = src[k+1], *src2 = src[k+2], *src3 = src[k+3];
|
||||
for( i = 0, j = k; i < len; i++, j += cn )
|
||||
{
|
||||
dst[j] = src0[i]; dst[j+1] = src1[i];
|
||||
dst[j+2] = src2[i]; dst[j+3] = src3[i];
|
||||
}
|
||||
}
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
|
||||
#if defined __GNUC__
|
||||
__attribute__((optimize("no-tree-vectorize")))
|
||||
#endif
|
||||
static int merge64s(const int64** src, int64* dst, int len, int cn ) {
|
||||
int k = cn % 4 ? cn % 4 : 4;
|
||||
int i, j;
|
||||
if( k == 1 )
|
||||
{
|
||||
const int64* src0 = src[0];
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( i = j = 0; i < len; i++, j += cn )
|
||||
dst[j] = src0[i];
|
||||
}
|
||||
else if( k == 2 )
|
||||
{
|
||||
const int64 *src0 = src[0], *src1 = src[1];
|
||||
i = j = 0;
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++, j += cn )
|
||||
{
|
||||
dst[j] = src0[i];
|
||||
dst[j+1] = src1[i];
|
||||
}
|
||||
}
|
||||
else if( k == 3 )
|
||||
{
|
||||
const int64 *src0 = src[0], *src1 = src[1], *src2 = src[2];
|
||||
i = j = 0;
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++, j += cn )
|
||||
{
|
||||
dst[j] = src0[i];
|
||||
dst[j+1] = src1[i];
|
||||
dst[j+2] = src2[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const int64 *src0 = src[0], *src1 = src[1], *src2 = src[2], *src3 = src[3];
|
||||
i = j = 0;
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; i < len; i++, j += cn )
|
||||
{
|
||||
dst[j] = src0[i]; dst[j+1] = src1[i];
|
||||
dst[j+2] = src2[i]; dst[j+3] = src3[i];
|
||||
}
|
||||
}
|
||||
#if defined(__clang__)
|
||||
#pragma clang loop vectorize(disable)
|
||||
#endif
|
||||
for( ; k < cn; k += 4 )
|
||||
{
|
||||
const int64 *src0 = src[k], *src1 = src[k+1], *src2 = src[k+2], *src3 = src[k+3];
|
||||
for( i = 0, j = k; i < len; i++, j += cn )
|
||||
{
|
||||
dst[j] = src0[i]; dst[j+1] = src1[i];
|
||||
dst[j+2] = src2[i]; dst[j+3] = src3[i];
|
||||
}
|
||||
}
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
#ifndef OPENCV_HAL_RVV_071_HPP_INCLUDED
|
||||
#define OPENCV_HAL_RVV_071_HPP_INCLUDED
|
||||
|
||||
#include <riscv_vector.h>
|
||||
|
||||
#include <limits>
|
||||
|
||||
namespace cv { namespace cv_hal_rvv {
|
||||
|
||||
#undef cv_hal_cvtBGRtoBGR
|
||||
#define cv_hal_cvtBGRtoBGR cv::cv_hal_rvv::cvtBGRtoBGR
|
||||
|
||||
static const unsigned char index_array_32 [32]
|
||||
{ 2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15, 18, 17, 16, 19, 22, 21, 20, 23, 26, 25, 24, 27, 30, 29, 28, 31 };
|
||||
|
||||
static const unsigned char index_array_24 [24]
|
||||
{ 2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9, 14, 13, 12, 17, 16, 15, 20, 19, 18, 23, 22, 21 };
|
||||
|
||||
static void vBGRtoBGR(const unsigned char* src, unsigned char * dst, const unsigned char * index, int n, int scn, int dcn, int vsize_pixels, const int vsize)
|
||||
{
|
||||
vuint8m2_t vec_index = vle8_v_u8m2(index, vsize);
|
||||
|
||||
int i = 0;
|
||||
|
||||
for ( ; i <= n-vsize; i += vsize_pixels, src += vsize, dst += vsize)
|
||||
{
|
||||
vuint8m2_t vec_src = vle8_v_u8m2(src, vsize);
|
||||
vuint8m2_t vec_dst = vrgather_vv_u8m2(vec_src, vec_index, vsize);
|
||||
vse8_v_u8m2(dst, vec_dst, vsize);
|
||||
}
|
||||
|
||||
for ( ; i < n; i++, src += scn, dst += dcn )
|
||||
{
|
||||
unsigned char t0 = src[0], t1 = src[1], t2 = src[2];
|
||||
dst[2] = t0;
|
||||
dst[1] = t1;
|
||||
dst[0] = t2;
|
||||
if(dcn == 4)
|
||||
{
|
||||
unsigned char d = src[3];
|
||||
dst[3] = d;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sBGRtoBGR(const unsigned char* src, unsigned char * dst, int n, int scn, int dcn, int bi)
|
||||
{
|
||||
for (int i = 0; i < n; i++, src += scn, dst += dcn)
|
||||
{
|
||||
unsigned char t0 = src[0], t1 = src[1], t2 = src[2];
|
||||
dst[bi ] = t0;
|
||||
dst[1] = t1;
|
||||
dst[bi^2] = t2;
|
||||
if(dcn == 4)
|
||||
{
|
||||
unsigned char d = scn == 4 ? src[3] : std::numeric_limits<unsigned char>::max();
|
||||
dst[3] = d;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int cvtBGRtoBGR(const unsigned char * src_data, size_t src_step, unsigned char * dst_data, size_t dst_step, int width, int height, int depth, int scn, int dcn, bool swapBlue)
|
||||
{
|
||||
if (depth != CV_8U)
|
||||
{
|
||||
return CV_HAL_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
const int blueIdx = swapBlue ? 2 : 0;
|
||||
if (scn == dcn)
|
||||
{
|
||||
if (!swapBlue)
|
||||
{
|
||||
return CV_HAL_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
const int vsize_pixels = 8;
|
||||
|
||||
if (scn == 4)
|
||||
{
|
||||
for (int i = 0; i < height; i++, src_data += src_step, dst_data += dst_step)
|
||||
{
|
||||
vBGRtoBGR(src_data, dst_data, index_array_32, width, scn, dcn, vsize_pixels, 32);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < height; i++, src_data += src_step, dst_data += dst_step)
|
||||
{
|
||||
vBGRtoBGR(src_data, dst_data, index_array_24, width, scn, dcn, vsize_pixels, 24);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < height; i++, src_data += src_step, dst_data += dst_step)
|
||||
sBGRtoBGR(src_data, dst_data, width, scn, dcn, blueIdx);
|
||||
}
|
||||
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
+6
-14
@@ -2,19 +2,9 @@
|
||||
// File: vk_platform.h
|
||||
//
|
||||
/*
|
||||
** Copyright (c) 2014-2017 The Khronos Group Inc.
|
||||
** Copyright 2014-2023 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
|
||||
@@ -52,7 +42,7 @@ extern "C"
|
||||
#define VKAPI_CALL __stdcall
|
||||
#define VKAPI_PTR VKAPI_CALL
|
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||
#error "Vulkan isn't supported for the 'armeabi' NDK ABI"
|
||||
#error "Vulkan is not supported for the 'armeabi' NDK ABI"
|
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
|
||||
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
|
||||
// calling convention, i.e. float parameters are passed in registers. This
|
||||
@@ -68,7 +58,9 @@ extern "C"
|
||||
#define VKAPI_PTR
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#if !defined(VK_NO_STDDEF_H)
|
||||
#include <stddef.h>
|
||||
#endif // !defined(VK_NO_STDDEF_H)
|
||||
|
||||
#if !defined(VK_NO_STDINT_H)
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
|
||||
Vendored
+34
-18
@@ -2,19 +2,9 @@
|
||||
#define VULKAN_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "vk_platform.h"
|
||||
@@ -38,20 +28,16 @@
|
||||
#include "vulkan_macos.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MIR_KHR
|
||||
#include <mir_toolkit/client_types.h>
|
||||
#include "vulkan_mir.h"
|
||||
#ifdef VK_USE_PLATFORM_METAL_EXT
|
||||
#include "vulkan_metal.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_VI_NN
|
||||
#include "vulkan_vi.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
#include <wayland-client.h>
|
||||
#include "vulkan_wayland.h"
|
||||
#endif
|
||||
|
||||
@@ -74,10 +60,40 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
|
||||
#include <directfb.h>
|
||||
#include "vulkan_directfb.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#include "vulkan_xlib_xrandr.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_GGP
|
||||
#include <ggp_c/vulkan_types.h>
|
||||
#include "vulkan_ggp.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_SCREEN_QNX
|
||||
#include <screen/screen.h>
|
||||
#include "vulkan_screen.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_SCI
|
||||
#include <nvscisync.h>
|
||||
#include <nvscibuf.h>
|
||||
#include "vulkan_sci.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
#include "vulkan_beta.h"
|
||||
#endif
|
||||
|
||||
#endif // VULKAN_H_
|
||||
|
||||
+22
-23
@@ -1,24 +1,10 @@
|
||||
#ifndef VULKAN_ANDROID_H_
|
||||
#define VULKAN_ANDROID_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -27,14 +13,17 @@ extern "C" {
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_android_surface 1
|
||||
struct ANativeWindow;
|
||||
|
||||
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
|
||||
|
||||
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkAndroidSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
@@ -42,7 +31,6 @@ typedef struct VkAndroidSurfaceCreateInfoKHR {
|
||||
struct ANativeWindow* window;
|
||||
} VkAndroidSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
@@ -53,12 +41,11 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
||||
struct AHardwareBuffer;
|
||||
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 5
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
||||
|
||||
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
@@ -103,6 +90,18 @@ typedef struct VkExternalFormatANDROID {
|
||||
uint64_t externalFormat;
|
||||
} VkExternalFormatANDROID;
|
||||
|
||||
typedef struct VkAndroidHardwareBufferFormatProperties2ANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkFormat format;
|
||||
uint64_t externalFormat;
|
||||
VkFormatFeatureFlags2 formatFeatures;
|
||||
VkComponentMapping samplerYcbcrConversionComponents;
|
||||
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
||||
VkSamplerYcbcrRange suggestedYcbcrRange;
|
||||
VkChromaLocation suggestedXChromaOffset;
|
||||
VkChromaLocation suggestedYChromaOffset;
|
||||
} VkAndroidHardwareBufferFormatProperties2ANDROID;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
||||
|
||||
+492
@@ -0,0 +1,492 @@
|
||||
#ifndef VULKAN_BETA_H_
|
||||
#define VULKAN_BETA_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_portability_subset 1
|
||||
#define VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION 1
|
||||
#define VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME "VK_KHR_portability_subset"
|
||||
typedef struct VkPhysicalDevicePortabilitySubsetFeaturesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 constantAlphaColorBlendFactors;
|
||||
VkBool32 events;
|
||||
VkBool32 imageViewFormatReinterpretation;
|
||||
VkBool32 imageViewFormatSwizzle;
|
||||
VkBool32 imageView2DOn3DImage;
|
||||
VkBool32 multisampleArrayImage;
|
||||
VkBool32 mutableComparisonSamplers;
|
||||
VkBool32 pointPolygons;
|
||||
VkBool32 samplerMipLodBias;
|
||||
VkBool32 separateStencilMaskRef;
|
||||
VkBool32 shaderSampleRateInterpolationFunctions;
|
||||
VkBool32 tessellationIsolines;
|
||||
VkBool32 tessellationPointMode;
|
||||
VkBool32 triangleFans;
|
||||
VkBool32 vertexAttributeAccessBeyondStride;
|
||||
} VkPhysicalDevicePortabilitySubsetFeaturesKHR;
|
||||
|
||||
typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t minVertexInputBindingStrideAlignment;
|
||||
} VkPhysicalDevicePortabilitySubsetPropertiesKHR;
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_video_encode_queue 1
|
||||
#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 8
|
||||
#define VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME "VK_KHR_video_encode_queue"
|
||||
|
||||
typedef enum VkVideoEncodeTuningModeKHR {
|
||||
VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0,
|
||||
VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1,
|
||||
VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2,
|
||||
VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3,
|
||||
VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4,
|
||||
VK_VIDEO_ENCODE_TUNING_MODE_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoEncodeTuningModeKHR;
|
||||
typedef VkFlags VkVideoEncodeFlagsKHR;
|
||||
|
||||
typedef enum VkVideoEncodeCapabilityFlagBitsKHR {
|
||||
VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_ENCODE_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoEncodeCapabilityFlagBitsKHR;
|
||||
typedef VkFlags VkVideoEncodeCapabilityFlagsKHR;
|
||||
|
||||
typedef enum VkVideoEncodeRateControlModeFlagBitsKHR {
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR = 0,
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 0x00000002,
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 0x00000004,
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoEncodeRateControlModeFlagBitsKHR;
|
||||
typedef VkFlags VkVideoEncodeRateControlModeFlagsKHR;
|
||||
|
||||
typedef enum VkVideoEncodeFeedbackFlagBitsKHR {
|
||||
VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002,
|
||||
VK_VIDEO_ENCODE_FEEDBACK_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoEncodeFeedbackFlagBitsKHR;
|
||||
typedef VkFlags VkVideoEncodeFeedbackFlagsKHR;
|
||||
|
||||
typedef enum VkVideoEncodeUsageFlagBitsKHR {
|
||||
VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0,
|
||||
VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 0x00000002,
|
||||
VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 0x00000004,
|
||||
VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 0x00000008,
|
||||
VK_VIDEO_ENCODE_USAGE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoEncodeUsageFlagBitsKHR;
|
||||
typedef VkFlags VkVideoEncodeUsageFlagsKHR;
|
||||
|
||||
typedef enum VkVideoEncodeContentFlagBitsKHR {
|
||||
VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0,
|
||||
VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 0x00000002,
|
||||
VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 0x00000004,
|
||||
VK_VIDEO_ENCODE_CONTENT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoEncodeContentFlagBitsKHR;
|
||||
typedef VkFlags VkVideoEncodeContentFlagsKHR;
|
||||
typedef VkFlags VkVideoEncodeRateControlFlagsKHR;
|
||||
typedef struct VkVideoEncodeInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoEncodeFlagsKHR flags;
|
||||
uint32_t qualityLevel;
|
||||
VkBuffer dstBuffer;
|
||||
VkDeviceSize dstBufferOffset;
|
||||
VkDeviceSize dstBufferRange;
|
||||
VkVideoPictureResourceInfoKHR srcPictureResource;
|
||||
const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot;
|
||||
uint32_t referenceSlotCount;
|
||||
const VkVideoReferenceSlotInfoKHR* pReferenceSlots;
|
||||
uint32_t precedingExternallyEncodedBytes;
|
||||
} VkVideoEncodeInfoKHR;
|
||||
|
||||
typedef struct VkVideoEncodeCapabilitiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkVideoEncodeCapabilityFlagsKHR flags;
|
||||
VkVideoEncodeRateControlModeFlagsKHR rateControlModes;
|
||||
uint32_t maxRateControlLayers;
|
||||
uint32_t maxQualityLevels;
|
||||
VkExtent2D inputImageDataFillAlignment;
|
||||
VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags;
|
||||
} VkVideoEncodeCapabilitiesKHR;
|
||||
|
||||
typedef struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoEncodeFeedbackFlagsKHR encodeFeedbackFlags;
|
||||
} VkQueryPoolVideoEncodeFeedbackCreateInfoKHR;
|
||||
|
||||
typedef struct VkVideoEncodeUsageInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoEncodeUsageFlagsKHR videoUsageHints;
|
||||
VkVideoEncodeContentFlagsKHR videoContentHints;
|
||||
VkVideoEncodeTuningModeKHR tuningMode;
|
||||
} VkVideoEncodeUsageInfoKHR;
|
||||
|
||||
typedef struct VkVideoEncodeRateControlLayerInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint64_t averageBitrate;
|
||||
uint64_t maxBitrate;
|
||||
uint32_t frameRateNumerator;
|
||||
uint32_t frameRateDenominator;
|
||||
uint32_t virtualBufferSizeInMs;
|
||||
uint32_t initialVirtualBufferSizeInMs;
|
||||
} VkVideoEncodeRateControlLayerInfoKHR;
|
||||
|
||||
typedef struct VkVideoEncodeRateControlInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoEncodeRateControlFlagsKHR flags;
|
||||
VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode;
|
||||
uint32_t layerCount;
|
||||
const VkVideoEncodeRateControlLayerInfoKHR* pLayers;
|
||||
} VkVideoEncodeRateControlInfoKHR;
|
||||
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdEncodeVideoKHR)(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdEncodeVideoKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkVideoEncodeInfoKHR* pEncodeInfo);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_EXT_video_encode_h264 1
|
||||
#include "vk_video/vulkan_video_codec_h264std.h"
|
||||
#include "vk_video/vulkan_video_codec_h264std_encode.h"
|
||||
#define VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION 10
|
||||
#define VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME "VK_EXT_video_encode_h264"
|
||||
|
||||
typedef enum VkVideoEncodeH264RateControlStructureEXT {
|
||||
VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0,
|
||||
VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1,
|
||||
VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2,
|
||||
VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH264RateControlStructureEXT;
|
||||
|
||||
typedef enum VkVideoEncodeH264CapabilityFlagBitsEXT {
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_ENABLED_BIT_EXT = 0x00000001,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_DISABLED_BIT_EXT = 0x00000002,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = 0x00000004,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_BIT_EXT = 0x00000008,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_SCALING_LISTS_BIT_EXT = 0x00000010,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 0x00000020,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT = 0x00000040,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT = 0x00000080,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_PIC_INIT_QP_MINUS26_BIT_EXT = 0x00000100,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_BIT_EXT = 0x00000200,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_EXPLICIT_BIT_EXT = 0x00000400,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_IMPLICIT_BIT_EXT = 0x00000800,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = 0x00001000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT = 0x00002000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT = 0x00004000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT = 0x00008000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT = 0x00010000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT = 0x00020000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT = 0x00040000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_DISABLE_DIRECT_SPATIAL_MV_PRED_BIT_EXT = 0x00080000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT = 0x00100000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_SLICE_MB_COUNT_BIT_EXT = 0x00200000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_EXT = 0x00400000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 0x00800000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 0x01000000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_REFERENCE_FINAL_LISTS_BIT_EXT = 0x02000000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH264CapabilityFlagBitsEXT;
|
||||
typedef VkFlags VkVideoEncodeH264CapabilityFlagsEXT;
|
||||
typedef struct VkVideoEncodeH264CapabilitiesEXT {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkVideoEncodeH264CapabilityFlagsEXT flags;
|
||||
uint32_t maxPPictureL0ReferenceCount;
|
||||
uint32_t maxBPictureL0ReferenceCount;
|
||||
uint32_t maxL1ReferenceCount;
|
||||
VkBool32 motionVectorsOverPicBoundariesFlag;
|
||||
uint32_t maxBytesPerPicDenom;
|
||||
uint32_t maxBitsPerMbDenom;
|
||||
uint32_t log2MaxMvLengthHorizontal;
|
||||
uint32_t log2MaxMvLengthVertical;
|
||||
} VkVideoEncodeH264CapabilitiesEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264SessionParametersAddInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t stdSPSCount;
|
||||
const StdVideoH264SequenceParameterSet* pStdSPSs;
|
||||
uint32_t stdPPSCount;
|
||||
const StdVideoH264PictureParameterSet* pStdPPSs;
|
||||
} VkVideoEncodeH264SessionParametersAddInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264SessionParametersCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t maxStdSPSCount;
|
||||
uint32_t maxStdPPSCount;
|
||||
const VkVideoEncodeH264SessionParametersAddInfoEXT* pParametersAddInfo;
|
||||
} VkVideoEncodeH264SessionParametersCreateInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264NaluSliceInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t mbCount;
|
||||
const StdVideoEncodeH264ReferenceListsInfo* pStdReferenceFinalLists;
|
||||
const StdVideoEncodeH264SliceHeader* pStdSliceHeader;
|
||||
} VkVideoEncodeH264NaluSliceInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264VclFrameInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const StdVideoEncodeH264ReferenceListsInfo* pStdReferenceFinalLists;
|
||||
uint32_t naluSliceEntryCount;
|
||||
const VkVideoEncodeH264NaluSliceInfoEXT* pNaluSliceEntries;
|
||||
const StdVideoEncodeH264PictureInfo* pStdPictureInfo;
|
||||
} VkVideoEncodeH264VclFrameInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264DpbSlotInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const StdVideoEncodeH264ReferenceInfo* pStdReferenceInfo;
|
||||
} VkVideoEncodeH264DpbSlotInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264ProfileInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
StdVideoH264ProfileIdc stdProfileIdc;
|
||||
} VkVideoEncodeH264ProfileInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264RateControlInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t gopFrameCount;
|
||||
uint32_t idrPeriod;
|
||||
uint32_t consecutiveBFrameCount;
|
||||
VkVideoEncodeH264RateControlStructureEXT rateControlStructure;
|
||||
uint32_t temporalLayerCount;
|
||||
} VkVideoEncodeH264RateControlInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264QpEXT {
|
||||
int32_t qpI;
|
||||
int32_t qpP;
|
||||
int32_t qpB;
|
||||
} VkVideoEncodeH264QpEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264FrameSizeEXT {
|
||||
uint32_t frameISize;
|
||||
uint32_t framePSize;
|
||||
uint32_t frameBSize;
|
||||
} VkVideoEncodeH264FrameSizeEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264RateControlLayerInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t temporalLayerId;
|
||||
VkBool32 useInitialRcQp;
|
||||
VkVideoEncodeH264QpEXT initialRcQp;
|
||||
VkBool32 useMinQp;
|
||||
VkVideoEncodeH264QpEXT minQp;
|
||||
VkBool32 useMaxQp;
|
||||
VkVideoEncodeH264QpEXT maxQp;
|
||||
VkBool32 useMaxFrameSize;
|
||||
VkVideoEncodeH264FrameSizeEXT maxFrameSize;
|
||||
} VkVideoEncodeH264RateControlLayerInfoEXT;
|
||||
|
||||
|
||||
|
||||
#define VK_EXT_video_encode_h265 1
|
||||
#include "vk_video/vulkan_video_codec_h265std.h"
|
||||
#include "vk_video/vulkan_video_codec_h265std_encode.h"
|
||||
#define VK_EXT_VIDEO_ENCODE_H265_SPEC_VERSION 10
|
||||
#define VK_EXT_VIDEO_ENCODE_H265_EXTENSION_NAME "VK_EXT_video_encode_h265"
|
||||
|
||||
typedef enum VkVideoEncodeH265RateControlStructureEXT {
|
||||
VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0,
|
||||
VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1,
|
||||
VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2,
|
||||
VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH265RateControlStructureEXT;
|
||||
|
||||
typedef enum VkVideoEncodeH265CapabilityFlagBitsEXT {
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = 0x00000001,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_SCALING_LISTS_BIT_EXT = 0x00000002,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_SAMPLE_ADAPTIVE_OFFSET_ENABLED_BIT_EXT = 0x00000004,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_PCM_ENABLE_BIT_EXT = 0x00000008,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_SPS_TEMPORAL_MVP_ENABLED_BIT_EXT = 0x00000010,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 0x00000020,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_INIT_QP_MINUS26_BIT_EXT = 0x00000040,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_EXT = 0x00000080,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_SIGN_DATA_HIDING_ENABLED_BIT_EXT = 0x00000100,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_ENABLED_BIT_EXT = 0x00000200,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_DISABLED_BIT_EXT = 0x00000400,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_BIT_EXT = 0x00000800,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_BIT_EXT = 0x00001000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_BIPRED_BIT_EXT = 0x00002000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = 0x00004000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSQUANT_BYPASS_ENABLED_BIT_EXT = 0x00008000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_ENTROPY_CODING_SYNC_ENABLED_BIT_EXT = 0x00010000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_DEBLOCKING_FILTER_OVERRIDE_ENABLED_BIT_EXT = 0x00020000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_FRAME_BIT_EXT = 0x00040000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_PER_TILE_BIT_EXT = 0x00080000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_SLICE_BIT_EXT = 0x00100000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_SLICE_SEGMENT_CTB_COUNT_BIT_EXT = 0x00200000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_EXT = 0x00400000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_DEPENDENT_SLICE_SEGMENT_BIT_EXT = 0x00800000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 0x01000000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 0x02000000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_REFERENCE_FINAL_LISTS_BIT_EXT = 0x04000000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH265CapabilityFlagBitsEXT;
|
||||
typedef VkFlags VkVideoEncodeH265CapabilityFlagsEXT;
|
||||
|
||||
typedef enum VkVideoEncodeH265CtbSizeFlagBitsEXT {
|
||||
VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT = 0x00000001,
|
||||
VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT = 0x00000002,
|
||||
VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_EXT = 0x00000004,
|
||||
VK_VIDEO_ENCODE_H265_CTB_SIZE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH265CtbSizeFlagBitsEXT;
|
||||
typedef VkFlags VkVideoEncodeH265CtbSizeFlagsEXT;
|
||||
|
||||
typedef enum VkVideoEncodeH265TransformBlockSizeFlagBitsEXT {
|
||||
VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_EXT = 0x00000001,
|
||||
VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_EXT = 0x00000002,
|
||||
VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_EXT = 0x00000004,
|
||||
VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_EXT = 0x00000008,
|
||||
VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH265TransformBlockSizeFlagBitsEXT;
|
||||
typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsEXT;
|
||||
typedef struct VkVideoEncodeH265CapabilitiesEXT {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkVideoEncodeH265CapabilityFlagsEXT flags;
|
||||
VkVideoEncodeH265CtbSizeFlagsEXT ctbSizes;
|
||||
VkVideoEncodeH265TransformBlockSizeFlagsEXT transformBlockSizes;
|
||||
uint32_t maxPPictureL0ReferenceCount;
|
||||
uint32_t maxBPictureL0ReferenceCount;
|
||||
uint32_t maxL1ReferenceCount;
|
||||
uint32_t maxSubLayersCount;
|
||||
uint32_t minLog2MinLumaCodingBlockSizeMinus3;
|
||||
uint32_t maxLog2MinLumaCodingBlockSizeMinus3;
|
||||
uint32_t minLog2MinLumaTransformBlockSizeMinus2;
|
||||
uint32_t maxLog2MinLumaTransformBlockSizeMinus2;
|
||||
uint32_t minMaxTransformHierarchyDepthInter;
|
||||
uint32_t maxMaxTransformHierarchyDepthInter;
|
||||
uint32_t minMaxTransformHierarchyDepthIntra;
|
||||
uint32_t maxMaxTransformHierarchyDepthIntra;
|
||||
uint32_t maxDiffCuQpDeltaDepth;
|
||||
uint32_t minMaxNumMergeCand;
|
||||
uint32_t maxMaxNumMergeCand;
|
||||
} VkVideoEncodeH265CapabilitiesEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265SessionParametersAddInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t stdVPSCount;
|
||||
const StdVideoH265VideoParameterSet* pStdVPSs;
|
||||
uint32_t stdSPSCount;
|
||||
const StdVideoH265SequenceParameterSet* pStdSPSs;
|
||||
uint32_t stdPPSCount;
|
||||
const StdVideoH265PictureParameterSet* pStdPPSs;
|
||||
} VkVideoEncodeH265SessionParametersAddInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265SessionParametersCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t maxStdVPSCount;
|
||||
uint32_t maxStdSPSCount;
|
||||
uint32_t maxStdPPSCount;
|
||||
const VkVideoEncodeH265SessionParametersAddInfoEXT* pParametersAddInfo;
|
||||
} VkVideoEncodeH265SessionParametersCreateInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265NaluSliceSegmentInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t ctbCount;
|
||||
const StdVideoEncodeH265ReferenceListsInfo* pStdReferenceFinalLists;
|
||||
const StdVideoEncodeH265SliceSegmentHeader* pStdSliceSegmentHeader;
|
||||
} VkVideoEncodeH265NaluSliceSegmentInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265VclFrameInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const StdVideoEncodeH265ReferenceListsInfo* pStdReferenceFinalLists;
|
||||
uint32_t naluSliceSegmentEntryCount;
|
||||
const VkVideoEncodeH265NaluSliceSegmentInfoEXT* pNaluSliceSegmentEntries;
|
||||
const StdVideoEncodeH265PictureInfo* pStdPictureInfo;
|
||||
} VkVideoEncodeH265VclFrameInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265DpbSlotInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo;
|
||||
} VkVideoEncodeH265DpbSlotInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265ProfileInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
StdVideoH265ProfileIdc stdProfileIdc;
|
||||
} VkVideoEncodeH265ProfileInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265RateControlInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t gopFrameCount;
|
||||
uint32_t idrPeriod;
|
||||
uint32_t consecutiveBFrameCount;
|
||||
VkVideoEncodeH265RateControlStructureEXT rateControlStructure;
|
||||
uint32_t subLayerCount;
|
||||
} VkVideoEncodeH265RateControlInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265QpEXT {
|
||||
int32_t qpI;
|
||||
int32_t qpP;
|
||||
int32_t qpB;
|
||||
} VkVideoEncodeH265QpEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265FrameSizeEXT {
|
||||
uint32_t frameISize;
|
||||
uint32_t framePSize;
|
||||
uint32_t frameBSize;
|
||||
} VkVideoEncodeH265FrameSizeEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265RateControlLayerInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t temporalId;
|
||||
VkBool32 useInitialRcQp;
|
||||
VkVideoEncodeH265QpEXT initialRcQp;
|
||||
VkBool32 useMinQp;
|
||||
VkVideoEncodeH265QpEXT minQp;
|
||||
VkBool32 useMaxQp;
|
||||
VkVideoEncodeH265QpEXT maxQp;
|
||||
VkBool32 useMaxFrameSize;
|
||||
VkVideoEncodeH265FrameSizeEXT maxFrameSize;
|
||||
} VkVideoEncodeH265RateControlLayerInfoEXT;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+10286
-1804
File diff suppressed because it is too large
Load Diff
+54
@@ -0,0 +1,54 @@
|
||||
#ifndef VULKAN_DIRECTFB_H_
|
||||
#define VULKAN_DIRECTFB_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_EXT_directfb_surface 1
|
||||
#define VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION 1
|
||||
#define VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME "VK_EXT_directfb_surface"
|
||||
typedef VkFlags VkDirectFBSurfaceCreateFlagsEXT;
|
||||
typedef struct VkDirectFBSurfaceCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDirectFBSurfaceCreateFlagsEXT flags;
|
||||
IDirectFB* dfb;
|
||||
IDirectFBSurface* surface;
|
||||
} VkDirectFBSurfaceCreateInfoEXT;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDirectFBSurfaceEXT)(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDirectFBSurfaceEXT(
|
||||
VkInstance instance,
|
||||
const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceDirectFBPresentationSupportEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
IDirectFB* dfb);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+219
-19
@@ -1,24 +1,10 @@
|
||||
#ifndef VULKAN_FUCHSIA_H_
|
||||
#define VULKAN_FUCHSIA_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -27,12 +13,16 @@ extern "C" {
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_FUCHSIA_imagepipe_surface 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
|
||||
|
||||
typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
|
||||
|
||||
typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
@@ -40,7 +30,6 @@ typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
||||
zx_handle_t imagePipeHandle;
|
||||
} VkImagePipeSurfaceCreateInfoFUCHSIA;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
@@ -51,6 +40,217 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_FUCHSIA_external_memory 1
|
||||
#define VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION 1
|
||||
#define VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME "VK_FUCHSIA_external_memory"
|
||||
typedef struct VkImportMemoryZirconHandleInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
zx_handle_t handle;
|
||||
} VkImportMemoryZirconHandleInfoFUCHSIA;
|
||||
|
||||
typedef struct VkMemoryZirconHandlePropertiesFUCHSIA {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t memoryTypeBits;
|
||||
} VkMemoryZirconHandlePropertiesFUCHSIA;
|
||||
|
||||
typedef struct VkMemoryGetZirconHandleInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceMemory memory;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
} VkMemoryGetZirconHandleInfoFUCHSIA;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandleFUCHSIA)(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandleFUCHSIA(
|
||||
VkDevice device,
|
||||
const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
|
||||
zx_handle_t* pZirconHandle);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandlePropertiesFUCHSIA(
|
||||
VkDevice device,
|
||||
VkExternalMemoryHandleTypeFlagBits handleType,
|
||||
zx_handle_t zirconHandle,
|
||||
VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_FUCHSIA_external_semaphore 1
|
||||
#define VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
|
||||
#define VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_FUCHSIA_external_semaphore"
|
||||
typedef struct VkImportSemaphoreZirconHandleInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkSemaphore semaphore;
|
||||
VkSemaphoreImportFlags flags;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
zx_handle_t zirconHandle;
|
||||
} VkImportSemaphoreZirconHandleInfoFUCHSIA;
|
||||
|
||||
typedef struct VkSemaphoreGetZirconHandleInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkSemaphore semaphore;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
} VkSemaphoreGetZirconHandleInfoFUCHSIA;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreZirconHandleFUCHSIA(
|
||||
VkDevice device,
|
||||
const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreZirconHandleFUCHSIA(
|
||||
VkDevice device,
|
||||
const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
|
||||
zx_handle_t* pZirconHandle);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_FUCHSIA_buffer_collection 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferCollectionFUCHSIA)
|
||||
#define VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION 2
|
||||
#define VK_FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME "VK_FUCHSIA_buffer_collection"
|
||||
typedef VkFlags VkImageFormatConstraintsFlagsFUCHSIA;
|
||||
|
||||
typedef enum VkImageConstraintsInfoFlagBitsFUCHSIA {
|
||||
VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 0x00000001,
|
||||
VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 0x00000002,
|
||||
VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 0x00000004,
|
||||
VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 0x00000008,
|
||||
VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 0x00000010,
|
||||
VK_IMAGE_CONSTRAINTS_INFO_FLAG_BITS_MAX_ENUM_FUCHSIA = 0x7FFFFFFF
|
||||
} VkImageConstraintsInfoFlagBitsFUCHSIA;
|
||||
typedef VkFlags VkImageConstraintsInfoFlagsFUCHSIA;
|
||||
typedef struct VkBufferCollectionCreateInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
zx_handle_t collectionToken;
|
||||
} VkBufferCollectionCreateInfoFUCHSIA;
|
||||
|
||||
typedef struct VkImportMemoryBufferCollectionFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkBufferCollectionFUCHSIA collection;
|
||||
uint32_t index;
|
||||
} VkImportMemoryBufferCollectionFUCHSIA;
|
||||
|
||||
typedef struct VkBufferCollectionImageCreateInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkBufferCollectionFUCHSIA collection;
|
||||
uint32_t index;
|
||||
} VkBufferCollectionImageCreateInfoFUCHSIA;
|
||||
|
||||
typedef struct VkBufferCollectionConstraintsInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t minBufferCount;
|
||||
uint32_t maxBufferCount;
|
||||
uint32_t minBufferCountForCamping;
|
||||
uint32_t minBufferCountForDedicatedSlack;
|
||||
uint32_t minBufferCountForSharedSlack;
|
||||
} VkBufferCollectionConstraintsInfoFUCHSIA;
|
||||
|
||||
typedef struct VkBufferConstraintsInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkBufferCreateInfo createInfo;
|
||||
VkFormatFeatureFlags requiredFormatFeatures;
|
||||
VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints;
|
||||
} VkBufferConstraintsInfoFUCHSIA;
|
||||
|
||||
typedef struct VkBufferCollectionBufferCreateInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkBufferCollectionFUCHSIA collection;
|
||||
uint32_t index;
|
||||
} VkBufferCollectionBufferCreateInfoFUCHSIA;
|
||||
|
||||
typedef struct VkSysmemColorSpaceFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t colorSpace;
|
||||
} VkSysmemColorSpaceFUCHSIA;
|
||||
|
||||
typedef struct VkBufferCollectionPropertiesFUCHSIA {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t memoryTypeBits;
|
||||
uint32_t bufferCount;
|
||||
uint32_t createInfoIndex;
|
||||
uint64_t sysmemPixelFormat;
|
||||
VkFormatFeatureFlags formatFeatures;
|
||||
VkSysmemColorSpaceFUCHSIA sysmemColorSpaceIndex;
|
||||
VkComponentMapping samplerYcbcrConversionComponents;
|
||||
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
||||
VkSamplerYcbcrRange suggestedYcbcrRange;
|
||||
VkChromaLocation suggestedXChromaOffset;
|
||||
VkChromaLocation suggestedYChromaOffset;
|
||||
} VkBufferCollectionPropertiesFUCHSIA;
|
||||
|
||||
typedef struct VkImageFormatConstraintsInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkImageCreateInfo imageCreateInfo;
|
||||
VkFormatFeatureFlags requiredFormatFeatures;
|
||||
VkImageFormatConstraintsFlagsFUCHSIA flags;
|
||||
uint64_t sysmemPixelFormat;
|
||||
uint32_t colorSpaceCount;
|
||||
const VkSysmemColorSpaceFUCHSIA* pColorSpaces;
|
||||
} VkImageFormatConstraintsInfoFUCHSIA;
|
||||
|
||||
typedef struct VkImageConstraintsInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t formatConstraintsCount;
|
||||
const VkImageFormatConstraintsInfoFUCHSIA* pFormatConstraints;
|
||||
VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints;
|
||||
VkImageConstraintsInfoFlagsFUCHSIA flags;
|
||||
} VkImageConstraintsInfoFUCHSIA;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferCollectionFUCHSIA)(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkDestroyBufferCollectionFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetBufferCollectionPropertiesFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferCollectionFUCHSIA(
|
||||
VkDevice device,
|
||||
const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkBufferCollectionFUCHSIA* pCollection);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionImageConstraintsFUCHSIA(
|
||||
VkDevice device,
|
||||
VkBufferCollectionFUCHSIA collection,
|
||||
const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionBufferConstraintsFUCHSIA(
|
||||
VkDevice device,
|
||||
VkBufferCollectionFUCHSIA collection,
|
||||
const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDestroyBufferCollectionFUCHSIA(
|
||||
VkDevice device,
|
||||
VkBufferCollectionFUCHSIA collection,
|
||||
const VkAllocationCallbacks* pAllocator);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferCollectionPropertiesFUCHSIA(
|
||||
VkDevice device,
|
||||
VkBufferCollectionFUCHSIA collection,
|
||||
VkBufferCollectionPropertiesFUCHSIA* pProperties);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Vendored
+58
@@ -0,0 +1,58 @@
|
||||
#ifndef VULKAN_GGP_H_
|
||||
#define VULKAN_GGP_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_GGP_stream_descriptor_surface 1
|
||||
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION 1
|
||||
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME "VK_GGP_stream_descriptor_surface"
|
||||
typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP;
|
||||
typedef struct VkStreamDescriptorSurfaceCreateInfoGGP {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkStreamDescriptorSurfaceCreateFlagsGGP flags;
|
||||
GgpStreamDescriptor streamDescriptor;
|
||||
} VkStreamDescriptorSurfaceCreateInfoGGP;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP(
|
||||
VkInstance instance,
|
||||
const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_GGP_frame_token 1
|
||||
#define VK_GGP_FRAME_TOKEN_SPEC_VERSION 1
|
||||
#define VK_GGP_FRAME_TOKEN_EXTENSION_NAME "VK_GGP_frame_token"
|
||||
typedef struct VkPresentFrameTokenGGP {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
GgpFrameToken frameToken;
|
||||
} VkPresentFrameTokenGGP;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Vendored
+9
-20
@@ -1,24 +1,10 @@
|
||||
#ifndef VULKAN_IOS_H_
|
||||
#define VULKAN_IOS_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -27,12 +13,16 @@ extern "C" {
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_MVK_ios_surface 1
|
||||
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
|
||||
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 3
|
||||
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
|
||||
|
||||
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
|
||||
|
||||
typedef struct VkIOSSurfaceCreateInfoMVK {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
@@ -40,7 +30,6 @@ typedef struct VkIOSSurfaceCreateInfoMVK {
|
||||
const void* pView;
|
||||
} VkIOSSurfaceCreateInfoMVK;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user