Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ddb55c173 | ||
|
|
c029b2a22f | ||
|
|
8a9f6482bd | ||
|
|
bae84c796b | ||
|
|
4b0636d0d8 | ||
|
|
cbbf66efc8 | ||
|
|
3a23c33fad | ||
|
|
7de06ecddf | ||
|
|
d59269511f | ||
|
|
38795499cc | ||
|
|
f5ebe93f9f | ||
|
|
8ffcf5383e | ||
|
|
fdd94a2c81 | ||
|
|
2ca675d242 | ||
|
|
9d5cfe2016 | ||
|
|
9e1a000e4b | ||
|
|
e10f142788 | ||
|
|
4639edc493 | ||
|
|
fcd771fda7 | ||
|
|
e22c9e7cff | ||
|
|
69bd3b3693 | ||
|
|
75c40c6549 | ||
|
|
d44d24fd97 | ||
|
|
534b3ab79c | ||
|
|
b247c9618e | ||
|
|
17f02679a9 | ||
|
|
88fdc045cd | ||
|
|
4d2e63c686 | ||
|
|
e073e64481 | ||
|
|
a7a92724d5 | ||
|
|
27a9de7f7d | ||
|
|
2eb4bcb4f3 | ||
|
|
f95602aba2 | ||
|
|
5b65d1ad2a | ||
|
|
6b45328103 | ||
|
|
2be7d8c60f | ||
|
|
e14cc6fac1 | ||
|
|
1ccc7dbd73 | ||
|
|
f3cc6c475a | ||
|
|
db550a6579 | ||
|
|
5b88b2323a | ||
|
|
28ac91cb67 | ||
|
|
83452a0627 | ||
|
|
c5cc28a737 | ||
|
|
9f785eff7e | ||
|
|
cc89707913 | ||
|
|
1a46e0e83b | ||
|
|
39db5b5095 | ||
|
|
efc2bcf316 | ||
|
|
e38cbaab8e | ||
|
|
a30ad16ebe | ||
|
|
d0da492c26 | ||
|
|
3f5d4784fc | ||
|
|
7a15d37a99 | ||
|
|
1e40f043ff | ||
|
|
21f2bf28d2 | ||
|
|
4a5c3d8f27 | ||
|
|
2b49392e7c | ||
|
|
26dcdbbf0a | ||
|
|
16b0912a6f | ||
|
|
644cc2908a | ||
|
|
bfdb9b4d1c | ||
|
|
b3b260c00c | ||
|
|
6991c9aa25 | ||
|
|
e8027c3e14 | ||
|
|
3a719ad581 | ||
|
|
012acbea12 | ||
|
|
8f89982b74 | ||
|
|
3f6aee0ccb | ||
|
|
b2489b2d87 | ||
|
|
925d5c7318 | ||
|
|
3de20fe5cb | ||
|
|
dd1be88826 | ||
|
|
0c8e97e10e | ||
|
|
fa4b928937 | ||
|
|
4001efe359 | ||
|
|
c294a16d84 | ||
|
|
28670b8854 | ||
|
|
c5613778a8 | ||
|
|
d7d3326003 | ||
|
|
2c60189b8f | ||
|
|
3cfd3f90b4 | ||
|
|
db49fc5bb5 | ||
|
|
2eb334e0ab | ||
|
|
52cd25c365 | ||
|
|
43786efafe | ||
|
|
624da4833a | ||
|
|
5bf5668272 | ||
|
|
c94b17927c | ||
|
|
d5e8bae784 | ||
|
|
567d6ccd2c | ||
|
|
7eca200236 | ||
|
|
e7b39cf480 | ||
|
|
51d4f2e898 | ||
|
|
8047a5f342 | ||
|
|
600642f829 | ||
|
|
9d68301372 | ||
|
|
20ca20b31b | ||
|
|
972f2f648f | ||
|
|
273b91efab | ||
|
|
c3b3a42f46 | ||
|
|
8bf1eb2af8 | ||
|
|
9072a2f7c8 | ||
|
|
8abea07d35 | ||
|
|
2fe2b5fa36 | ||
|
|
aba91e9610 | ||
|
|
72f7db891f | ||
|
|
89e7703875 | ||
|
|
276c968a6b | ||
|
|
1e3001be06 | ||
|
|
648710482d | ||
|
|
839f895bbb | ||
|
|
866dcdbd2c | ||
|
|
723676eb7f | ||
|
|
6b63c96af1 | ||
|
|
35f3394324 | ||
|
|
39be977b55 | ||
|
|
95fda0d2e3 | ||
|
|
3f577dc19c | ||
|
|
c9d547c862 | ||
|
|
854d470c63 | ||
|
|
4af55d5abb | ||
|
|
13e400d50e | ||
|
|
e798206b1a | ||
|
|
9302d2911b | ||
|
|
e727967b39 | ||
|
|
92837026c3 | ||
|
|
c28db14b6f | ||
|
|
e218004dbf | ||
|
|
583efe0eb0 | ||
|
|
59fccc4457 | ||
|
|
0bb7d88a3e | ||
|
|
03ee00c429 | ||
|
|
24dd81d2cc | ||
|
|
d37ef70517 | ||
|
|
52b563703e | ||
|
|
08817332b7 | ||
|
|
34722ecab1 | ||
|
|
a3a1372972 | ||
|
|
87f74241f7 | ||
|
|
9237785486 | ||
|
|
4fecf1e97f | ||
|
|
0c9034e3b9 | ||
|
|
b0b031e152 | ||
|
|
9e084f7dab | ||
|
|
cce74c0e49 | ||
|
|
0db44c0fa8 | ||
|
|
fb2fd4a049 | ||
|
|
996bb45534 | ||
|
|
0601761cf2 | ||
|
|
084a695129 | ||
|
|
344f123ac4 | ||
|
|
deaf5c413a | ||
|
|
9fcd2f3449 | ||
|
|
71eeb56cee | ||
|
|
a135bbcb94 | ||
|
|
5f334da813 | ||
|
|
ad478221e1 | ||
|
|
7dc07e12b2 | ||
|
|
8c295b058e | ||
|
|
0e117986aa | ||
|
|
9c9a25f7f6 | ||
|
|
15e03f9bac | ||
|
|
484acbecd6 | ||
|
|
a8200a6bb5 | ||
|
|
511ce72db2 | ||
|
|
677bdb3bad | ||
|
|
79f6b87781 | ||
|
|
39b2a52bd0 | ||
|
|
ac3fcabca8 | ||
|
|
4aaf66547e | ||
|
|
d676e4cfa2 | ||
|
|
3b1ac86a9f | ||
|
|
460e13a272 | ||
|
|
ef4c5a7844 | ||
|
|
d8f31aa94f | ||
|
|
382b0f02d6 | ||
|
|
5155b0bb38 | ||
|
|
69d6fc1319 | ||
|
|
d9d5098203 | ||
|
|
bfb650ea5d | ||
|
|
7369ee1086 | ||
|
|
f06c6ab8f8 | ||
|
|
206606d40d | ||
|
|
1e731455ec | ||
|
|
c87cf374c4 | ||
|
|
bbe5dcf225 | ||
|
|
6fd1531d80 | ||
|
|
30ee79ee37 | ||
|
|
9264db2876 | ||
|
|
35668ad125 | ||
|
|
4e6392f0c2 | ||
|
|
5f833e68ce | ||
|
|
28d1515afa | ||
|
|
0820f68e69 | ||
|
|
c3db1ead03 | ||
|
|
7dadab9eb1 | ||
|
|
46de13b363 | ||
|
|
98df75f7d7 | ||
|
|
91065683da | ||
|
|
ee663d08f6 | ||
|
|
d3c2a9ebd0 | ||
|
|
35610a4944 | ||
|
|
c2175c86ee | ||
|
|
8239b26f62 | ||
|
|
a32600ae17 | ||
|
|
15ffdaf72a | ||
|
|
edbe0c1ed5 | ||
|
|
168e9b9e36 | ||
|
|
4ce154033a | ||
|
|
8155fe8b26 | ||
|
|
2671a1c8d0 | ||
|
|
7e2378d1a0 | ||
|
|
9dea1a92be | ||
|
|
bfd7c162f3 | ||
|
|
f07af5a111 | ||
|
|
d53fcc7e9e | ||
|
|
252d43ae35 | ||
|
|
8e154ddd13 | ||
|
|
feb342fcc1 | ||
|
|
a57df05fd0 | ||
|
|
8039076f07 | ||
|
|
00d75f3962 | ||
|
|
9f8a5cba11 | ||
|
|
78aeb5401b | ||
|
|
f06e5ce249 | ||
|
|
b1a9f62bc5 | ||
|
|
25e0945a29 | ||
|
|
562ea70276 | ||
|
|
5765ef2909 | ||
|
|
fd2b724040 | ||
|
|
e7bd7e4e18 | ||
|
|
a902935f11 | ||
|
|
1907b8799e | ||
|
|
9782878612 | ||
|
|
b94080a168 | ||
|
|
ada1e18e45 | ||
|
|
bd26d90563 | ||
|
|
447d66758e | ||
|
|
d242d1d3d7 | ||
|
|
e7e189c012 | ||
|
|
256e1d6e88 | ||
|
|
6952ca11d5 | ||
|
|
4ec76d5211 | ||
|
|
05670bfc64 | ||
|
|
29f4f10118 | ||
|
|
e5663df8fa | ||
|
|
cefb070832 | ||
|
|
2f9829c777 | ||
|
|
78dbddf2e9 | ||
|
|
9318a5df61 | ||
|
|
8e65bd7d21 | ||
|
|
42022c75e3 | ||
|
|
869c46e39b | ||
|
|
3199376bbf | ||
|
|
a93c67cc34 | ||
|
|
753e1e23c7 | ||
|
|
021403a5c1 | ||
|
|
402a453065 | ||
|
|
5b05fb843d | ||
|
|
772addf5c1 | ||
|
|
c08e594437 | ||
|
|
9797ad1cad | ||
|
|
b260cdaa58 | ||
|
|
e83cb29013 | ||
|
|
48e19f8e50 | ||
|
|
4e02904b18 | ||
|
|
bd1bd14831 | ||
|
|
74feb70896 | ||
|
|
48a33a1fc3 | ||
|
|
36a5188083 | ||
|
|
0731de2367 | ||
|
|
91b5f68bed | ||
|
|
a290735187 | ||
|
|
4b4ab0ced8 | ||
|
|
7faec6fdce | ||
|
|
696fd719e8 | ||
|
|
aa0c021737 | ||
|
|
682790d0bc | ||
|
|
47a0e466e7 | ||
|
|
8842cdc739 | ||
|
|
870414aa06 | ||
|
|
7b03681ce7 | ||
|
|
a80f63501b | ||
|
|
6556e4ae04 | ||
|
|
648527eb1b | ||
|
|
4a848124fa | ||
|
|
39d01b483e | ||
|
|
03e92c43ba | ||
|
|
bdf448e8f0 | ||
|
|
d0dfac1a32 | ||
|
|
d057c221d8 | ||
|
|
83bb1e7937 | ||
|
|
bdc82c2c76 | ||
|
|
3cfec929f6 | ||
|
|
74720f366d | ||
|
|
65012ac724 | ||
|
|
7b0ce7088e | ||
|
|
d2930a2763 | ||
|
|
9ef5f44c53 | ||
|
|
6b79e17ec3 | ||
|
|
eaf7825044 | ||
|
|
365eca0c16 | ||
|
|
096591bafb | ||
|
|
68e9cf2a01 | ||
|
|
36a2e4eed4 | ||
|
|
7e7fff181b | ||
|
|
91319547c4 | ||
|
|
6288784171 | ||
|
|
74eb504435 | ||
|
|
7e63c9f48c | ||
|
|
5560281526 | ||
|
|
9d04feb8c3 | ||
|
|
47d576fc76 | ||
|
|
c0bf9d5262 | ||
|
|
8f74c350ce | ||
|
|
c9425f3158 | ||
|
|
4e7a567967 | ||
|
|
84ec3ddf9f | ||
|
|
0138a5b699 | ||
|
|
623eb2915d | ||
|
|
f845134e58 | ||
|
|
014e11aa5b | ||
|
|
9f9a93e5e8 | ||
|
|
636b8f8cf0 | ||
|
|
d1f296eaca | ||
|
|
fb5ee6fa0b | ||
|
|
28c3cd7e54 | ||
|
|
69e7c73b34 | ||
|
|
6fd0ff0d0f | ||
|
|
7e88739a41 | ||
|
|
0bc9d1b2d6 | ||
|
|
e8b7efceba | ||
|
|
7fda8d02b0 | ||
|
|
fe3c943543 | ||
|
|
72838eb1df | ||
|
|
2bf91c9159 | ||
|
|
c8c64e614e | ||
|
|
5ff113d8b1 | ||
|
|
bebbf30075 | ||
|
|
5b05448d69 | ||
|
|
c0ef238433 | ||
|
|
e662f86944 | ||
|
|
57da508cf3 | ||
|
|
9ac38a895c | ||
|
|
ed840ebb2d | ||
|
|
1c41747d9c | ||
|
|
dd0aeff3f1 | ||
|
|
2186acc08f | ||
|
|
a2aa0f361a | ||
|
|
756cebff72 | ||
|
|
e767844a07 | ||
|
|
57b7cec007 | ||
|
|
f3bf7bc683 | ||
|
|
a3bd59ddac | ||
|
|
82e715f2cf | ||
|
|
eb8ea83e11 | ||
|
|
bd912040a5 | ||
|
|
f696ac0e4b | ||
|
|
616b01448f | ||
|
|
c71edbf5e5 | ||
|
|
82b3972cae | ||
|
|
982aaf0993 | ||
|
|
25ba9a0ca5 | ||
|
|
740601a431 | ||
|
|
45423128a9 | ||
|
|
acd6552307 | ||
|
|
085731e77c | ||
|
|
f3c1248095 | ||
|
|
996b226da5 | ||
|
|
3c0be74876 | ||
|
|
aec53c9445 | ||
|
|
3105fb0bd2 | ||
|
|
c2852a268d | ||
|
|
b0da624def | ||
|
|
03a3efe988 | ||
|
|
35ba4266cd | ||
|
|
45da4eee4f | ||
|
|
90a67c55f2 | ||
|
|
6346373654 | ||
|
|
7178d9715b | ||
|
|
46fe21ae0d | ||
|
|
fc412ae23d | ||
|
|
bc745128ef | ||
|
|
d2c7718e96 | ||
|
|
3a0293e404 | ||
|
|
66acb38834 | ||
|
|
0ecd5a4c43 | ||
|
|
0265363058 | ||
|
|
0e091bc343 | ||
|
|
2456f676ec | ||
|
|
55560bbdf5 | ||
|
|
6e880d8174 | ||
|
|
0945718ee7 | ||
|
|
cc20c82f81 | ||
|
|
12259d14c4 | ||
|
|
993fe423df | ||
|
|
91970b89ff | ||
|
|
5bcbfc2494 | ||
|
|
64204ba71e | ||
|
|
efbb9ed899 | ||
|
|
79d8be32a4 | ||
|
|
e5e59aad06 | ||
|
|
18836f6f54 | ||
|
|
12134220c6 | ||
|
|
54c8a6bce9 | ||
|
|
597779ad8e | ||
|
|
c7e0735820 | ||
|
|
0a175fb070 | ||
|
|
1ee1a6ea2d | ||
|
|
cb5686067d | ||
|
|
5d92b91916 | ||
|
|
dca21aa5f1 | ||
|
|
fce2e450b8 | ||
|
|
28139a6da3 | ||
|
|
5c45d78bba | ||
|
|
0446d2eed8 | ||
|
|
3f0e62abfa | ||
|
|
da80bc561f | ||
|
|
5a845df84b | ||
|
|
c6219667df | ||
|
|
90b529091f | ||
|
|
dc1ede314e | ||
|
|
fcd466d213 | ||
|
|
8ac6a694f0 | ||
|
|
9e6bda097d | ||
|
|
0bea1b2f4d | ||
|
|
08a15ab6d2 | ||
|
|
8f76c2f5a7 | ||
|
|
eea1835183 | ||
|
|
8e02066f52 | ||
|
|
cc5d113370 | ||
|
|
8903fd84a5 | ||
|
|
08d3312192 | ||
|
|
9944415e12 | ||
|
|
beb4ee0e39 | ||
|
|
4ab6a53ab5 | ||
|
|
99b11428df | ||
|
|
955abfeeab | ||
|
|
e5b1d0bd70 | ||
|
|
b70e88d8ad | ||
|
|
e7ecee425f | ||
|
|
7004caa4b4 | ||
|
|
22bbf2ad79 | ||
|
|
73294812c3 | ||
|
|
52b372f7f0 | ||
|
|
1f61355864 | ||
|
|
95ac9ebde7 | ||
|
|
b244199997 | ||
|
|
c689776db2 | ||
|
|
37ca4fe05c | ||
|
|
4a299aa8ec | ||
|
|
e0162f0a84 | ||
|
|
cb9c78a9e3 | ||
|
|
de479975af | ||
|
|
d57ad2a29a | ||
|
|
42a35f8cc3 | ||
|
|
a75737fef7 | ||
|
|
426ce1372a | ||
|
|
bce19ebcbd | ||
|
|
59477c0dbc | ||
|
|
bec851861b | ||
|
|
4e2f157604 | ||
|
|
2b513d3136 | ||
|
|
efac5b3148 | ||
|
|
daa5deedf3 | ||
|
|
e658f0db17 | ||
|
|
bcee6924b7 | ||
|
|
089d2b965d | ||
|
|
ee9f42faff | ||
|
|
92f4bd5a24 | ||
|
|
25383133c8 | ||
|
|
bde6942425 | ||
|
|
b9461be144 | ||
|
|
c83caaa0da | ||
|
|
0ec6b425e6 | ||
|
|
785bfcb086 | ||
|
|
bb515b8a1f | ||
|
|
cb57dc3815 | ||
|
|
f474274d92 | ||
|
|
1629b41828 | ||
|
|
20afeff672 | ||
|
|
78694113e3 | ||
|
|
acd2a5fcad | ||
|
|
32fd3716fe | ||
|
|
64de62450d | ||
|
|
81e7d78488 | ||
|
|
b8c402b663 | ||
|
|
328f0fe573 | ||
|
|
27db1972be | ||
|
|
b0fe0d3cff | ||
|
|
522cfdce58 | ||
|
|
dbf64f011c | ||
|
|
f90249082c | ||
|
|
3b5fb76081 | ||
|
|
af912a6177 | ||
|
|
803c589b17 | ||
|
|
5eb6b5b5fc | ||
|
|
db71a4affb | ||
|
|
0936110fbc | ||
|
|
f905ee4b4a | ||
|
|
7ff62d22b0 | ||
|
|
c004318b0f | ||
|
|
3632831126 | ||
|
|
ebc6f94fcb | ||
|
|
b4ede23c5c | ||
|
|
feca3eae7f | ||
|
|
0a76ab431b | ||
|
|
24b059344e | ||
|
|
ceaa020a33 | ||
|
|
f9e308b2fd | ||
|
|
153c1363ea | ||
|
|
316c7e4abf | ||
|
|
469cb91a74 | ||
|
|
77cc3e9287 | ||
|
|
e037bd9a5e | ||
|
|
7138865c14 | ||
|
|
8f94af0afb | ||
|
|
dfdbae2570 | ||
|
|
11e69548f2 | ||
|
|
6f6cc83862 | ||
|
|
0d2c5de574 | ||
|
|
07e5b6d1d6 | ||
|
|
df8741c86b | ||
|
|
ffb9ef3c52 | ||
|
|
b87cc838a3 | ||
|
|
9273614f58 | ||
|
|
cdedada64a | ||
|
|
b7cf2fd503 | ||
|
|
b3329329a7 | ||
|
|
20bb9d8bcb | ||
|
|
6ecbed3813 | ||
|
|
123dd0108d | ||
|
|
79793a7a97 | ||
|
|
a2c8b74a35 | ||
|
|
a313b4fd0c | ||
|
|
85233ddbe7 | ||
|
|
b6e9484b31 | ||
|
|
a18a68289b | ||
|
|
b3f4e55604 | ||
|
|
702eb6c68b | ||
|
|
0bdd169d38 | ||
|
|
79f57ff784 | ||
|
|
a3bc2bc599 | ||
|
|
2cdd3feebb | ||
|
|
ca70fdfba3 | ||
|
|
9608d14058 | ||
|
|
112861df8b | ||
|
|
15232980d3 | ||
|
|
6058b46519 | ||
|
|
0b07572a24 | ||
|
|
bb819ee649 | ||
|
|
ee965fc4b7 | ||
|
|
a7c16f40df | ||
|
|
e83cea1b48 | ||
|
|
dbca4d6631 | ||
|
|
8cdca5cbe9 | ||
|
|
121b0a744a | ||
|
|
4ec712dcc6 | ||
|
|
e6bfb6941d | ||
|
|
d2bdd90982 | ||
|
|
59a24f45f2 | ||
|
|
ef011e704b | ||
|
|
943fe56b61 | ||
|
|
670ca673f8 | ||
|
|
265e66f43e | ||
|
|
baf9ab7970 | ||
|
|
dd5e73ae20 | ||
|
|
5d1ceb6aa9 | ||
|
|
acc8680aa8 | ||
|
|
8cb75d0ac5 | ||
|
|
77fccf7db1 | ||
|
|
18a2a42061 | ||
|
|
b2f8023392 | ||
|
|
bcc950cb9e | ||
|
|
5c313e8a6d | ||
|
|
d13194f8e8 | ||
|
|
437c7299b9 | ||
|
|
b744b74533 | ||
|
|
f22d60c74f | ||
|
|
44e1beabce | ||
|
|
f003381651 | ||
|
|
538ae305bf | ||
|
|
d00fc06c06 | ||
|
|
8650784ac7 | ||
|
|
f0acfbbf63 | ||
|
|
da8ea7ea20 | ||
|
|
d484a3d7ad | ||
|
|
978d7d6e76 | ||
|
|
65eefbfce6 | ||
|
|
6e469f1d38 | ||
|
|
3280fd41ae | ||
|
|
97f85611c1 | ||
|
|
7b38cfca6e | ||
|
|
30122e7adf | ||
|
|
0481314430 | ||
|
|
ef7fec1385 | ||
|
|
42623aff06 | ||
|
|
3165f618ed | ||
|
|
93a652c50c | ||
|
|
f506e86466 | ||
|
|
c7053e8c23 | ||
|
|
95a8229587 | ||
|
|
4b3fdadd7f | ||
|
|
7ce8e17e99 | ||
|
|
25d5285cbd | ||
|
|
53806daa3f | ||
|
|
bcca9da94d | ||
|
|
6da76d1019 | ||
|
|
cb73277ec7 | ||
|
|
6d15ecca58 | ||
|
|
e701de5738 | ||
|
|
b4e2b8de7c | ||
|
|
b0ff7506b0 | ||
|
|
1bf38c114d | ||
|
|
96e98edec9 | ||
|
|
6e838ef11c | ||
|
|
55059a4e30 | ||
|
|
98c7800566 | ||
|
|
0e5978f981 | ||
|
|
b52dae4657 | ||
|
|
1b037556da | ||
|
|
6a1c5d7ff3 | ||
|
|
ce4d54c82b | ||
|
|
bca1545ae3 | ||
|
|
b908470f3b | ||
|
|
7c75e9e594 | ||
|
|
55c30cbc73 | ||
|
|
d56115ef45 | ||
|
|
c7f1711d6c | ||
|
|
e280d25c9a | ||
|
|
27f4297396 | ||
|
|
5eabafe2b3 | ||
|
|
ed1ec45817 | ||
|
|
901c5c3d0c | ||
|
|
19292dff3a | ||
|
|
53f8e0664f | ||
|
|
d66e799b5c | ||
|
|
053d5a5787 | ||
|
|
cb3203f130 | ||
|
|
44411aadee | ||
|
|
c953e836e7 |
+17
-16
@@ -1,12 +1,12 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
# Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
# Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
#
|
||||
# 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
|
||||
# https://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,
|
||||
@@ -16,23 +16,24 @@
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
|
||||
## NOTE: This installation script by default generates a runtime wrapper library,
|
||||
## NOTE: This installation script generates a runtime wrapper library by default,
|
||||
## NOTE: which links with OpenBLAS, LAPACK, etc.
|
||||
## NOTE:
|
||||
## NOTE: If you prefer to link your programs directly with OpenBLAS, LAPACK, etc
|
||||
## NOTE: there are two options:
|
||||
## NOTE:
|
||||
## NOTE: (1) use the HEADER_ONLY option when running this installation script,
|
||||
## NOTE: or
|
||||
## NOTE: (2) do not use this installation script, and instead compile your programs
|
||||
## NOTE: using the include folder directly obtained from the armadillo archive.
|
||||
## NOTE: (2) do not use this installation script; instead compile your programs
|
||||
## NOTE: using the include folder directly obtained from the armadillo archive.
|
||||
## NOTE:
|
||||
## NOTE: To forcefully disable use of the runtime wrapper library,
|
||||
## NOTE: compile your programs with ARMA_DONT_USE_WRAPPER enabled.
|
||||
## NOTE: For example:
|
||||
## NOTE: Example:
|
||||
## NOTE: g++ prog.cpp -o prog -O2 -I /home/user/armadillo-14.0.0/include -DARMA_DONT_USE_WRAPPER -lopenblas -llapack
|
||||
## NOTE:
|
||||
## NOTE: The above command line assumes that you have unpacked the armadillo archive into /home/user/
|
||||
## NOTE: This needs to be adjusted for newer versions of Armadillo (ie. change "14.0.0"),
|
||||
## NOTE: The above assumes that the armadillo archive is unpacked into /home/user/
|
||||
## NOTE: Adjust for newer versions of Armadillo (change "14.0.0"),
|
||||
## NOTE: and/or if the armadillo archive has been unpacked into a different folder.
|
||||
## NOTE:
|
||||
## NOTE: Replace -lopenblas with -lblas if you don't have OpenBLAS.
|
||||
@@ -40,7 +41,7 @@
|
||||
## NOTE: More details: https://arma.sourceforge.net/faq.html
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
|
||||
|
||||
if(POLICY CMP0025)
|
||||
# enable differentiation between vanilla Clang and AppleClang
|
||||
@@ -73,7 +74,7 @@ set(ARMA_USE_LAPACK false)
|
||||
set(ARMA_USE_BLAS false)
|
||||
set(ARMA_USE_ATLAS false)
|
||||
set(ARMA_USE_ARPACK false)
|
||||
set(ARMA_USE_SUPERLU false) # Caveat: only SuperLU version 5.x can be used!
|
||||
set(ARMA_USE_SUPERLU false)
|
||||
|
||||
|
||||
# extract version from sources
|
||||
@@ -101,13 +102,13 @@ endif()
|
||||
|
||||
if(DEFINED CMAKE_CXX_COMPILER_ID AND DEFINED CMAKE_CXX_COMPILER_VERSION)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if(NOT (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 6.1.0))
|
||||
if(NOT (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 8.1.0))
|
||||
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
||||
message(STATUS "Added '-std=c++14' to compiler flags")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Compiler too old; need at least gcc 6.1")
|
||||
message(FATAL_ERROR "Compiler too old; need at least gcc 8.1")
|
||||
endif()
|
||||
else()
|
||||
if(NOT (${CMAKE_MAJOR_VERSION} LESS 3))
|
||||
@@ -144,7 +145,7 @@ endif()
|
||||
if(NOT APPLE)
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
message(STATUS "")
|
||||
message(STATUS "*** CMAKE_INSTALL_PREFIX was initalised by cmake to the default value of ${CMAKE_INSTALL_PREFIX}")
|
||||
message(STATUS "*** CMAKE_INSTALL_PREFIX was initialised by cmake to the default value of ${CMAKE_INSTALL_PREFIX}")
|
||||
message(STATUS "*** CMAKE_INSTALL_PREFIX changed to /usr")
|
||||
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Standard install prefix" FORCE)
|
||||
endif()
|
||||
@@ -469,7 +470,7 @@ if(ARPACK_FOUND)
|
||||
set(ARMA_LIBS ${ARMA_LIBS} ${ARPACK_LIBRARY})
|
||||
endif()
|
||||
|
||||
include(ARMA_FindSuperLU5)
|
||||
include(ARMA_FindSuperLU)
|
||||
message(STATUS "SuperLU_FOUND = ${SuperLU_FOUND}")
|
||||
|
||||
if(SuperLU_FOUND)
|
||||
@@ -618,7 +619,7 @@ install(TARGETS armadillo EXPORT ArmadilloLibraryDepends
|
||||
if(BUILD_SMOKE_TEST)
|
||||
if(HEADER_ONLY)
|
||||
## TODO: update to link smoke_test with ARMA_LIBS when HEADER_ONLY option is enabled
|
||||
message(STATUS "*** building smoke_test not suported when HEADER_ONLY enabled")
|
||||
message(STATUS "*** building smoke_test not supported when HEADER_ONLY enabled")
|
||||
else()
|
||||
message(STATUS "*** configuring smoke_test")
|
||||
enable_testing()
|
||||
@@ -631,7 +632,7 @@ endif()
|
||||
## TODO: update armadillo.pc.in to link with ARMA_LIBS when HEADER_ONLY option is enabled
|
||||
|
||||
if(HEADER_ONLY)
|
||||
message(STATUS "*** generating pkgconfig files not suported when HEADER_ONLY enabled")
|
||||
message(STATUS "*** generating pkgconfig files not supported when HEADER_ONLY enabled")
|
||||
else()
|
||||
message(STATUS "*** copying ${PROJECT_SOURCE_DIR}/misc/ to ${PROJECT_BINARY_DIR}/tmp/misc/")
|
||||
file(COPY ${PROJECT_SOURCE_DIR}/misc/ DESTINATION ${PROJECT_BINARY_DIR}/tmp/misc/)
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
Armadillo C++ Linear Algebra Library
|
||||
Copyright 2008-2024 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
Copyright 2008-2025 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
Copyright 2017-2024 Data61 / CSIRO
|
||||
Copyright 2017-2025 Data61 / CSIRO
|
||||
|
||||
This product includes software developed by Conrad Sanderson (https://conradsanderson.id.au)
|
||||
This product includes software developed at National ICT Australia (NICTA)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
### Armadillo: C++ Library for Linear Algebra & Scientific Computing
|
||||
https://arma.sourceforge.net
|
||||
|
||||
Copyright 2008-2024 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
Copyright 2008-2025 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
Copyright 2017-2024 Data61 / CSIRO
|
||||
Copyright 2017-2025 Data61 / CSIRO
|
||||
|
||||
---
|
||||
|
||||
@@ -30,10 +30,11 @@ Copyright 2017-2024 Data61 / CSIRO
|
||||
8. [Windows: Compiling and Linking](#8-windows-compiling-and-linking)
|
||||
|
||||
9. [Support for OpenBLAS and Intel MKL](#9-support-for-openblas-and-intel-mkl)
|
||||
10. [Caveat on use of C++11 auto Keyword](#10-caveat-on-use-of-c11-auto-keyword)
|
||||
11. [Support for OpenMP](#11-support-for-openmp)
|
||||
10. [Support for OpenMP](#10-support-for-openmp)
|
||||
|
||||
11. [Documentation of Functions and Classes](#11-documentation-of-functions-and-classes)
|
||||
12. [Caveat on use of C++11 auto Keyword](#12-caveat-on-use-of-c11-auto-keyword)
|
||||
|
||||
12. [Documentation of Functions and Classes](#12-documentation-of-functions-and-classes)
|
||||
13. [API Stability and Version Policy](#13-api-stability-and-version-policy)
|
||||
14. [Bug Reports and Frequently Asked Questions](#14-bug-reports-and-frequently-asked-questions)
|
||||
|
||||
@@ -78,8 +79,8 @@ Please cite the following papers if you use Armadillo in your research and/or so
|
||||
Citations are useful for the continued development and maintenance of the library.
|
||||
|
||||
* Conrad Sanderson and Ryan Curtin.
|
||||
Armadillo: a template-based C++ library for linear algebra.
|
||||
Journal of Open Source Software, Vol. 1, No. 2, pp. 26, 2016.
|
||||
Armadillo: An Efficient Framework for Numerical Linear Algebra.
|
||||
International Conference on Computer and Automation Engineering, 2025.
|
||||
|
||||
* Conrad Sanderson and Ryan Curtin.
|
||||
Practical Sparse Matrices in C++ with Hybrid Storage and Template-Based Expression Optimisation.
|
||||
@@ -129,8 +130,8 @@ On Windows systems, the MinGW toolset or Visual Studio C++ 2019 (MSVC) can be us
|
||||
|
||||
Caveats on the use of SuperLU:
|
||||
- SuperLU must be available as a shared library
|
||||
- Only the following SuperLU versions are supported: 5.2.x, 5.3.x, 6.0.x
|
||||
- SuperLU 6.0.x must be compiled with default integer size (32 bits)
|
||||
- Only the following SuperLU versions are supported: 5.2.x, 5.3.x, 6.0.x, 7.0.x
|
||||
- SuperLU 6.0.x and 7.0.x must be compiled with default integer size (32 bits)
|
||||
|
||||
---
|
||||
|
||||
@@ -303,7 +304,7 @@ the active solution platform must be set to x64, instead of win32.
|
||||
|
||||
The MSVC project was tested on Windows 10 (64 bit) with Visual Studio C++ 2019.
|
||||
Adaptations may be required for 32 bit systems, later versions of Windows and/or the compiler.
|
||||
For example, options such as `ARMA_BLAS_LONG` and `ARMA_BLAS_UNDERSCORE`,
|
||||
For example, options such as `ARMA_BLAS_LONG_LONG` and `ARMA_BLAS_UNDERSCORE`,
|
||||
defined in `include/armadillo_bits/config.hpp`, may need to be either enabled or disabled.
|
||||
|
||||
The folder `examples/lib_win64` contains a copy of lib and dll files
|
||||
@@ -333,29 +334,28 @@ as used by the replacement libraries. Specifically, the following defines
|
||||
may need to be enabled or disabled:
|
||||
|
||||
ARMA_USE_WRAPPER
|
||||
ARMA_BLAS_CAPITALS
|
||||
ARMA_BLAS_UNDERSCORE
|
||||
ARMA_BLAS_LONG
|
||||
ARMA_BLAS_LONG_LONG
|
||||
ARMA_DONT_USE_FORTRAN_HIDDEN_ARGS
|
||||
ARMA_BLAS_UNDERSCORE
|
||||
ARMA_BLAS_CAPITALS
|
||||
|
||||
See the documentation for more information on the above defines.
|
||||
|
||||
On Linux-based systems, MKL might be installed in a non-standard location such as `/opt`
|
||||
which can cause problems during linking.
|
||||
Before installing Armadillo, the system should know where the MKL libraries are located.
|
||||
For example, `/opt/intel/mkl/lib/intel64/`.
|
||||
This can be achieved by setting the `LD_LIBRARY_PATH` environment variable,
|
||||
or for a more permanent solution, adding the directory locations to `/etc/ld.so.conf`.
|
||||
It may also be possible to store a text file with the locations
|
||||
in the `/etc/ld.so.conf.d` directory. For example, `/etc/ld.so.conf.d/mkl.conf`.
|
||||
If `/etc/ld.so.conf` is modified or `/etc/ld.so.conf.d/mkl.conf` is created,
|
||||
`/sbin/ldconfig` must be run afterwards.
|
||||
Examples: `/opt/intel/oneapi/mkl/latest/lib`, `/opt/intel/mkl/lib/intel64/`.
|
||||
|
||||
Below is an example of `/etc/ld.so.conf.d/mkl.conf`
|
||||
where Intel MKL is installed in `/opt/intel`
|
||||
Before installing Armadillo, the system must know where the MKL libraries are located.
|
||||
This can be achieved via several ways:
|
||||
|
||||
/opt/intel/lib/intel64
|
||||
/opt/intel/mkl/lib/intel64
|
||||
1. By setting the `LD_LIBRARY_PATH` environment variable.
|
||||
|
||||
2. By adding the MKL library directory locations to the `/etc/ld.so.conf` text file,
|
||||
followed by running `/sbin/ldconfig`.
|
||||
|
||||
3. By creating a text file named `/etc/ld.so.conf.d/mkl.conf`
|
||||
which contains the MKL library directory locations,
|
||||
followed by running `/sbin/ldconfig`.
|
||||
|
||||
If MKL is installed and it is persistently giving problems during linking,
|
||||
Support for MKL can be disabled by editing the CMakeLists.txt file,
|
||||
@@ -366,27 +366,18 @@ Comment out the line containing:
|
||||
|
||||
---
|
||||
|
||||
### 10: Caveat on use of C++11 auto Keyword
|
||||
|
||||
Use of the C++11 `auto` keyword is not recommended with Armadillo objects and expressions.
|
||||
|
||||
Armadillo has a template meta-programming framework which creates lots of short lived temporaries
|
||||
that are not properly handled by `auto`.
|
||||
|
||||
---
|
||||
|
||||
### 11: Support for OpenMP
|
||||
### 10: Support for OpenMP
|
||||
|
||||
Armadillo can use OpenMP to automatically speed up computationally
|
||||
expensive element-wise functions such as exp(), log(), cos(), etc.
|
||||
This requires a C++ compiler with OpenMP 3.1+ support.
|
||||
This requires a C++ compiler with OpenMP 4.0+ support.
|
||||
|
||||
For GCC and Clang compilers, use the following option to enable OpenMP:
|
||||
`-fopenmp`
|
||||
|
||||
---
|
||||
|
||||
### 12: Documentation of Functions and Classes
|
||||
### 11: Documentation of Functions and Classes
|
||||
|
||||
The documentation of Armadillo functions and classes is available at:
|
||||
https://arma.sourceforge.net/docs.html
|
||||
@@ -396,6 +387,15 @@ Use a web browser to view it.
|
||||
|
||||
---
|
||||
|
||||
### 12: Caveat on use of C++11 auto Keyword
|
||||
|
||||
Use of the C++11 `auto` keyword is not recommended with Armadillo objects and expressions.
|
||||
|
||||
Armadillo has a template meta-programming framework which creates short-lived temporaries
|
||||
that are not properly handled by `auto`.
|
||||
|
||||
---
|
||||
|
||||
### 13: API Stability and Version Policy
|
||||
|
||||
Each release of Armadillo has its public API (functions, classes, constants)
|
||||
@@ -461,12 +461,12 @@ Octave/Matlab with C++ code that uses Armadillo matrices.
|
||||
|
||||
### 16: Related Software Using Armadillo
|
||||
|
||||
* ensmallen: C++ library for non-linear numerical optimisation (L-BFGS, SGD, CMA-ES, etc)
|
||||
https://ensmallen.org/
|
||||
|
||||
* MLPACK: extensive library of machine learning algorithms
|
||||
https://mlpack.org
|
||||
|
||||
* ensmallen: C++ library for numerical optimisation (L-BFGS, SGD, CMA-ES, etc)
|
||||
https://ensmallen.org/
|
||||
|
||||
* RcppArmadillo: integration of Armadillo with R
|
||||
https://dirk.eddelbuettel.com/code/rcpp.armadillo.html
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 432 B |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -115,6 +115,9 @@ foreach (MKL_NAME ${MKL_NAMES})
|
||||
/usr/local/mkl/*/lib/em64t
|
||||
/usr/local/mkl/*/lib/lib64
|
||||
/usr/local/mkl/*/lib/32
|
||||
/usr/local/intel/oneapi/mkl/latest/lib
|
||||
/opt/intel/oneapi/mkl/latest/lib
|
||||
/opt/intel/oneapi/mkl/*/lib
|
||||
)
|
||||
|
||||
set(TMP_LIBRARY ${${MKL_NAME}_LIBRARY})
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
# Try to find suitable version of SuperLU
|
||||
# Once done, this will define
|
||||
#
|
||||
# SuperLU_FOUND - system has SuperLU
|
||||
# SuperLU_LIBRARY - Link this to use SuperLU
|
||||
# SuperLU_INCLUDE_DIR - directory of SuperLU headers
|
||||
|
||||
find_path(SuperLU_INCLUDE_DIR slu_ddefs.h
|
||||
PATHS ${CMAKE_SYSTEM_INCLUDE_PATH} /usr/include /usr/local/include /opt/local/include
|
||||
PATH_SUFFIXES superlu SuperLU ""
|
||||
)
|
||||
|
||||
find_library(SuperLU_LIBRARY
|
||||
NAMES superlu
|
||||
PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/local/lib64 /opt/local/lib
|
||||
)
|
||||
|
||||
set(SuperLU_FOUND NO)
|
||||
|
||||
if(NOT SuperLU_FIND_QUIETLY)
|
||||
message(STATUS "Looking for suitable version of SuperLU")
|
||||
endif()
|
||||
|
||||
if(SuperLU_LIBRARY AND SuperLU_INCLUDE_DIR)
|
||||
|
||||
# determine if this is a suitable version of SuperLU
|
||||
|
||||
if(EXISTS "${SuperLU_INCLUDE_DIR}/slu_ddefs.h")
|
||||
|
||||
file(READ "${SuperLU_INCLUDE_DIR}/slu_ddefs.h" _slu_HEADER_CONTENTS)
|
||||
|
||||
string(REGEX REPLACE ".*version ([0-9]).*" "\\1" SLU_VERSION_MAJOR "${_slu_HEADER_CONTENTS}")
|
||||
|
||||
if("${SLU_VERSION_MAJOR}" EQUAL "7")
|
||||
set(SuperLU_FOUND YES)
|
||||
endif()
|
||||
|
||||
if("${SLU_VERSION_MAJOR}" EQUAL "6")
|
||||
set(SuperLU_FOUND YES)
|
||||
endif()
|
||||
|
||||
if("${SLU_VERSION_MAJOR}" EQUAL "5")
|
||||
set(SuperLU_FOUND YES)
|
||||
endif()
|
||||
|
||||
if("${SLU_VERSION_MAJOR}" EQUAL "4")
|
||||
|
||||
# NOTE: SLU_VERSION_MAJOR = 4 is not 100% reliable, as the version string in slu_ddefs.h wasn't updated in SuperLU 5.0, 5.1, 5.2
|
||||
# NOTE: We need to explicitly check the prototype of dgssvx() to determine whether this is version 4 or 5.
|
||||
|
||||
string(FIND "${_slu_HEADER_CONTENTS}" "dgssvx" _slu_dgssvx_start)
|
||||
|
||||
if("${_slu_dgssvx_start}" GREATER 0)
|
||||
|
||||
string(SUBSTRING "${_slu_HEADER_CONTENTS}" ${_slu_dgssvx_start} -1 _slu_dgssvx_tmp)
|
||||
|
||||
string(FIND "${_slu_dgssvx_tmp}" ";" _slu_dgssvx_len)
|
||||
|
||||
string(SUBSTRING "${_slu_HEADER_CONTENTS}" ${_slu_dgssvx_start} ${_slu_dgssvx_len} _slu_dgssvx_proto)
|
||||
|
||||
string(FIND "${_slu_dgssvx_proto}" "GlobalLU_t" _slu_dgssvx_check)
|
||||
|
||||
if("${_slu_dgssvx_check}" EQUAL -1)
|
||||
# in version 4, dgssvx() doesn't have a GlobalLU_t argument
|
||||
if(NOT SuperLU_FIND_QUIETLY)
|
||||
message(STATUS "Found SuperLU 4, which is insufficient")
|
||||
endif()
|
||||
else()
|
||||
set(SuperLU_FOUND YES)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
message(STATUS "Could not read ${SuperLU_INCLUDE_DIR}/slu_ddefs.h to verify suitable version")
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(SuperLU_LIBRARY AND NOT SuperLU_INCLUDE_DIR)
|
||||
if(NOT SuperLU_FIND_QUIETLY)
|
||||
message(STATUS "Incomplete installation of SuperLU: no SuperLU headers found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT SuperLU_FOUND)
|
||||
if(NOT SuperLU_FIND_QUIETLY)
|
||||
message(STATUS "Could not find suitable version of SuperLU")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Found SuperLU library: ${SuperLU_LIBRARY}")
|
||||
endif()
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
# Try to find SuperLU 5.x
|
||||
# Once done, this will define
|
||||
#
|
||||
# SuperLU_FOUND - system has SuperLU
|
||||
# SuperLU_LIBRARY - Link this to use SuperLU
|
||||
# SuperLU_INCLUDE_DIR - directory of SuperLU headers
|
||||
|
||||
find_path(SuperLU_INCLUDE_DIR slu_ddefs.h
|
||||
PATHS ${CMAKE_SYSTEM_INCLUDE_PATH} /usr/include /usr/local/include /opt/local/include
|
||||
PATH_SUFFIXES superlu SuperLU ""
|
||||
)
|
||||
|
||||
find_library(SuperLU_LIBRARY
|
||||
NAMES superlu
|
||||
PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/local/lib64 /opt/local/lib
|
||||
)
|
||||
|
||||
set(SuperLU_FOUND NO)
|
||||
|
||||
if(NOT SuperLU_FIND_QUIETLY)
|
||||
message(STATUS "Looking for SuperLU version 5")
|
||||
endif()
|
||||
|
||||
if(SuperLU_LIBRARY AND SuperLU_INCLUDE_DIR)
|
||||
|
||||
# Now determine if the version is version 5.
|
||||
# This voodoo is required as SuperLU developers like to keep things messy.
|
||||
|
||||
if(EXISTS "${SuperLU_INCLUDE_DIR}/slu_ddefs.h")
|
||||
|
||||
file(READ "${SuperLU_INCLUDE_DIR}/slu_ddefs.h" _slu_HEADER_CONTENTS)
|
||||
|
||||
string(REGEX REPLACE ".*version ([0-9]).*" "\\1" SLU_VERSION_MAJOR "${_slu_HEADER_CONTENTS}")
|
||||
|
||||
if("${SLU_VERSION_MAJOR}" EQUAL "5")
|
||||
set(SuperLU_FOUND YES)
|
||||
else()
|
||||
if("${SLU_VERSION_MAJOR}" EQUAL "4")
|
||||
|
||||
# NOTE: SLU_VERSION_MAJOR = 4 is not 100% reliable, as the version string in slu_ddefs.h wasn't updated in SuperLU 5.0, 5.1, 5.2
|
||||
# NOTE: We need to explicitly check the prototype of dgssvx() to determine whether this is version 4 or 5.
|
||||
|
||||
string(FIND "${_slu_HEADER_CONTENTS}" "dgssvx" _slu_dgssvx_start)
|
||||
|
||||
if("${_slu_dgssvx_start}" GREATER 0)
|
||||
|
||||
string(SUBSTRING "${_slu_HEADER_CONTENTS}" ${_slu_dgssvx_start} -1 _slu_dgssvx_tmp)
|
||||
|
||||
string(FIND "${_slu_dgssvx_tmp}" ";" _slu_dgssvx_len)
|
||||
|
||||
string(SUBSTRING "${_slu_HEADER_CONTENTS}" ${_slu_dgssvx_start} ${_slu_dgssvx_len} _slu_dgssvx_proto)
|
||||
|
||||
string(FIND "${_slu_dgssvx_proto}" "GlobalLU_t" _slu_dgssvx_check)
|
||||
|
||||
if("${_slu_dgssvx_check}" EQUAL -1)
|
||||
# in version 4, dgssvx() doesn't have a GlobalLU_t argument
|
||||
if(NOT SuperLU_FIND_QUIETLY)
|
||||
message(STATUS "Found SuperLU, but it doesn't appear to be version 5")
|
||||
endif()
|
||||
else()
|
||||
set(SuperLU_FOUND YES)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
if(NOT SuperLU_FIND_QUIETLY)
|
||||
message(STATUS "Found SuperLU version ${SLU_VERSION_MAJOR}, but version 5 is required")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
if(NOT SuperLU_FIND_QUIETLY)
|
||||
message(STATUS "Found SuperLU and headers, but could not verify version 5")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SuperLU_LIBRARY AND NOT SuperLU_INCLUDE_DIR)
|
||||
if(NOT SuperLU_FIND_QUIETLY)
|
||||
message(STATUS "Incomplete installation of SuperLU: no SuperLU headers found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT SuperLU_FOUND)
|
||||
if(NOT SuperLU_FIND_QUIETLY)
|
||||
message(STATUS "Could not find SuperLU")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Found SuperLU: ${SuperLU_LIBRARY}")
|
||||
endif()
|
||||
|
||||
@@ -6,7 +6,7 @@ check_cmake()
|
||||
{
|
||||
(cmake --version) </dev/null >/dev/null 2>&1 ||
|
||||
{
|
||||
echo "error: cmake 3.5+ is required to configure and install Armadillo"
|
||||
echo "error: cmake 3.10+ is required to configure and install Armadillo"
|
||||
echo ""
|
||||
echo "cmake can be installed via your system's package manager,"
|
||||
echo "or downloaded from https://cmake.org"
|
||||
|
||||
+2
-2
@@ -7,11 +7,11 @@ If you have installed Armadillo via the CMake installer:
|
||||
g++ example1.cpp -o example1 -std=c++14 -O2 -larmadillo
|
||||
|
||||
Otherwise, if you want to use Armadillo without installation:
|
||||
g++ example1.cpp -o example1 -std=c++14 -O2 -I /home/user/armadillo-14.0.0/include -DARMA_DONT_USE_WRAPPER -lopenblas
|
||||
g++ example1.cpp -o example1 -std=c++14 -O2 -I /home/user/armadillo-15.0.0/include -DARMA_DONT_USE_WRAPPER -lopenblas
|
||||
|
||||
The above command assumes that the armadillo archive was unpacked into /home/user/
|
||||
The command needs to be adjusted if the archive was unpacked into a different directory,
|
||||
and/or for each specific version of Armadillo (ie. "14.0.0" needs to be changed).
|
||||
and/or for each specific version of Armadillo (ie. "15.0.0" needs to be changed).
|
||||
|
||||
If you don't have OpenBLAS, on Linux change -lopenblas to -lblas -llapack
|
||||
and on macOS change -lopenblas to -framework Accelerate
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#include <iostream>
|
||||
#include <armadillo>
|
||||
|
||||
using namespace std;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
using namespace arma;
|
||||
|
||||
// Armadillo documentation is available at:
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
The lib and dll files in this folder are for MSVC running on Windows 10 (64 bit).
|
||||
|
||||
The files were obtained from a pre-compiled release of OpenBLAS 0.3.27:
|
||||
https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.27/OpenBLAS-0.3.27-x64.zip
|
||||
The files were obtained from a pre-compiled release of OpenBLAS 0.3.30:
|
||||
https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.30/OpenBLAS-0.3.30-x64.zip
|
||||
|
||||
The compilation was done by a third party. USE AT YOUR OWN RISK.
|
||||
|
||||
libopenblas.dll is a copy of OpenBLAS-0.3.27-x64/bin/libopenblas.dll
|
||||
libopenblas.lib is a copy of OpenBLAS-0.3.27-x64/lib/libopenblas.dll.a
|
||||
libopenblas.dll is a copy of OpenBLAS-0.3.30-x64/bin/libopenblas.dll
|
||||
libopenblas.lib is a copy of OpenBLAS-0.3.30-x64/lib/libopenblas.dll.a
|
||||
|
||||
OpenBLAS is a high-performance implementation of BLAS and LAPACK.
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+40
-13
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -54,7 +54,16 @@
|
||||
#include <atomic>
|
||||
|
||||
#if defined(ARMA_USE_STD_MUTEX)
|
||||
#include <mutex>
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mutex>)
|
||||
#include <mutex>
|
||||
#else
|
||||
#undef ARMA_USE_STD_MUTEX
|
||||
#pragma message ("WARNING: use of std::mutex disabled; mutex header not found")
|
||||
#endif
|
||||
#else
|
||||
#include <mutex>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// #if defined(ARMA_HAVE_CXX17)
|
||||
@@ -62,6 +71,16 @@
|
||||
// #include <system_error>
|
||||
// #endif
|
||||
|
||||
#if defined(ARMA_HAVE_CXX23)
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<stdfloat>)
|
||||
#include <stdfloat>
|
||||
#endif
|
||||
#else
|
||||
#include <stdfloat>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ( defined(__unix__) || defined(__unix) || defined(_POSIX_C_SOURCE) || (defined(__APPLE__) && defined(__MACH__)) ) && !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -139,6 +158,7 @@ namespace arma
|
||||
#include "armadillo_bits/constants_old.hpp"
|
||||
#include "armadillo_bits/mp_misc.hpp"
|
||||
#include "armadillo_bits/arma_rel_comparators.hpp"
|
||||
#include "armadillo_bits/cond_rel.hpp"
|
||||
#include "armadillo_bits/fill.hpp"
|
||||
|
||||
#if defined(ARMA_RNG_ALT)
|
||||
@@ -171,7 +191,6 @@ namespace arma
|
||||
#include "armadillo_bits/translate_superlu.hpp"
|
||||
#include "armadillo_bits/translate_fftw3.hpp"
|
||||
|
||||
#include "armadillo_bits/cond_rel_bones.hpp"
|
||||
#include "armadillo_bits/arrayops_bones.hpp"
|
||||
#include "armadillo_bits/podarray_bones.hpp"
|
||||
#include "armadillo_bits/auxlib_bones.hpp"
|
||||
@@ -275,7 +294,7 @@ namespace arma
|
||||
#include "armadillo_bits/op_resize_bones.hpp"
|
||||
#include "armadillo_bits/op_cov_bones.hpp"
|
||||
#include "armadillo_bits/op_cor_bones.hpp"
|
||||
#include "armadillo_bits/op_shift_bones.hpp"
|
||||
#include "armadillo_bits/op_circshift_bones.hpp"
|
||||
#include "armadillo_bits/op_shuffle_bones.hpp"
|
||||
#include "armadillo_bits/op_prod_bones.hpp"
|
||||
#include "armadillo_bits/op_pinv_bones.hpp"
|
||||
@@ -283,7 +302,7 @@ namespace arma
|
||||
#include "armadillo_bits/op_flip_bones.hpp"
|
||||
#include "armadillo_bits/op_reverse_bones.hpp"
|
||||
#include "armadillo_bits/op_princomp_bones.hpp"
|
||||
#include "armadillo_bits/op_misc_bones.hpp"
|
||||
#include "armadillo_bits/op_elem_bones.hpp"
|
||||
#include "armadillo_bits/op_orth_null_bones.hpp"
|
||||
#include "armadillo_bits/op_relational_bones.hpp"
|
||||
#include "armadillo_bits/op_find_bones.hpp"
|
||||
@@ -304,6 +323,7 @@ namespace arma
|
||||
#include "armadillo_bits/op_clamp_bones.hpp"
|
||||
#include "armadillo_bits/op_expmat_bones.hpp"
|
||||
#include "armadillo_bits/op_nonzeros_bones.hpp"
|
||||
#include "armadillo_bits/op_omit_bones.hpp"
|
||||
#include "armadillo_bits/op_diff_bones.hpp"
|
||||
#include "armadillo_bits/op_norm_bones.hpp"
|
||||
#include "armadillo_bits/op_vecnorm_bones.hpp"
|
||||
@@ -320,6 +340,7 @@ namespace arma
|
||||
#include "armadillo_bits/op_rank_bones.hpp"
|
||||
#include "armadillo_bits/op_row_as_mat_bones.hpp"
|
||||
#include "armadillo_bits/op_col_as_mat_bones.hpp"
|
||||
#include "armadillo_bits/op_accu_bones.hpp"
|
||||
#include "armadillo_bits/op_sp_plus_bones.hpp"
|
||||
#include "armadillo_bits/op_sp_minus_bones.hpp"
|
||||
#include "armadillo_bits/op_sp_sum_bones.hpp"
|
||||
@@ -375,8 +396,10 @@ namespace arma
|
||||
#include "armadillo_bits/spop_repmat_bones.hpp"
|
||||
#include "armadillo_bits/spop_vectorise_bones.hpp"
|
||||
#include "armadillo_bits/spop_norm_bones.hpp"
|
||||
#include "armadillo_bits/spop_shift_bones.hpp"
|
||||
#include "armadillo_bits/spop_circshift_bones.hpp"
|
||||
#include "armadillo_bits/spop_relational_bones.hpp"
|
||||
#include "armadillo_bits/spop_omit_bones.hpp"
|
||||
#include "armadillo_bits/spop_accu_bones.hpp"
|
||||
|
||||
#include "armadillo_bits/spglue_plus_bones.hpp"
|
||||
#include "armadillo_bits/spglue_minus_bones.hpp"
|
||||
@@ -523,10 +546,9 @@ namespace arma
|
||||
#include "armadillo_bits/fn_resize.hpp"
|
||||
#include "armadillo_bits/fn_cov.hpp"
|
||||
#include "armadillo_bits/fn_cor.hpp"
|
||||
#include "armadillo_bits/fn_shift.hpp"
|
||||
#include "armadillo_bits/fn_circshift.hpp"
|
||||
#include "armadillo_bits/fn_shuffle.hpp"
|
||||
#include "armadillo_bits/fn_prod.hpp"
|
||||
#include "armadillo_bits/fn_eps.hpp"
|
||||
#include "armadillo_bits/fn_pinv.hpp"
|
||||
#include "armadillo_bits/fn_rank.hpp"
|
||||
#include "armadillo_bits/fn_kron.hpp"
|
||||
@@ -564,6 +586,7 @@ namespace arma
|
||||
#include "armadillo_bits/fn_clamp.hpp"
|
||||
#include "armadillo_bits/fn_expmat.hpp"
|
||||
#include "armadillo_bits/fn_nonzeros.hpp"
|
||||
#include "armadillo_bits/fn_omit.hpp"
|
||||
#include "armadillo_bits/fn_interp1.hpp"
|
||||
#include "armadillo_bits/fn_interp2.hpp"
|
||||
#include "armadillo_bits/fn_qz.hpp"
|
||||
@@ -590,6 +613,7 @@ namespace arma
|
||||
#include "armadillo_bits/fn_powmat.hpp"
|
||||
#include "armadillo_bits/fn_powext.hpp"
|
||||
#include "armadillo_bits/fn_diags_spdiags.hpp"
|
||||
#include "armadillo_bits/fn_balance.hpp"
|
||||
|
||||
#include "armadillo_bits/fn_speye.hpp"
|
||||
#include "armadillo_bits/fn_spones.hpp"
|
||||
@@ -658,7 +682,6 @@ namespace arma
|
||||
#include "armadillo_bits/eop_core_meat.hpp"
|
||||
#include "armadillo_bits/eglue_core_meat.hpp"
|
||||
|
||||
#include "armadillo_bits/cond_rel_meat.hpp"
|
||||
#include "armadillo_bits/arrayops_meat.hpp"
|
||||
#include "armadillo_bits/podarray_meat.hpp"
|
||||
#include "armadillo_bits/auxlib_meat.hpp"
|
||||
@@ -729,7 +752,7 @@ namespace arma
|
||||
#include "armadillo_bits/op_resize_meat.hpp"
|
||||
#include "armadillo_bits/op_cov_meat.hpp"
|
||||
#include "armadillo_bits/op_cor_meat.hpp"
|
||||
#include "armadillo_bits/op_shift_meat.hpp"
|
||||
#include "armadillo_bits/op_circshift_meat.hpp"
|
||||
#include "armadillo_bits/op_shuffle_meat.hpp"
|
||||
#include "armadillo_bits/op_prod_meat.hpp"
|
||||
#include "armadillo_bits/op_pinv_meat.hpp"
|
||||
@@ -737,7 +760,7 @@ namespace arma
|
||||
#include "armadillo_bits/op_flip_meat.hpp"
|
||||
#include "armadillo_bits/op_reverse_meat.hpp"
|
||||
#include "armadillo_bits/op_princomp_meat.hpp"
|
||||
#include "armadillo_bits/op_misc_meat.hpp"
|
||||
#include "armadillo_bits/op_elem_meat.hpp"
|
||||
#include "armadillo_bits/op_orth_null_meat.hpp"
|
||||
#include "armadillo_bits/op_relational_meat.hpp"
|
||||
#include "armadillo_bits/op_find_meat.hpp"
|
||||
@@ -758,6 +781,7 @@ namespace arma
|
||||
#include "armadillo_bits/op_clamp_meat.hpp"
|
||||
#include "armadillo_bits/op_expmat_meat.hpp"
|
||||
#include "armadillo_bits/op_nonzeros_meat.hpp"
|
||||
#include "armadillo_bits/op_omit_meat.hpp"
|
||||
#include "armadillo_bits/op_diff_meat.hpp"
|
||||
#include "armadillo_bits/op_norm_meat.hpp"
|
||||
#include "armadillo_bits/op_vecnorm_meat.hpp"
|
||||
@@ -774,6 +798,7 @@ namespace arma
|
||||
#include "armadillo_bits/op_rank_meat.hpp"
|
||||
#include "armadillo_bits/op_row_as_mat_meat.hpp"
|
||||
#include "armadillo_bits/op_col_as_mat_meat.hpp"
|
||||
#include "armadillo_bits/op_accu_meat.hpp"
|
||||
#include "armadillo_bits/op_sp_plus_meat.hpp"
|
||||
#include "armadillo_bits/op_sp_minus_meat.hpp"
|
||||
#include "armadillo_bits/op_sp_sum_meat.hpp"
|
||||
@@ -829,8 +854,10 @@ namespace arma
|
||||
#include "armadillo_bits/spop_repmat_meat.hpp"
|
||||
#include "armadillo_bits/spop_vectorise_meat.hpp"
|
||||
#include "armadillo_bits/spop_norm_meat.hpp"
|
||||
#include "armadillo_bits/spop_shift_meat.hpp"
|
||||
#include "armadillo_bits/spop_circshift_meat.hpp"
|
||||
#include "armadillo_bits/spop_relational_meat.hpp"
|
||||
#include "armadillo_bits/spop_omit_meat.hpp"
|
||||
#include "armadillo_bits/spop_accu_meat.hpp"
|
||||
|
||||
#include "armadillo_bits/spglue_plus_meat.hpp"
|
||||
#include "armadillo_bits/spglue_minus_meat.hpp"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -328,7 +328,7 @@ BaseCube<elem_type,derived>::is_finite() const
|
||||
for(uword c=0; c<n_c; ++c)
|
||||
for(uword r=0; r<n_r; ++r)
|
||||
{
|
||||
if( arma_isfinite(P.at(r,c,s)) == false ) { return false; }
|
||||
if( arma_isnonfinite(P.at(r,c,s)) ) { return false; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ BaseCube<elem_type,derived>::has_nonfinite() const
|
||||
for(uword c=0; c<n_c; ++c)
|
||||
for(uword r=0; r<n_r; ++r)
|
||||
{
|
||||
if(arma_isfinite(P.at(r,c,s)) == false) { return true; }
|
||||
if(arma_isnonfinite(P.at(r,c,s))) { return true; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -109,7 +109,7 @@ struct Base_trans<derived, false> { typedef Base_trans_default<derived> result;
|
||||
|
||||
template<typename elem_type, typename derived>
|
||||
struct Base
|
||||
: public Base_extra<elem_type, derived, is_supported_blas_type<elem_type>::value>::result
|
||||
: public Base_extra<elem_type, derived, is_blas_type<elem_type>::value>::result
|
||||
, public Base_eval<elem_type, derived, is_Mat<derived>::value>::result
|
||||
, public Base_trans<derived, is_cx<elem_type>::value>::result
|
||||
{
|
||||
@@ -127,11 +127,11 @@ struct Base
|
||||
arma_warn_unused inline elem_type min() const;
|
||||
arma_warn_unused inline elem_type max() const;
|
||||
|
||||
inline elem_type min(uword& index_of_min_val) const;
|
||||
inline elem_type max(uword& index_of_max_val) const;
|
||||
[[deprecated("use .index_min() instead")]] inline elem_type min(uword& index_of_min_val) const;
|
||||
[[deprecated("use .index_max() instead")]] inline elem_type max(uword& index_of_max_val) const;
|
||||
|
||||
inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
|
||||
inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;
|
||||
[[deprecated("use .index_min() with ind2sub() instead")]] inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
|
||||
[[deprecated("use .index_max() with ind2sub() instead")]] inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;
|
||||
|
||||
arma_warn_unused inline uword index_min() const;
|
||||
arma_warn_unused inline uword index_max() const;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -685,7 +685,7 @@ Base<elem_type,derived>::is_finite() const
|
||||
|
||||
for(uword i=0; i<n_elem; ++i)
|
||||
{
|
||||
if(arma_isfinite(Pea[i]) == false) { return false; }
|
||||
if(arma_isnonfinite(Pea[i])) { return false; }
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -696,7 +696,7 @@ Base<elem_type,derived>::is_finite() const
|
||||
for(uword col=0; col<n_cols; ++col)
|
||||
for(uword row=0; row<n_rows; ++row)
|
||||
{
|
||||
if(arma_isfinite(P.at(row,col)) == false) { return false; }
|
||||
if(arma_isnonfinite(P.at(row,col))) { return false; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -829,7 +829,7 @@ Base<elem_type,derived>::has_nonfinite() const
|
||||
|
||||
for(uword i=0; i<n_elem; ++i)
|
||||
{
|
||||
if(arma_isfinite(Pea[i]) == false) { return true; }
|
||||
if(arma_isnonfinite(Pea[i])) { return true; }
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -840,7 +840,7 @@ Base<elem_type,derived>::has_nonfinite() const
|
||||
for(uword col=0; col<n_cols; ++col)
|
||||
for(uword row=0; row<n_rows; ++row)
|
||||
{
|
||||
if(arma_isfinite(P.at(row,col)) == false) { return true; }
|
||||
if(arma_isnonfinite(P.at(row,col))) { return true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -91,7 +91,7 @@ class Col : public Mat<eT>
|
||||
inline Col(const subview_cube<eT>& X);
|
||||
inline Col& operator=(const subview_cube<eT>& X);
|
||||
|
||||
arma_frown("use braced initialiser list instead") inline mat_injector<Col> operator<<(const eT val);
|
||||
[[deprecated("use braced initialiser list instead")]] inline mat_injector<Col> operator<<(const eT val);
|
||||
|
||||
arma_warn_unused arma_inline const Op<Col<eT>,op_htrans> t() const;
|
||||
arma_warn_unused arma_inline const Op<Col<eT>,op_htrans> ht() const;
|
||||
@@ -141,7 +141,7 @@ class Col : public Mat<eT>
|
||||
|
||||
template<typename T1> inline void shed_rows(const Base<uword, T1>& indices);
|
||||
|
||||
arma_deprecated inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
|
||||
[[deprecated]] inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
|
||||
inline void insert_rows(const uword row_num, const uword N);
|
||||
|
||||
template<typename T1> inline void insert_rows(const uword row_num, const Base<eT,T1>& X);
|
||||
@@ -187,6 +187,8 @@ class Col<eT>::fixed : public Col<eT>
|
||||
{
|
||||
private:
|
||||
|
||||
using Mat<eT>::mem_local;
|
||||
|
||||
static constexpr bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);
|
||||
|
||||
arma_align_mem eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -1345,11 +1345,11 @@ Col<eT>::fixed<fixed_n_elem>::fixed(const fill::fill_class<fill_type>&)
|
||||
{
|
||||
arma_debug_sigprint_this(this);
|
||||
|
||||
if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
|
||||
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
|
||||
if(is_same_type<fill_type, fill::fill_eye >::yes) { (*this).eye(); }
|
||||
if(is_same_type<fill_type, fill::fill_randu>::yes) { (*this).randu(); }
|
||||
if(is_same_type<fill_type, fill::fill_randn>::yes) { (*this).randn(); }
|
||||
if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
|
||||
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
|
||||
if(is_same_type<fill_type, fill::fill_eye >::yes) { Mat<eT>::eye(); }
|
||||
if(is_same_type<fill_type, fill::fill_randu>::yes) { Mat<eT>::randu(); }
|
||||
if(is_same_type<fill_type, fill::fill_randn>::yes) { Mat<eT>::randn(); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -22,10 +22,8 @@
|
||||
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
class CubeToMatOp : public Base< typename T1::elem_type, CubeToMatOp<T1, op_type> >
|
||||
struct CubeToMatOp : public Base< typename T1::elem_type, CubeToMatOp<T1, op_type> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename T1::elem_type elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
@@ -33,8 +31,11 @@ class CubeToMatOp : public Base< typename T1::elem_type, CubeToMatOp<T1, op_type
|
||||
inline CubeToMatOp(const T1& in_m, const uword in_aux_uword);
|
||||
inline ~CubeToMatOp();
|
||||
|
||||
arma_aligned const T1& m; //!< the operand; must be derived from BaseCube
|
||||
arma_aligned uword aux_uword; //!< auxiliary data, uword format
|
||||
const T1& m; //!< the operand; must be derived from BaseCube
|
||||
uword aux_uword; //!< auxiliary data, uword format
|
||||
|
||||
template<typename eT2>
|
||||
constexpr bool is_alias(const Mat<eT2>&) const { return false; }
|
||||
|
||||
static constexpr bool is_row = op_type::template traits<T1>::is_row;
|
||||
static constexpr bool is_col = op_type::template traits<T1>::is_col;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -218,9 +218,9 @@ class Cube : public BaseCube< eT, Cube<eT> >
|
||||
|
||||
template<typename T1> inline void shed_slices(const Base<uword, T1>& indices);
|
||||
|
||||
arma_deprecated inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
|
||||
arma_deprecated inline void insert_cols(const uword row_num, const uword N, const bool set_to_zero);
|
||||
arma_deprecated inline void insert_slices(const uword slice_num, const uword N, const bool set_to_zero);
|
||||
[[deprecated]] inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
|
||||
[[deprecated]] inline void insert_cols(const uword row_num, const uword N, const bool set_to_zero);
|
||||
[[deprecated]] inline void insert_slices(const uword slice_num, const uword N, const bool set_to_zero);
|
||||
|
||||
inline void insert_rows(const uword row_num, const uword N);
|
||||
inline void insert_cols(const uword row_num, const uword N);
|
||||
@@ -387,12 +387,11 @@ class Cube : public BaseCube< eT, Cube<eT> >
|
||||
arma_warn_unused inline eT min() const;
|
||||
arma_warn_unused inline eT max() const;
|
||||
|
||||
inline eT min(uword& index_of_min_val) const;
|
||||
inline eT max(uword& index_of_max_val) const;
|
||||
|
||||
inline eT min(uword& row_of_min_val, uword& col_of_min_val, uword& slice_of_min_val) const;
|
||||
inline eT max(uword& row_of_max_val, uword& col_of_max_val, uword& slice_of_max_val) const;
|
||||
[[deprecated("use .index_min() instead")]] inline eT min(uword& index_of_min_val) const;
|
||||
[[deprecated("use .index_max() instead")]] inline eT max(uword& index_of_max_val) const;
|
||||
|
||||
[[deprecated("use .index_min() with ind2sub() instead")]] inline eT min(uword& row_of_min_val, uword& col_of_min_val, uword& slice_of_min_val) const;
|
||||
[[deprecated("use .index_max() with ind2sub() instead")]] inline eT max(uword& row_of_max_val, uword& col_of_max_val, uword& slice_of_max_val) const;
|
||||
|
||||
arma_cold inline bool save(const std::string name, const file_type type = arma_binary) const;
|
||||
arma_cold inline bool save(const hdf5_name& spec, const file_type type = hdf5_binary) const;
|
||||
@@ -402,13 +401,13 @@ class Cube : public BaseCube< eT, Cube<eT> >
|
||||
arma_cold inline bool load(const hdf5_name& spec, const file_type type = hdf5_binary);
|
||||
arma_cold inline bool load( std::istream& is, const file_type type = auto_detect);
|
||||
|
||||
arma_deprecated inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
|
||||
arma_deprecated inline bool quiet_save(const hdf5_name& spec, const file_type type = hdf5_binary) const;
|
||||
arma_deprecated inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
|
||||
[[deprecated("use save() instead")]] inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
|
||||
[[deprecated("use save() instead")]] inline bool quiet_save(const hdf5_name& spec, const file_type type = hdf5_binary) const;
|
||||
[[deprecated("use save() instead")]] inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
|
||||
|
||||
arma_deprecated inline bool quiet_load(const std::string name, const file_type type = auto_detect);
|
||||
arma_deprecated inline bool quiet_load(const hdf5_name& spec, const file_type type = hdf5_binary);
|
||||
arma_deprecated inline bool quiet_load( std::istream& is, const file_type type = auto_detect);
|
||||
[[deprecated("use load() instead")]] inline bool quiet_load(const std::string name, const file_type type = auto_detect);
|
||||
[[deprecated("use load() instead")]] inline bool quiet_load(const hdf5_name& spec, const file_type type = hdf5_binary);
|
||||
[[deprecated("use load() instead")]] inline bool quiet_load( std::istream& is, const file_type type = auto_detect);
|
||||
|
||||
|
||||
// iterators
|
||||
@@ -465,11 +464,12 @@ class Cube : public BaseCube< eT, Cube<eT> >
|
||||
inline Mat<eT>* create_mat_ptr(const uword in_slice) const;
|
||||
inline Mat<eT>* get_mat_ptr(const uword in_slice) const;
|
||||
|
||||
friend class glue_join;
|
||||
friend class op_reshape;
|
||||
friend class op_resize;
|
||||
friend class subview_cube<eT>;
|
||||
|
||||
friend struct glue_join;
|
||||
friend struct op_reshape;
|
||||
friend struct op_resize;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@@ -486,6 +486,9 @@ class Cube<eT>::fixed : public Cube<eT>
|
||||
{
|
||||
private:
|
||||
|
||||
using Cube<eT>::mat_ptrs_local;
|
||||
using Cube<eT>::mem_local;
|
||||
|
||||
static constexpr uword fixed_n_elem = fixed_n_rows * fixed_n_cols * fixed_n_slices;
|
||||
static constexpr uword fixed_n_elem_slice = fixed_n_rows * fixed_n_cols;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -615,7 +615,7 @@ Cube<eT>::get_mat_ptr(const uword in_slice) const
|
||||
|
||||
#if defined(ARMA_USE_OPENMP)
|
||||
{
|
||||
#pragma omp atomic read
|
||||
#pragma omp atomic read seq_cst
|
||||
mat_ptr = mat_ptrs[in_slice];
|
||||
}
|
||||
#elif defined(ARMA_USE_STD_MUTEX)
|
||||
@@ -634,12 +634,12 @@ Cube<eT>::get_mat_ptr(const uword in_slice) const
|
||||
{
|
||||
#pragma omp critical (arma_Cube_mat_ptrs)
|
||||
{
|
||||
#pragma omp atomic read
|
||||
#pragma omp atomic read seq_cst
|
||||
mat_ptr = mat_ptrs[in_slice];
|
||||
|
||||
if(mat_ptr == nullptr) { mat_ptr = create_mat_ptr(in_slice); }
|
||||
|
||||
#pragma omp atomic write
|
||||
#pragma omp atomic write seq_cst
|
||||
mat_ptrs[in_slice] = mat_ptr;
|
||||
}
|
||||
}
|
||||
@@ -784,6 +784,10 @@ Cube<eT>::operator=(const Cube<eT>& x)
|
||||
|
||||
arrayops::copy( memptr(), x.mem, n_elem );
|
||||
}
|
||||
else
|
||||
{
|
||||
arma_debug_print("Cube::operator=(): copy omitted");
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -1019,7 +1023,7 @@ Cube<eT>::operator-=(const subview_cube<eT>& X)
|
||||
|
||||
|
||||
|
||||
//! in-place element-wise cube mutiplication (using a subcube on the right-hand-side)
|
||||
//! in-place element-wise cube multiplication (using a subcube on the right-hand-side)
|
||||
template<typename eT>
|
||||
inline
|
||||
Cube<eT>&
|
||||
@@ -2868,6 +2872,14 @@ Cube<eT>::Cube(const eOpCube<T1, eop_type>& X)
|
||||
|
||||
init_cold();
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return; }
|
||||
}
|
||||
|
||||
eop_type::apply(*this, X);
|
||||
}
|
||||
|
||||
@@ -2890,6 +2902,14 @@ Cube<eT>::operator=(const eOpCube<T1, eop_type>& X)
|
||||
|
||||
init_warm(X.get_n_rows(), X.get_n_cols(), X.get_n_slices());
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return *this; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return *this; }
|
||||
}
|
||||
|
||||
eop_type::apply(*this, X);
|
||||
|
||||
return *this;
|
||||
@@ -2912,6 +2932,14 @@ Cube<eT>::operator+=(const eOpCube<T1, eop_type>& X)
|
||||
|
||||
if(bad_alias) { const Cube<eT> tmp(X); return (*this).operator+=(tmp); }
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply_inplace_plus(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return *this; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_plus(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return *this; }
|
||||
}
|
||||
|
||||
eop_type::apply_inplace_plus(*this, X);
|
||||
|
||||
return *this;
|
||||
@@ -2934,6 +2962,14 @@ Cube<eT>::operator-=(const eOpCube<T1, eop_type>& X)
|
||||
|
||||
if(bad_alias) { const Cube<eT> tmp(X); return (*this).operator-=(tmp); }
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply_inplace_minus(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return *this; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_minus(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return *this; }
|
||||
}
|
||||
|
||||
eop_type::apply_inplace_minus(*this, X);
|
||||
|
||||
return *this;
|
||||
@@ -2956,6 +2992,14 @@ Cube<eT>::operator%=(const eOpCube<T1, eop_type>& X)
|
||||
|
||||
if(bad_alias) { const Cube<eT> tmp(X); return (*this).operator%=(tmp); }
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply_inplace_schur(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return *this; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_schur(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return *this; }
|
||||
}
|
||||
|
||||
eop_type::apply_inplace_schur(*this, X);
|
||||
|
||||
return *this;
|
||||
@@ -2978,6 +3022,14 @@ Cube<eT>::operator/=(const eOpCube<T1, eop_type>& X)
|
||||
|
||||
if(bad_alias) { const Cube<eT> tmp(X); return (*this).operator/=(tmp); }
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply_inplace_div(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return *this; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_div(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return *this; }
|
||||
}
|
||||
|
||||
eop_type::apply_inplace_div(*this, X);
|
||||
|
||||
return *this;
|
||||
@@ -3448,7 +3500,7 @@ Cube<eT>::at_alt(const uword i) const
|
||||
|
||||
|
||||
|
||||
//! linear element accessor (treats the cube as a vector); bounds checking not done when ARMA_NO_DEBUG is defined
|
||||
//! linear element accessor (treats the cube as a vector); bounds checking not done when ARMA_DONT_CHECK_CONFORMANCE is defined
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
eT&
|
||||
@@ -3461,7 +3513,7 @@ Cube<eT>::operator() (const uword i)
|
||||
|
||||
|
||||
|
||||
//! linear element accessor (treats the cube as a vector); bounds checking not done when ARMA_NO_DEBUG is defined
|
||||
//! linear element accessor (treats the cube as a vector); bounds checking not done when ARMA_DONT_CHECK_CONFORMANCE is defined
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
const eT&
|
||||
@@ -3517,7 +3569,7 @@ Cube<eT>::at(const uword i) const
|
||||
|
||||
|
||||
|
||||
//! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined
|
||||
//! element accessor; bounds checking not done when ARMA_DONT_CHECK_CONFORMANCE is defined
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
eT&
|
||||
@@ -3537,7 +3589,7 @@ Cube<eT>::operator() (const uword in_row, const uword in_col, const uword in_sli
|
||||
|
||||
|
||||
|
||||
//! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined
|
||||
//! element accessor; bounds checking not done when ARMA_DONT_CHECK_CONFORMANCE is defined
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
const eT&
|
||||
@@ -5412,10 +5464,10 @@ Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::fixed(const fill::f
|
||||
|
||||
mem_setup();
|
||||
|
||||
if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
|
||||
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
|
||||
if(is_same_type<fill_type, fill::fill_randu>::yes) { (*this).randu(); }
|
||||
if(is_same_type<fill_type, fill::fill_randn>::yes) { (*this).randn(); }
|
||||
if(is_same_type<fill_type, fill::fill_zeros>::yes) { Cube<eT>::zeros(); }
|
||||
if(is_same_type<fill_type, fill::fill_ones >::yes) { Cube<eT>::ones(); }
|
||||
if(is_same_type<fill_type, fill::fill_randu>::yes) { Cube<eT>::randu(); }
|
||||
if(is_same_type<fill_type, fill::fill_randn>::yes) { Cube<eT>::randn(); }
|
||||
|
||||
arma_static_check( (is_same_type<fill_type, fill::fill_eye>::yes), "Cube::fixed::fixed(): unsupported fill type" );
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -22,20 +22,18 @@
|
||||
|
||||
//! support class for generator functions (zeros, ones)
|
||||
template<typename eT, typename gen_type>
|
||||
class GenCube
|
||||
struct GenCube
|
||||
: public BaseCube< eT, GenCube<eT, gen_type> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef eT elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
static constexpr bool use_at = false;
|
||||
static constexpr bool is_simple = (is_same_type<gen_type, gen_ones>::value) || (is_same_type<gen_type, gen_zeros>::value);
|
||||
|
||||
arma_aligned const uword n_rows;
|
||||
arma_aligned const uword n_cols;
|
||||
arma_aligned const uword n_slices;
|
||||
const uword n_rows;
|
||||
const uword n_cols;
|
||||
const uword n_slices;
|
||||
|
||||
arma_inline GenCube(const uword in_n_rows, const uword in_n_cols, const uword in_n_slices);
|
||||
arma_inline ~GenCube();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -89,7 +89,7 @@ GenCube<eT, gen_type>::apply(Cube<eT>& out) const
|
||||
arma_debug_sigprint();
|
||||
|
||||
// NOTE: we're assuming that the cube has already been set to the correct size;
|
||||
// this is done by either the Cube contructor or operator=()
|
||||
// this is done by either the Cube constructor or operator=()
|
||||
|
||||
if(is_same_type<gen_type, gen_zeros>::yes) { out.zeros(); }
|
||||
else if(is_same_type<gen_type, gen_ones >::yes) { out.ones(); }
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -22,11 +22,9 @@
|
||||
|
||||
//! support class for generator functions (zeros, ones, eye)
|
||||
template<typename T1, typename gen_type>
|
||||
class Gen
|
||||
struct Gen
|
||||
: public Base< typename T1::elem_type, Gen<T1, gen_type> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename T1::elem_type elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
@@ -37,8 +35,8 @@ class Gen
|
||||
static constexpr bool is_col = T1::is_col;
|
||||
static constexpr bool is_xvec = T1::is_xvec;
|
||||
|
||||
arma_aligned const uword n_rows;
|
||||
arma_aligned const uword n_cols;
|
||||
const uword n_rows;
|
||||
const uword n_cols;
|
||||
|
||||
arma_inline Gen(const uword in_n_rows, const uword in_n_cols);
|
||||
arma_inline ~Gen();
|
||||
@@ -54,6 +52,9 @@ class Gen
|
||||
inline void apply_inplace_div (Mat<elem_type>& out) const;
|
||||
|
||||
inline void apply(subview<elem_type>& out) const;
|
||||
|
||||
template<typename eT2>
|
||||
constexpr bool is_alias(const Mat<eT2>&) const { return false; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -91,7 +91,7 @@ Gen<T1, gen_type>::apply(Mat<typename T1::elem_type>& out) const
|
||||
arma_debug_sigprint();
|
||||
|
||||
// NOTE: we're assuming that the matrix has already been set to the correct size;
|
||||
// this is done by either the Mat contructor or operator=()
|
||||
// this is done by either the Mat constructor or operator=()
|
||||
|
||||
if(is_same_type<gen_type, gen_zeros>::yes) { out.zeros(); }
|
||||
else if(is_same_type<gen_type, gen_ones >::yes) { out.ones(); }
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -23,10 +23,8 @@
|
||||
|
||||
//! analog of the Glue class, intended for Cube objects
|
||||
template<typename T1, typename T2, typename glue_type>
|
||||
class GlueCube : public BaseCube< typename T1::elem_type, GlueCube<T1, T2, glue_type> >
|
||||
struct GlueCube : public BaseCube< typename T1::elem_type, GlueCube<T1, T2, glue_type> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename T1::elem_type elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -43,12 +43,10 @@ struct Glue_traits<T1, T2, glue_type, false>
|
||||
|
||||
|
||||
template<typename T1, typename T2, typename glue_type>
|
||||
class Glue
|
||||
struct Glue
|
||||
: public Base< typename T1::elem_type, Glue<T1, T2, glue_type> >
|
||||
, public Glue_traits<T1, T2, glue_type, has_nested_glue_traits<glue_type>::value>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename T1::elem_type elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
@@ -56,6 +54,9 @@ class Glue
|
||||
inline Glue(const T1& in_A, const T2& in_B, const uword in_aux_uword);
|
||||
inline ~Glue();
|
||||
|
||||
template<typename eT2>
|
||||
inline bool is_alias(const Mat<eT2>& X) const;
|
||||
|
||||
const T1& A; //!< first operand; must be derived from Base
|
||||
const T2& B; //!< second operand; must be derived from Base
|
||||
uword aux_uword; //!< storage of auxiliary data, uword format
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -53,4 +53,17 @@ Glue<T1,T2,glue_type>::~Glue()
|
||||
|
||||
|
||||
|
||||
template<typename T1, typename T2, typename glue_type>
|
||||
template<typename eT2>
|
||||
inline
|
||||
bool
|
||||
Glue<T1,T2,glue_type>::is_alias(const Mat<eT2>& X) const
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return (A.is_alias(X) || B.is_alias(X));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -106,7 +106,12 @@ MapMat<eT>::operator=(const MapMat<eT>& x)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
if(this == &x) { return; }
|
||||
if(this == &x)
|
||||
{
|
||||
arma_debug_print("MapMat::operator=(): copy omitted");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
access::rw(n_rows) = x.n_rows;
|
||||
access::rw(n_cols) = x.n_cols;
|
||||
@@ -970,18 +975,17 @@ MapMat_val<eT>::operator*=(const eT in_val)
|
||||
|
||||
if(it != it_end)
|
||||
{
|
||||
if(in_val != eT(0))
|
||||
{
|
||||
eT& val = (*it).second;
|
||||
|
||||
val *= in_val;
|
||||
|
||||
if(val == eT(0)) { map_ref.erase(it); }
|
||||
}
|
||||
else
|
||||
{
|
||||
map_ref.erase(it);
|
||||
}
|
||||
eT& val = (*it).second;
|
||||
|
||||
val *= in_val;
|
||||
|
||||
if(val == eT(0)) { map_ref.erase(it); }
|
||||
}
|
||||
else
|
||||
{
|
||||
const eT val = eT(0) * in_val; // in case in_val is inf or nan
|
||||
|
||||
if(val != eT(0)) { parent.set_val(index, val); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1009,9 +1013,7 @@ MapMat_val<eT>::operator/=(const eT in_val)
|
||||
}
|
||||
else
|
||||
{
|
||||
// silly operation, but included for completness
|
||||
|
||||
const eT val = eT(0) / in_val;
|
||||
const eT val = eT(0) / in_val; // in case in_val is zero or nan
|
||||
|
||||
if(val != eT(0)) { parent.set_val(index, val); }
|
||||
}
|
||||
@@ -1481,18 +1483,11 @@ SpMat_MapMat_val<eT>::mul(const eT in_val)
|
||||
|
||||
if(it != it_end)
|
||||
{
|
||||
if(in_val != eT(0))
|
||||
{
|
||||
eT& val = (*it).second;
|
||||
|
||||
val *= in_val;
|
||||
|
||||
if(val == eT(0)) { map_ref.erase(it); }
|
||||
}
|
||||
else
|
||||
{
|
||||
map_ref.erase(it);
|
||||
}
|
||||
eT& val = (*it).second;
|
||||
|
||||
val *= in_val;
|
||||
|
||||
if(val == eT(0)) { map_ref.erase(it); }
|
||||
|
||||
s_parent.sync_state = 1;
|
||||
|
||||
@@ -1500,19 +1495,15 @@ SpMat_MapMat_val<eT>::mul(const eT in_val)
|
||||
}
|
||||
else
|
||||
{
|
||||
// element not found, ie. it's zero; zero multiplied by anything is zero, except for nan and inf
|
||||
if(arma_isfinite(in_val) == false)
|
||||
const eT result = eT(0) * in_val; // in case in_val is inf or nan
|
||||
|
||||
if(result != eT(0))
|
||||
{
|
||||
const eT result = eT(0) * in_val;
|
||||
m_parent.set_val(index, result);
|
||||
|
||||
if(result != eT(0)) // paranoia, in case compiling with -ffast-math
|
||||
{
|
||||
m_parent.set_val(index, result);
|
||||
|
||||
s_parent.sync_state = 1;
|
||||
|
||||
access::rw(s_parent.n_nonzero) = m_parent.get_n_nonzero();
|
||||
}
|
||||
s_parent.sync_state = 1;
|
||||
|
||||
access::rw(s_parent.n_nonzero) = m_parent.get_n_nonzero();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1554,19 +1545,15 @@ SpMat_MapMat_val<eT>::div(const eT in_val)
|
||||
}
|
||||
else
|
||||
{
|
||||
// element not found, ie. it's zero; zero divided by anything is zero, except for zero and nan
|
||||
if( (in_val == eT(0)) || (arma_isnan(in_val)) )
|
||||
const eT result = eT(0) / in_val; // in case in_val is zero or nan
|
||||
|
||||
if(result != eT(0))
|
||||
{
|
||||
const eT result = eT(0) / in_val;
|
||||
m_parent.set_val(index, result);
|
||||
|
||||
if(result != eT(0)) // paranoia, in case compiling with -ffast-math
|
||||
{
|
||||
m_parent.set_val(index, result);
|
||||
|
||||
s_parent.sync_state = 1;
|
||||
|
||||
access::rw(s_parent.n_nonzero) = m_parent.get_n_nonzero();
|
||||
}
|
||||
s_parent.sync_state = 1;
|
||||
|
||||
access::rw(s_parent.n_nonzero) = m_parent.get_n_nonzero();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -190,8 +190,8 @@ class Mat : public Base< eT, Mat<eT> >
|
||||
inline Mat& operator/=(const spdiagview<eT>& X);
|
||||
|
||||
|
||||
arma_frown("use braced initialiser list instead") inline mat_injector<Mat> operator<<(const eT val);
|
||||
arma_frown("use braced initialiser list instead") inline mat_injector<Mat> operator<<(const injector_end_of_row<>& x);
|
||||
[[deprecated("use braced initialiser list instead")]] inline mat_injector<Mat> operator<<(const eT val);
|
||||
[[deprecated("use braced initialiser list instead")]] inline mat_injector<Mat> operator<<(const injector_end_of_row<>& x);
|
||||
|
||||
|
||||
arma_inline subview_row<eT> row(const uword row_num);
|
||||
@@ -310,8 +310,8 @@ class Mat : public Base< eT, Mat<eT> >
|
||||
template<typename T1> inline void shed_rows(const Base<uword, T1>& indices);
|
||||
template<typename T1> inline void shed_cols(const Base<uword, T1>& indices);
|
||||
|
||||
arma_frown("use insert_rows(row_num, N) instead") inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
|
||||
arma_frown("use insert_cols(col_num, N) instead") inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero);
|
||||
[[deprecated("use insert_rows(row_num, N) instead")]] inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
|
||||
[[deprecated("use insert_cols(col_num, N) instead")]] inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero);
|
||||
|
||||
inline void insert_rows(const uword row_num, const uword N);
|
||||
inline void insert_cols(const uword col_num, const uword N);
|
||||
@@ -485,7 +485,7 @@ class Mat : public Base< eT, Mat<eT> >
|
||||
inline Mat& reshape(const uword new_n_rows, const uword new_n_cols);
|
||||
inline Mat& reshape(const SizeMat& s);
|
||||
|
||||
arma_frown("use reshape(n_rows, n_cols) instead") inline void reshape(const uword new_n_rows, const uword new_n_cols, const uword dim); //!< NOTE: don't use this form: it will be removed
|
||||
[[deprecated("use reshape(n_rows, n_cols) instead")]] inline void reshape(const uword new_n_rows, const uword new_n_cols, const uword dim); //!< NOTE: don't use this form: it will be removed
|
||||
|
||||
|
||||
template<typename functor> inline Mat& for_each(functor F);
|
||||
@@ -541,11 +541,11 @@ class Mat : public Base< eT, Mat<eT> >
|
||||
arma_warn_unused inline eT min() const;
|
||||
arma_warn_unused inline eT max() const;
|
||||
|
||||
inline eT min(uword& index_of_min_val) const;
|
||||
inline eT max(uword& index_of_max_val) const;
|
||||
[[deprecated("use .index_min() instead")]] inline eT min(uword& index_of_min_val) const;
|
||||
[[deprecated("use .index_max() instead")]] inline eT max(uword& index_of_max_val) const;
|
||||
|
||||
inline eT min(uword& row_of_min_val, uword& col_of_min_val) const;
|
||||
inline eT max(uword& row_of_max_val, uword& col_of_max_val) const;
|
||||
[[deprecated("use .index_min() with ind2sub() instead")]] inline eT min(uword& row_of_min_val, uword& col_of_min_val) const;
|
||||
[[deprecated("use .index_max() with ind2sub() instead")]] inline eT max(uword& row_of_max_val, uword& col_of_max_val) const;
|
||||
|
||||
|
||||
arma_cold inline bool save(const std::string name, const file_type type = arma_binary) const;
|
||||
@@ -558,15 +558,15 @@ class Mat : public Base< eT, Mat<eT> >
|
||||
arma_cold inline bool load(const csv_name& spec, const file_type type = csv_ascii);
|
||||
arma_cold inline bool load( std::istream& is, const file_type type = auto_detect);
|
||||
|
||||
arma_frown("use save() instead") inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
|
||||
arma_frown("use save() instead") inline bool quiet_save(const hdf5_name& spec, const file_type type = hdf5_binary) const;
|
||||
arma_frown("use save() instead") inline bool quiet_save(const csv_name& spec, const file_type type = csv_ascii) const;
|
||||
arma_frown("use save() instead") inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
|
||||
[[deprecated("use save() instead")]] inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
|
||||
[[deprecated("use save() instead")]] inline bool quiet_save(const hdf5_name& spec, const file_type type = hdf5_binary) const;
|
||||
[[deprecated("use save() instead")]] inline bool quiet_save(const csv_name& spec, const file_type type = csv_ascii) const;
|
||||
[[deprecated("use save() instead")]] inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
|
||||
|
||||
arma_frown("use load() instead") inline bool quiet_load(const std::string name, const file_type type = auto_detect);
|
||||
arma_frown("use load() instead") inline bool quiet_load(const hdf5_name& spec, const file_type type = hdf5_binary);
|
||||
arma_frown("use load() instead") inline bool quiet_load(const csv_name& spec, const file_type type = csv_ascii);
|
||||
arma_frown("use load() instead") inline bool quiet_load( std::istream& is, const file_type type = auto_detect);
|
||||
[[deprecated("use load() instead")]] inline bool quiet_load(const std::string name, const file_type type = auto_detect);
|
||||
[[deprecated("use load() instead")]] inline bool quiet_load(const hdf5_name& spec, const file_type type = hdf5_binary);
|
||||
[[deprecated("use load() instead")]] inline bool quiet_load(const csv_name& spec, const file_type type = csv_ascii);
|
||||
[[deprecated("use load() instead")]] inline bool quiet_load( std::istream& is, const file_type type = auto_detect);
|
||||
|
||||
|
||||
// for container-like functionality
|
||||
@@ -771,6 +771,9 @@ class Mat : public Base< eT, Mat<eT> >
|
||||
|
||||
inline void steal_mem_col(Mat& X, const uword max_n_rows);
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const; //!< don't use this unless you're writing code internal to Armadillo
|
||||
|
||||
|
||||
template<uword fixed_n_rows, uword fixed_n_cols> class fixed;
|
||||
|
||||
@@ -798,13 +801,14 @@ class Mat : public Base< eT, Mat<eT> >
|
||||
|
||||
friend class Cube<eT>;
|
||||
friend class subview_cube<eT>;
|
||||
friend class glue_join;
|
||||
friend class op_strans;
|
||||
friend class op_htrans;
|
||||
friend class op_resize;
|
||||
friend class op_mean;
|
||||
friend class op_max;
|
||||
friend class op_min;
|
||||
|
||||
friend struct glue_join;
|
||||
friend struct op_strans;
|
||||
friend struct op_htrans;
|
||||
friend struct op_resize;
|
||||
friend struct op_mean;
|
||||
friend struct op_max;
|
||||
friend struct op_min;
|
||||
|
||||
|
||||
public:
|
||||
@@ -822,6 +826,8 @@ class Mat<eT>::fixed : public Mat<eT>
|
||||
{
|
||||
private:
|
||||
|
||||
using Mat<eT>::mem_local;
|
||||
|
||||
static constexpr uword fixed_n_elem = fixed_n_rows * fixed_n_cols;
|
||||
static constexpr bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -474,9 +474,9 @@ Mat<eT>::Mat(const char* text)
|
||||
|
||||
init( std::string(text) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//! create the matrix from a textual description
|
||||
template<typename eT>
|
||||
inline
|
||||
@@ -489,8 +489,8 @@ Mat<eT>::operator=(const char* text)
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//! create the matrix from a textual description
|
||||
template<typename eT>
|
||||
@@ -508,9 +508,9 @@ Mat<eT>::Mat(const std::string& text)
|
||||
|
||||
init(text);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//! create the matrix from a textual description
|
||||
template<typename eT>
|
||||
inline
|
||||
@@ -915,6 +915,10 @@ Mat<eT>::operator=(const Mat<eT>& in_mat)
|
||||
|
||||
arrayops::copy( memptr(), in_mat.mem, in_mat.n_elem );
|
||||
}
|
||||
else
|
||||
{
|
||||
arma_debug_print("Mat::operator=(): copy omitted");
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -1324,6 +1328,19 @@ Mat<eT>::steal_mem_col(Mat<eT>& x, const uword max_n_rows)
|
||||
|
||||
|
||||
|
||||
template<typename eT>
|
||||
template<typename eT2>
|
||||
arma_inline
|
||||
bool
|
||||
Mat<eT>::is_alias(const Mat<eT2>& X) const
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return (is_same_type<eT,eT2>::yes) && (void_ptr(this) == void_ptr(&X));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//! construct a matrix from a given auxiliary array of eTs.
|
||||
//! if copy_aux_mem is true, new memory is allocated and the array is copied.
|
||||
//! if copy_aux_mem is false, the auxiliary array is used directly (without allocating memory and copying).
|
||||
@@ -2054,7 +2071,7 @@ Mat<eT>::operator-=(const subview<eT>& X)
|
||||
|
||||
|
||||
|
||||
//! in-place matrix mutiplication (using a submatrix on the right-hand-side)
|
||||
//! in-place matrix multiplication (using a submatrix on the right-hand-side)
|
||||
template<typename eT>
|
||||
inline
|
||||
Mat<eT>&
|
||||
@@ -2069,7 +2086,7 @@ Mat<eT>::operator*=(const subview<eT>& X)
|
||||
|
||||
|
||||
|
||||
//! in-place element-wise matrix mutiplication (using a submatrix on the right-hand-side)
|
||||
//! in-place element-wise matrix multiplication (using a submatrix on the right-hand-side)
|
||||
template<typename eT>
|
||||
inline
|
||||
Mat<eT>&
|
||||
@@ -2244,7 +2261,7 @@ Mat<eT>::operator-=(const subview_cube<eT>& X)
|
||||
|
||||
|
||||
|
||||
//! in-place matrix mutiplication (using a single-slice subcube on the right-hand-side)
|
||||
//! in-place matrix multiplication (using a single-slice subcube on the right-hand-side)
|
||||
template<typename eT>
|
||||
inline
|
||||
Mat<eT>&
|
||||
@@ -2261,7 +2278,7 @@ Mat<eT>::operator*=(const subview_cube<eT>& X)
|
||||
|
||||
|
||||
|
||||
//! in-place element-wise matrix mutiplication (using a single-slice subcube on the right-hand-side)
|
||||
//! in-place element-wise matrix multiplication (using a single-slice subcube on the right-hand-side)
|
||||
template<typename eT>
|
||||
inline
|
||||
Mat<eT>&
|
||||
@@ -2370,7 +2387,7 @@ Mat<eT>::operator-=(const diagview<eT>& X)
|
||||
|
||||
|
||||
|
||||
//! in-place matrix mutiplication (using a diagview on the right-hand-side)
|
||||
//! in-place matrix multiplication (using a diagview on the right-hand-side)
|
||||
template<typename eT>
|
||||
inline
|
||||
Mat<eT>&
|
||||
@@ -2385,7 +2402,7 @@ Mat<eT>::operator*=(const diagview<eT>& X)
|
||||
|
||||
|
||||
|
||||
//! in-place element-wise matrix mutiplication (using a diagview on the right-hand-side)
|
||||
//! in-place element-wise matrix multiplication (using a diagview on the right-hand-side)
|
||||
template<typename eT>
|
||||
inline
|
||||
Mat<eT>&
|
||||
@@ -2849,6 +2866,8 @@ Mat<eT>::operator=(const SpSubview<eT>& X)
|
||||
|
||||
if(X.n_rows == X.m.n_rows)
|
||||
{
|
||||
arma_debug_print("access via arrays");
|
||||
|
||||
X.m.sync();
|
||||
|
||||
const uword sv_col_start = X.aux_col1;
|
||||
@@ -2876,6 +2895,8 @@ Mat<eT>::operator=(const SpSubview<eT>& X)
|
||||
}
|
||||
else
|
||||
{
|
||||
arma_debug_print("access via iterators");
|
||||
|
||||
typename SpSubview<eT>::const_iterator it = X.begin();
|
||||
typename SpSubview<eT>::const_iterator it_end = X.end();
|
||||
|
||||
@@ -2900,6 +2921,8 @@ Mat<eT>::operator+=(const SpSubview<eT>& X)
|
||||
|
||||
if(X.n_rows == X.m.n_rows)
|
||||
{
|
||||
arma_debug_print("access via arrays");
|
||||
|
||||
X.m.sync();
|
||||
|
||||
const uword sv_col_start = X.aux_col1;
|
||||
@@ -2927,6 +2950,8 @@ Mat<eT>::operator+=(const SpSubview<eT>& X)
|
||||
}
|
||||
else
|
||||
{
|
||||
arma_debug_print("access via iterators");
|
||||
|
||||
typename SpSubview<eT>::const_iterator it = X.begin();
|
||||
typename SpSubview<eT>::const_iterator it_end = X.end();
|
||||
|
||||
@@ -2951,6 +2976,8 @@ Mat<eT>::operator-=(const SpSubview<eT>& X)
|
||||
|
||||
if(X.n_rows == X.m.n_rows)
|
||||
{
|
||||
arma_debug_print("access via arrays");
|
||||
|
||||
X.m.sync();
|
||||
|
||||
const uword sv_col_start = X.aux_col1;
|
||||
@@ -2978,6 +3005,8 @@ Mat<eT>::operator-=(const SpSubview<eT>& X)
|
||||
}
|
||||
else
|
||||
{
|
||||
arma_debug_print("access via iterators");
|
||||
|
||||
typename SpSubview<eT>::const_iterator it = X.begin();
|
||||
typename SpSubview<eT>::const_iterator it_end = X.end();
|
||||
|
||||
@@ -5172,6 +5201,14 @@ Mat<eT>::Mat(const eOp<T1, eop_type>& X)
|
||||
|
||||
init_cold();
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return; }
|
||||
}
|
||||
|
||||
eop_type::apply(*this, X);
|
||||
}
|
||||
|
||||
@@ -5194,6 +5231,14 @@ Mat<eT>::operator=(const eOp<T1, eop_type>& X)
|
||||
|
||||
init_warm(X.get_n_rows(), X.get_n_cols());
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return *this; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
|
||||
}
|
||||
|
||||
eop_type::apply(*this, X);
|
||||
|
||||
return *this;
|
||||
@@ -5215,6 +5260,14 @@ Mat<eT>::operator+=(const eOp<T1, eop_type>& X)
|
||||
|
||||
if(bad_alias) { const Mat<eT> tmp(X); return (*this).operator+=(tmp); }
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply_inplace_plus(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return *this; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_plus(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
|
||||
}
|
||||
|
||||
eop_type::apply_inplace_plus(*this, X);
|
||||
|
||||
return *this;
|
||||
@@ -5236,6 +5289,14 @@ Mat<eT>::operator-=(const eOp<T1, eop_type>& X)
|
||||
|
||||
if(bad_alias) { const Mat<eT> tmp(X); return (*this).operator-=(tmp); }
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply_inplace_minus(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return *this; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_minus(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
|
||||
}
|
||||
|
||||
eop_type::apply_inplace_minus(*this, X);
|
||||
|
||||
return *this;
|
||||
@@ -5274,6 +5335,14 @@ Mat<eT>::operator%=(const eOp<T1, eop_type>& X)
|
||||
|
||||
if(bad_alias) { const Mat<eT> tmp(X); return (*this).operator%=(tmp); }
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply_inplace_schur(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return *this; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_schur(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
|
||||
}
|
||||
|
||||
eop_type::apply_inplace_schur(*this, X);
|
||||
|
||||
return *this;
|
||||
@@ -5295,6 +5364,14 @@ Mat<eT>::operator/=(const eOp<T1, eop_type>& X)
|
||||
|
||||
if(bad_alias) { const Mat<eT> tmp(X); return (*this).operator/=(tmp); }
|
||||
|
||||
if(arma_config::optimise_powexpr && is_same_type<eop_type, eop_pow>::value)
|
||||
{
|
||||
constexpr bool eT_ok = is_real_or_cx<eT>::value;
|
||||
|
||||
if( X.aux == eT(2) ) { eop_square::apply_inplace_div(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return *this; }
|
||||
if(eT_ok && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_div(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
|
||||
}
|
||||
|
||||
eop_type::apply_inplace_div(*this, X);
|
||||
|
||||
return *this;
|
||||
@@ -6378,7 +6455,7 @@ Mat<eT>::at_alt(const uword ii) const
|
||||
|
||||
|
||||
|
||||
//! linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_NO_DEBUG is defined
|
||||
//! linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_DONT_CHECK_CONFORMANCE is defined
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
eT&
|
||||
@@ -6391,7 +6468,7 @@ Mat<eT>::operator() (const uword ii)
|
||||
|
||||
|
||||
|
||||
//! linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_NO_DEBUG is defined
|
||||
//! linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_DONT_CHECK_CONFORMANCE is defined
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
const eT&
|
||||
@@ -6447,7 +6524,7 @@ Mat<eT>::at(const uword ii) const
|
||||
|
||||
|
||||
|
||||
//! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined
|
||||
//! element accessor; bounds checking not done when ARMA_DONT_CHECK_CONFORMANCE is defined
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
eT&
|
||||
@@ -6460,7 +6537,7 @@ Mat<eT>::operator() (const uword in_row, const uword in_col)
|
||||
|
||||
|
||||
|
||||
//! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined
|
||||
//! element accessor; bounds checking not done when ARMA_DONT_CHECK_CONFORMANCE is defined
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
const eT&
|
||||
@@ -6613,7 +6690,7 @@ Mat<eT>::is_colvec() const
|
||||
|
||||
|
||||
|
||||
//! returns true if the object has the same number of non-zero rows and columnns
|
||||
//! returns true if the object has the same number of non-zero rows and columns
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
bool
|
||||
@@ -9552,11 +9629,11 @@ Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::fixed(const fill::fill_class<fill_ty
|
||||
{
|
||||
arma_debug_sigprint_this(this);
|
||||
|
||||
if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
|
||||
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
|
||||
if(is_same_type<fill_type, fill::fill_eye >::yes) { (*this).eye(); }
|
||||
if(is_same_type<fill_type, fill::fill_randu>::yes) { (*this).randu(); }
|
||||
if(is_same_type<fill_type, fill::fill_randn>::yes) { (*this).randn(); }
|
||||
if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
|
||||
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
|
||||
if(is_same_type<fill_type, fill::fill_eye >::yes) { Mat<eT>::eye(); }
|
||||
if(is_same_type<fill_type, fill::fill_randu>::yes) { Mat<eT>::randu(); }
|
||||
if(is_same_type<fill_type, fill::fill_randn>::yes) { Mat<eT>::randn(); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -21,10 +21,8 @@
|
||||
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
class OpCube : public BaseCube< typename T1::elem_type, OpCube<T1, op_type> >
|
||||
struct OpCube : public BaseCube< typename T1::elem_type, OpCube<T1, op_type> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename T1::elem_type elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
@@ -35,11 +33,11 @@ class OpCube : public BaseCube< typename T1::elem_type, OpCube<T1, op_type> >
|
||||
inline OpCube(const BaseCube<typename T1::elem_type, T1>& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c);
|
||||
inline ~OpCube();
|
||||
|
||||
arma_aligned const T1& m; //!< the operand; must be derived from BaseCube
|
||||
arma_aligned elem_type aux; //!< auxiliary data, using the element type as used by T1
|
||||
arma_aligned uword aux_uword_a; //!< auxiliary data, uword format
|
||||
arma_aligned uword aux_uword_b; //!< auxiliary data, uword format
|
||||
arma_aligned uword aux_uword_c; //!< auxiliary data, uword format
|
||||
const T1& m; //!< the operand; must be derived from BaseCube
|
||||
elem_type aux; //!< auxiliary data, using the element type as used by T1
|
||||
uword aux_uword_a; //!< auxiliary data, uword format
|
||||
uword aux_uword_b; //!< auxiliary data, uword format
|
||||
uword aux_uword_c; //!< auxiliary data, uword format
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -43,12 +43,10 @@ struct Op_traits<T1, op_type, false>
|
||||
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
class Op
|
||||
struct Op
|
||||
: public Base< typename T1::elem_type, Op<T1, op_type> >
|
||||
, public Op_traits<T1, op_type, has_nested_op_traits<op_type>::value>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename T1::elem_type elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
@@ -58,10 +56,13 @@ class Op
|
||||
inline Op(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b);
|
||||
inline ~Op();
|
||||
|
||||
arma_aligned const T1& m; //!< the operand; must be derived from Base
|
||||
arma_aligned elem_type aux; //!< auxiliary data, using the element type as used by T1
|
||||
arma_aligned uword aux_uword_a; //!< auxiliary data, uword format
|
||||
arma_aligned uword aux_uword_b; //!< auxiliary data, uword format
|
||||
template<typename eT2>
|
||||
inline bool is_alias(const Mat<eT2>& X) const;
|
||||
|
||||
const T1& m; //!< the operand; must be derived from Base
|
||||
elem_type aux; //!< auxiliary data, using the element type as used by T1
|
||||
uword aux_uword_a; //!< auxiliary data, uword format
|
||||
uword aux_uword_b; //!< auxiliary data, uword format
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -76,4 +76,17 @@ Op<T1, op_type>::~Op()
|
||||
|
||||
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
template<typename eT2>
|
||||
inline
|
||||
bool
|
||||
Op<T1, op_type>::is_alias(const Mat<eT2>& X) const
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
return m.is_alias(X);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -20,7 +20,7 @@
|
||||
//! @{
|
||||
|
||||
|
||||
// within each specialisation of the Proxy class:
|
||||
// within each specialisation of the Proxy struct:
|
||||
//
|
||||
// elem_type = type of the elements obtained from object Q
|
||||
// pod_type = underlying type of elements if elem_type is std::complex
|
||||
@@ -168,7 +168,7 @@ struct Proxy< Mat<eT> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const Mat<eT>& Q;
|
||||
const Mat<eT>& Q;
|
||||
|
||||
inline explicit Proxy(const Mat<eT>& A)
|
||||
: Q(A)
|
||||
@@ -188,7 +188,7 @@ struct Proxy< Mat<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&Q) == void_ptr(&X)); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -215,7 +215,7 @@ struct Proxy< Col<eT> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const Col<eT>& Q;
|
||||
const Col<eT>& Q;
|
||||
|
||||
inline explicit Proxy(const Col<eT>& A)
|
||||
: Q(A)
|
||||
@@ -235,7 +235,7 @@ struct Proxy< Col<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&Q) == void_ptr(&X)); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -262,7 +262,7 @@ struct Proxy< Row<eT> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const Row<eT>& Q;
|
||||
const Row<eT>& Q;
|
||||
|
||||
inline explicit Proxy(const Row<eT>& A)
|
||||
: Q(A)
|
||||
@@ -282,7 +282,7 @@ struct Proxy< Row<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&Q) == void_ptr(&X)); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -309,7 +309,7 @@ struct Proxy< Gen<T1, gen_type> >
|
||||
static constexpr bool is_col = Gen<T1, gen_type>::is_col;
|
||||
static constexpr bool is_xvec = Gen<T1, gen_type>::is_xvec;
|
||||
|
||||
arma_aligned const Gen<T1, gen_type>& Q;
|
||||
const Gen<T1, gen_type>& Q;
|
||||
|
||||
inline explicit Proxy(const Gen<T1, gen_type>& A)
|
||||
: Q(A)
|
||||
@@ -356,7 +356,7 @@ struct Proxy< eOp<T1, eop_type> >
|
||||
static constexpr bool is_col = eOp<T1, eop_type>::is_col;
|
||||
static constexpr bool is_xvec = eOp<T1, eop_type>::is_xvec;
|
||||
|
||||
arma_aligned const eOp<T1, eop_type>& Q;
|
||||
const eOp<T1, eop_type>& Q;
|
||||
|
||||
inline explicit Proxy(const eOp<T1, eop_type>& A)
|
||||
: Q(A)
|
||||
@@ -403,7 +403,7 @@ struct Proxy< eGlue<T1, T2, eglue_type> >
|
||||
static constexpr bool is_col = eGlue<T1, T2, eglue_type>::is_col;
|
||||
static constexpr bool is_xvec = eGlue<T1, T2, eglue_type>::is_xvec;
|
||||
|
||||
arma_aligned const eGlue<T1, T2, eglue_type>& Q;
|
||||
const eGlue<T1, T2, eglue_type>& Q;
|
||||
|
||||
inline explicit Proxy(const eGlue<T1, T2, eglue_type>& A)
|
||||
: Q(A)
|
||||
@@ -450,7 +450,7 @@ struct Proxy< Op<T1, op_type> >
|
||||
static constexpr bool is_col = Op<T1, op_type>::is_col;
|
||||
static constexpr bool is_xvec = Op<T1, op_type>::is_xvec;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline explicit Proxy(const Op<T1, op_type>& A)
|
||||
: Q(A)
|
||||
@@ -497,7 +497,7 @@ struct Proxy< Glue<T1, T2, glue_type> >
|
||||
static constexpr bool is_col = Glue<T1, T2, glue_type>::is_col;
|
||||
static constexpr bool is_xvec = Glue<T1, T2, glue_type>::is_xvec;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline explicit Proxy(const Glue<T1, T2, glue_type>& A)
|
||||
: Q(A)
|
||||
@@ -547,9 +547,9 @@ struct Proxy< Glue<T1, T2, glue_min> >
|
||||
static constexpr bool is_col = this_Glue_type::is_col;
|
||||
static constexpr bool is_xvec = this_Glue_type::is_xvec;
|
||||
|
||||
arma_aligned const this_Glue_type& Q;
|
||||
arma_aligned const Proxy<T1> P1;
|
||||
arma_aligned const Proxy<T2> P2;
|
||||
const this_Glue_type& Q;
|
||||
const Proxy<T1> P1;
|
||||
const Proxy<T2> P2;
|
||||
|
||||
arma_lt_comparator<elem_type> comparator;
|
||||
|
||||
@@ -605,9 +605,9 @@ struct Proxy< Glue<T1, T2, glue_max> >
|
||||
static constexpr bool is_col = this_Glue_type::is_col;
|
||||
static constexpr bool is_xvec = this_Glue_type::is_xvec;
|
||||
|
||||
arma_aligned const this_Glue_type& Q;
|
||||
arma_aligned const Proxy<T1> P1;
|
||||
arma_aligned const Proxy<T2> P2;
|
||||
const this_Glue_type& Q;
|
||||
const Proxy<T1> P1;
|
||||
const Proxy<T2> P2;
|
||||
|
||||
arma_gt_comparator<elem_type> comparator;
|
||||
|
||||
@@ -660,7 +660,7 @@ struct Proxy< mtOp<out_eT, T1, op_type> >
|
||||
static constexpr bool is_col = mtOp<out_eT, T1, op_type>::is_col;
|
||||
static constexpr bool is_xvec = mtOp<out_eT, T1, op_type>::is_xvec;
|
||||
|
||||
arma_aligned const Mat<out_eT> Q;
|
||||
const Mat<out_eT> Q;
|
||||
|
||||
inline explicit Proxy(const mtOp<out_eT, T1, op_type>& A)
|
||||
: Q(A)
|
||||
@@ -707,7 +707,7 @@ struct Proxy< mtGlue<out_eT, T1, T2, glue_type> >
|
||||
static constexpr bool is_col = mtGlue<out_eT, T1, T2, glue_type>::is_col;
|
||||
static constexpr bool is_xvec = mtGlue<out_eT, T1, T2, glue_type>::is_xvec;
|
||||
|
||||
arma_aligned const Mat<out_eT> Q;
|
||||
const Mat<out_eT> Q;
|
||||
|
||||
inline explicit Proxy(const mtGlue<out_eT, T1, T2, glue_type>& A)
|
||||
: Q(A)
|
||||
@@ -754,7 +754,7 @@ struct Proxy< CubeToMatOp<T1, op_type> >
|
||||
static constexpr bool is_col = CubeToMatOp<T1, op_type>::is_col;
|
||||
static constexpr bool is_xvec = CubeToMatOp<T1, op_type>::is_xvec;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline explicit Proxy(const CubeToMatOp<T1, op_type>& A)
|
||||
: Q(A)
|
||||
@@ -801,8 +801,8 @@ struct Proxy< CubeToMatOp<T1, op_vectorise_cube_col> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const unwrap_cube<T1> U;
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const unwrap_cube<T1> U;
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline explicit Proxy(const CubeToMatOp<T1, op_vectorise_cube_col>& A)
|
||||
: U(A.m)
|
||||
@@ -850,7 +850,7 @@ struct Proxy< SpToDOp<T1, op_type> >
|
||||
static constexpr bool is_col = SpToDOp<T1, op_type>::is_col;
|
||||
static constexpr bool is_xvec = SpToDOp<T1, op_type>::is_xvec;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline explicit Proxy(const SpToDOp<T1, op_type>& A)
|
||||
: Q(A)
|
||||
@@ -897,8 +897,8 @@ struct Proxy< SpToDOp<SpMat<eT>, op_sp_nonzeros> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const SpMat<elem_type>& R;
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const SpMat<elem_type>& R;
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline explicit Proxy(const SpToDOp<SpMat<eT>, op_sp_nonzeros>& A)
|
||||
: R(A.m)
|
||||
@@ -946,7 +946,7 @@ struct Proxy< SpToDGlue<T1, T2, glue_type> >
|
||||
static constexpr bool is_col = SpToDGlue<T1, T2, glue_type>::is_col;
|
||||
static constexpr bool is_xvec = SpToDGlue<T1, T2, glue_type>::is_xvec;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline explicit Proxy(const SpToDGlue<T1, T2, glue_type>& A)
|
||||
: Q(A)
|
||||
@@ -993,7 +993,7 @@ struct Proxy< subview<eT> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const subview<eT>& Q;
|
||||
const subview<eT>& Q;
|
||||
|
||||
inline explicit Proxy(const subview<eT>& A)
|
||||
: Q(A)
|
||||
@@ -1013,7 +1013,7 @@ struct Proxy< subview<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
|
||||
@@ -1040,7 +1040,7 @@ struct Proxy< subview_col<eT> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const subview_col<eT>& Q;
|
||||
const subview_col<eT>& Q;
|
||||
|
||||
inline explicit Proxy(const subview_col<eT>& A)
|
||||
: Q(A)
|
||||
@@ -1060,7 +1060,7 @@ struct Proxy< subview_col<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
|
||||
@@ -1087,8 +1087,8 @@ struct Proxy< subview_cols<eT> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const subview_cols<eT>& sv;
|
||||
arma_aligned const Mat<eT> Q;
|
||||
const subview_cols<eT>& sv;
|
||||
const Mat<eT> Q;
|
||||
|
||||
inline explicit Proxy(const subview_cols<eT>& A)
|
||||
: sv(A)
|
||||
@@ -1109,7 +1109,7 @@ struct Proxy< subview_cols<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(sv.m)) == void_ptr(&X)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(sv.m)) == void_ptr(&X)); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return sv.check_overlap(X); }
|
||||
@@ -1136,7 +1136,7 @@ struct Proxy< subview_row<eT> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const subview_row<eT>& Q;
|
||||
const subview_row<eT>& Q;
|
||||
|
||||
inline explicit Proxy(const subview_row<eT>& A)
|
||||
: Q(A)
|
||||
@@ -1156,7 +1156,7 @@ struct Proxy< subview_row<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
|
||||
@@ -1183,8 +1183,8 @@ struct Proxy< subview_elem1<eT,T1> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const subview_elem1<eT,T1>& Q;
|
||||
arma_aligned const Proxy<T1> R;
|
||||
const subview_elem1<eT,T1>& Q;
|
||||
const Proxy<T1> R;
|
||||
|
||||
inline explicit Proxy(const subview_elem1<eT,T1>& A)
|
||||
: Q(A)
|
||||
@@ -1237,7 +1237,7 @@ struct Proxy< subview_elem2<eT,T1,T2> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const Mat<eT> Q;
|
||||
const Mat<eT> Q;
|
||||
|
||||
inline explicit Proxy(const subview_elem2<eT,T1,T2>& A)
|
||||
: Q(A)
|
||||
@@ -1284,7 +1284,7 @@ struct Proxy< diagview<eT> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const diagview<eT>& Q;
|
||||
const diagview<eT>& Q;
|
||||
|
||||
inline explicit Proxy(const diagview<eT>& A)
|
||||
: Q(A)
|
||||
@@ -1304,7 +1304,7 @@ struct Proxy< diagview<eT> >
|
||||
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
|
||||
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }
|
||||
|
||||
template<typename eT2>
|
||||
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
|
||||
@@ -1339,8 +1339,8 @@ struct Proxy_diagvec_mat< Op<T1, op_diagvec> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const Mat<elem_type>& R;
|
||||
arma_aligned const diagview<elem_type> Q;
|
||||
const Mat<elem_type>& R;
|
||||
const diagview<elem_type> Q;
|
||||
|
||||
inline explicit Proxy_diagvec_mat(const Op<T1, op_diagvec>& A)
|
||||
: R(A.m), Q( R.diag() )
|
||||
@@ -1395,7 +1395,7 @@ struct Proxy_diagvec_expr< Op<T1, op_diagvec> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline explicit Proxy_diagvec_expr(const Op<T1, op_diagvec>& A)
|
||||
: Q(A)
|
||||
@@ -1468,7 +1468,7 @@ struct Proxy< Op<T1, op_diagvec2> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline explicit Proxy(const Op<T1, op_diagvec2>& A)
|
||||
: Q(A)
|
||||
@@ -1614,8 +1614,8 @@ struct Proxy_xtrans_vector< Op<T1, op_htrans> >
|
||||
static constexpr bool is_col = Op<T1, op_htrans>::is_col;
|
||||
static constexpr bool is_xvec = Op<T1, op_htrans>::is_xvec;
|
||||
|
||||
arma_aligned const quasi_unwrap<T1> U; // avoid copy if T1 is a Row, Col or subview_col
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const quasi_unwrap<T1> U; // avoid copy if T1 is a Row, Col or subview_col
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline Proxy_xtrans_vector(const Op<T1, op_htrans>& A)
|
||||
: U(A.m)
|
||||
@@ -1656,8 +1656,8 @@ struct Proxy_xtrans_vector< Op<T1, op_strans> >
|
||||
static constexpr bool is_col = Op<T1, op_strans>::is_col;
|
||||
static constexpr bool is_xvec = Op<T1, op_strans>::is_xvec;
|
||||
|
||||
arma_aligned const quasi_unwrap<T1> U; // avoid copy if T1 is a Row, Col or subview_col
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const quasi_unwrap<T1> U; // avoid copy if T1 is a Row, Col or subview_col
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline Proxy_xtrans_vector(const Op<T1, op_strans>& A)
|
||||
: U(A.m)
|
||||
@@ -1832,7 +1832,7 @@ struct Proxy_subview_row_htrans_cx
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const subview_row_htrans<eT> Q;
|
||||
const subview_row_htrans<eT> Q;
|
||||
|
||||
inline explicit Proxy_subview_row_htrans_cx(const Op<subview_row<eT>, op_htrans>& A)
|
||||
: Q(A.m)
|
||||
@@ -1866,7 +1866,7 @@ struct Proxy_subview_row_htrans_non_cx
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const subview_row_strans<eT> Q;
|
||||
const subview_row_strans<eT> Q;
|
||||
|
||||
inline explicit Proxy_subview_row_htrans_non_cx(const Op<subview_row<eT>, op_htrans>& A)
|
||||
: Q(A.m)
|
||||
@@ -1973,7 +1973,7 @@ struct Proxy< Op<subview_row<eT>, op_strans> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const subview_row_strans<eT> Q;
|
||||
const subview_row_strans<eT> Q;
|
||||
|
||||
inline explicit Proxy(const Op<subview_row<eT>, op_strans>& A)
|
||||
: Q(A.m)
|
||||
@@ -2174,8 +2174,8 @@ struct Proxy< Op<T1, op_htrans2> >
|
||||
static constexpr bool is_col = eOp< Op<T1, op_htrans>, eop_scalar_times>::is_col;
|
||||
static constexpr bool is_xvec = eOp< Op<T1, op_htrans>, eop_scalar_times>::is_xvec;
|
||||
|
||||
arma_aligned const Op<T1, op_htrans> R;
|
||||
arma_aligned const eOp< Op<T1, op_htrans>, eop_scalar_times > Q;
|
||||
const Op<T1, op_htrans> R;
|
||||
const eOp< Op<T1, op_htrans>, eop_scalar_times > Q;
|
||||
|
||||
inline explicit Proxy(const Op<T1, op_htrans2>& A)
|
||||
: R(A.m)
|
||||
@@ -2223,7 +2223,7 @@ struct Proxy< subview_row_strans<eT> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const subview_row_strans<eT>& Q;
|
||||
const subview_row_strans<eT>& Q;
|
||||
|
||||
inline explicit Proxy(const subview_row_strans<eT>& A)
|
||||
: Q(A)
|
||||
@@ -2270,7 +2270,7 @@ struct Proxy< subview_row_htrans<eT> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const subview_row_htrans<eT>& Q;
|
||||
const subview_row_htrans<eT>& Q;
|
||||
|
||||
inline explicit Proxy(const subview_row_htrans<eT>& A)
|
||||
: Q(A)
|
||||
@@ -2317,7 +2317,7 @@ struct Proxy< xtrans_mat<eT, do_conj> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const Mat<eT> Q;
|
||||
const Mat<eT> Q;
|
||||
|
||||
inline explicit Proxy(const xtrans_mat<eT, do_conj>& A)
|
||||
: Q(A)
|
||||
@@ -2364,7 +2364,7 @@ struct Proxy< xvec_htrans<eT> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = true;
|
||||
|
||||
arma_aligned const Mat<eT> Q;
|
||||
const Mat<eT> Q;
|
||||
|
||||
inline explicit Proxy(const xvec_htrans<eT>& A)
|
||||
: Q(A)
|
||||
@@ -2419,8 +2419,8 @@ struct Proxy_vectorise_col_mat< Op<T1, op_vectorise_col> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const unwrap<T1> U;
|
||||
arma_aligned const Mat<elem_type> Q;
|
||||
const unwrap<T1> U;
|
||||
const Mat<elem_type> Q;
|
||||
|
||||
inline explicit Proxy_vectorise_col_mat(const Op<T1, op_vectorise_col>& A)
|
||||
: U(A.m)
|
||||
@@ -2476,8 +2476,8 @@ struct Proxy_vectorise_col_expr< Op<T1, op_vectorise_col> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const Op<T1, op_vectorise_col>& Q;
|
||||
arma_aligned const Proxy<T1> R;
|
||||
const Op<T1, op_vectorise_col>& Q;
|
||||
const Proxy<T1> R;
|
||||
|
||||
inline explicit Proxy_vectorise_col_expr(const Op<T1, op_vectorise_col>& A)
|
||||
: Q(A)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -48,7 +48,7 @@ struct ProxyCube< Cube<eT> >
|
||||
static constexpr bool use_mp = false;
|
||||
static constexpr bool has_subview = false;
|
||||
|
||||
arma_aligned const Cube<eT>& Q;
|
||||
const Cube<eT>& Q;
|
||||
|
||||
inline explicit ProxyCube(const Cube<eT>& A)
|
||||
: Q(A)
|
||||
@@ -93,7 +93,7 @@ struct ProxyCube< GenCube<eT, gen_type> >
|
||||
static constexpr bool use_mp = false;
|
||||
static constexpr bool has_subview = false;
|
||||
|
||||
arma_aligned const GenCube<eT, gen_type>& Q;
|
||||
const GenCube<eT, gen_type>& Q;
|
||||
|
||||
inline explicit ProxyCube(const GenCube<eT, gen_type>& A)
|
||||
: Q(A)
|
||||
@@ -138,7 +138,7 @@ struct ProxyCube< OpCube<T1, op_type> >
|
||||
static constexpr bool use_mp = false;
|
||||
static constexpr bool has_subview = false;
|
||||
|
||||
arma_aligned const Cube<elem_type> Q;
|
||||
const Cube<elem_type> Q;
|
||||
|
||||
inline explicit ProxyCube(const OpCube<T1, op_type>& A)
|
||||
: Q(A)
|
||||
@@ -183,7 +183,7 @@ struct ProxyCube< GlueCube<T1, T2, glue_type> >
|
||||
static constexpr bool use_mp = false;
|
||||
static constexpr bool has_subview = false;
|
||||
|
||||
arma_aligned const Cube<elem_type> Q;
|
||||
const Cube<elem_type> Q;
|
||||
|
||||
inline explicit ProxyCube(const GlueCube<T1, T2, glue_type>& A)
|
||||
: Q(A)
|
||||
@@ -228,7 +228,7 @@ struct ProxyCube< subview_cube<eT> >
|
||||
static constexpr bool use_mp = false;
|
||||
static constexpr bool has_subview = true;
|
||||
|
||||
arma_aligned const subview_cube<eT>& Q;
|
||||
const subview_cube<eT>& Q;
|
||||
|
||||
inline explicit ProxyCube(const subview_cube<eT>& A)
|
||||
: Q(A)
|
||||
@@ -273,7 +273,7 @@ struct ProxyCube< subview_cube_slices<eT,T1> >
|
||||
static constexpr bool use_mp = false;
|
||||
static constexpr bool has_subview = false;
|
||||
|
||||
arma_aligned const Cube<eT> Q;
|
||||
const Cube<eT> Q;
|
||||
|
||||
inline explicit ProxyCube(const subview_cube_slices<eT,T1>& A)
|
||||
: Q(A)
|
||||
@@ -318,7 +318,7 @@ struct ProxyCube< eOpCube<T1, eop_type > >
|
||||
static constexpr bool use_mp = eOpCube<T1, eop_type>::use_mp;
|
||||
static constexpr bool has_subview = eOpCube<T1, eop_type>::has_subview;
|
||||
|
||||
arma_aligned const eOpCube<T1, eop_type>& Q;
|
||||
const eOpCube<T1, eop_type>& Q;
|
||||
|
||||
inline explicit ProxyCube(const eOpCube<T1, eop_type>& A)
|
||||
: Q(A)
|
||||
@@ -363,7 +363,7 @@ struct ProxyCube< eGlueCube<T1, T2, eglue_type > >
|
||||
static constexpr bool use_mp = eGlueCube<T1, T2, eglue_type>::use_mp;
|
||||
static constexpr bool has_subview = eGlueCube<T1, T2, eglue_type>::has_subview;
|
||||
|
||||
arma_aligned const eGlueCube<T1, T2, eglue_type>& Q;
|
||||
const eGlueCube<T1, T2, eglue_type>& Q;
|
||||
|
||||
inline explicit ProxyCube(const eGlueCube<T1, T2, eglue_type>& A)
|
||||
: Q(A)
|
||||
@@ -408,7 +408,7 @@ struct ProxyCube< mtOpCube<out_eT, T1, op_type> >
|
||||
static constexpr bool use_mp = false;
|
||||
static constexpr bool has_subview = false;
|
||||
|
||||
arma_aligned const Cube<out_eT> Q;
|
||||
const Cube<out_eT> Q;
|
||||
|
||||
inline explicit ProxyCube(const mtOpCube<out_eT, T1, op_type>& A)
|
||||
: Q(A)
|
||||
@@ -453,7 +453,7 @@ struct ProxyCube< mtGlueCube<out_eT, T1, T2, glue_type > >
|
||||
static constexpr bool use_mp = false;
|
||||
static constexpr bool has_subview = false;
|
||||
|
||||
arma_aligned const Cube<out_eT> Q;
|
||||
const Cube<out_eT> Q;
|
||||
|
||||
inline explicit ProxyCube(const mtGlueCube<out_eT, T1, T2, glue_type>& A)
|
||||
: Q(A)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -91,7 +91,7 @@ class Row : public Mat<eT>
|
||||
inline Row(const subview_cube<eT>& X);
|
||||
inline Row& operator=(const subview_cube<eT>& X);
|
||||
|
||||
arma_frown("use braced initialiser list instead") inline mat_injector<Row> operator<<(const eT val);
|
||||
[[deprecated("use braced initialiser list instead")]] inline mat_injector<Row> operator<<(const eT val);
|
||||
|
||||
arma_warn_unused arma_inline const Op<Row<eT>,op_htrans> t() const;
|
||||
arma_warn_unused arma_inline const Op<Row<eT>,op_htrans> ht() const;
|
||||
@@ -141,7 +141,7 @@ class Row : public Mat<eT>
|
||||
|
||||
template<typename T1> inline void shed_cols(const Base<uword, T1>& indices);
|
||||
|
||||
arma_deprecated inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero);
|
||||
[[deprecated]] inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero);
|
||||
inline void insert_cols(const uword col_num, const uword N);
|
||||
|
||||
template<typename T1> inline void insert_cols(const uword col_num, const Base<eT,T1>& X);
|
||||
@@ -187,6 +187,8 @@ class Row<eT>::fixed : public Row<eT>
|
||||
{
|
||||
private:
|
||||
|
||||
using Mat<eT>::mem_local;
|
||||
|
||||
static constexpr bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);
|
||||
|
||||
arma_align_mem eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -1345,11 +1345,11 @@ Row<eT>::fixed<fixed_n_elem>::fixed(const fill::fill_class<fill_type>&)
|
||||
{
|
||||
arma_debug_sigprint_this(this);
|
||||
|
||||
if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
|
||||
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
|
||||
if(is_same_type<fill_type, fill::fill_eye >::yes) { (*this).eye(); }
|
||||
if(is_same_type<fill_type, fill::fill_randu>::yes) { (*this).randu(); }
|
||||
if(is_same_type<fill_type, fill::fill_randn>::yes) { (*this).randn(); }
|
||||
if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
|
||||
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
|
||||
if(is_same_type<fill_type, fill::fill_eye >::yes) { Mat<eT>::eye(); }
|
||||
if(is_same_type<fill_type, fill::fill_randu>::yes) { Mat<eT>::randu(); }
|
||||
if(is_same_type<fill_type, fill::fill_randn>::yes) { Mat<eT>::randn(); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -21,10 +21,8 @@
|
||||
|
||||
|
||||
|
||||
class SizeCube
|
||||
struct SizeCube
|
||||
{
|
||||
public:
|
||||
|
||||
const uword n_rows;
|
||||
const uword n_cols;
|
||||
const uword n_slices;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -21,10 +21,8 @@
|
||||
|
||||
|
||||
|
||||
class SizeMat
|
||||
struct SizeMat
|
||||
{
|
||||
public:
|
||||
|
||||
const uword n_rows;
|
||||
const uword n_cols;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -76,11 +76,11 @@ struct SpBase
|
||||
arma_warn_unused inline elem_type min() const;
|
||||
arma_warn_unused inline elem_type max() const;
|
||||
|
||||
inline elem_type min(uword& index_of_min_val) const;
|
||||
inline elem_type max(uword& index_of_max_val) const;
|
||||
[[deprecated("use .index_min() instead")]] inline elem_type min(uword& index_of_min_val) const;
|
||||
[[deprecated("use .index_max() instead")]] inline elem_type max(uword& index_of_max_val) const;
|
||||
|
||||
inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
|
||||
inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;
|
||||
[[deprecated("use .index_min() with ind2sub() instead")]] inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
|
||||
[[deprecated("use .index_max() with ind2sub() instead")]] inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;
|
||||
|
||||
arma_warn_unused inline uword index_min() const;
|
||||
arma_warn_unused inline uword index_max() const;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -748,7 +748,7 @@ SpBase<elem_type,derived>::is_finite() const
|
||||
|
||||
while(it != it_end)
|
||||
{
|
||||
if(arma_isfinite(*it) == false) { return false; }
|
||||
if(arma_isnonfinite(*it)) { return false; }
|
||||
++it;
|
||||
}
|
||||
}
|
||||
@@ -850,7 +850,7 @@ SpBase<elem_type,derived>::has_nonfinite() const
|
||||
|
||||
while(it != it_end)
|
||||
{
|
||||
if(arma_isfinite(*it) == false) { return true; }
|
||||
if(arma_isnonfinite(*it)) { return true; }
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -22,10 +22,8 @@
|
||||
|
||||
|
||||
template<typename T1, typename T2, typename spglue_type>
|
||||
class SpGlue : public SpBase< typename T1::elem_type, SpGlue<T1, T2, spglue_type> >
|
||||
struct SpGlue : public SpBase< typename T1::elem_type, SpGlue<T1, T2, spglue_type> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename T1::elem_type elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -399,11 +399,11 @@ class SpMat : public SpBase< eT, SpMat<eT> >
|
||||
arma_cold inline bool load(const csv_name& spec, const file_type type = csv_ascii);
|
||||
arma_cold inline bool load( std::istream& is, const file_type type = arma_binary);
|
||||
|
||||
arma_frown("use save() instead") inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
|
||||
arma_frown("use save() instead") inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
|
||||
[[deprecated("use save() instead")]] inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
|
||||
[[deprecated("use save() instead")]] inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
|
||||
|
||||
arma_frown("use load() instead") inline bool quiet_load(const std::string name, const file_type type = arma_binary);
|
||||
arma_frown("use load() instead") inline bool quiet_load( std::istream& is, const file_type type = arma_binary);
|
||||
[[deprecated("use load() instead")]] inline bool quiet_load(const std::string name, const file_type type = arma_binary);
|
||||
[[deprecated("use load() instead")]] inline bool quiet_load( std::istream& is, const file_type type = arma_binary);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -612,33 +612,26 @@ SpMat<eT>::operator*=(const eT val)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
if(val != eT(0))
|
||||
sync_csc();
|
||||
invalidate_cache();
|
||||
|
||||
const uword n_nz = n_nonzero;
|
||||
|
||||
eT* vals = access::rwp(values);
|
||||
|
||||
bool has_zero = false;
|
||||
|
||||
for(uword i=0; i<n_nz; ++i)
|
||||
{
|
||||
sync_csc();
|
||||
invalidate_cache();
|
||||
eT& vals_i = vals[i];
|
||||
|
||||
const uword n_nz = n_nonzero;
|
||||
vals_i *= val;
|
||||
|
||||
eT* vals = access::rwp(values);
|
||||
|
||||
bool has_zero = false;
|
||||
|
||||
for(uword i=0; i<n_nz; ++i)
|
||||
{
|
||||
eT& vals_i = vals[i];
|
||||
|
||||
vals_i *= val;
|
||||
|
||||
if(vals_i == eT(0)) { has_zero = true; }
|
||||
}
|
||||
|
||||
if(has_zero) { remove_zeros(); }
|
||||
}
|
||||
else
|
||||
{
|
||||
(*this).zeros();
|
||||
if(vals_i == eT(0)) { has_zero = true; }
|
||||
}
|
||||
|
||||
if(has_zero) { remove_zeros(); }
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -3126,7 +3119,7 @@ SpMat<eT>::shed_rows(const uword in_row1, const uword in_row2)
|
||||
arma_conform_check_bounds
|
||||
(
|
||||
(in_row1 > in_row2) || (in_row2 >= n_rows),
|
||||
"SpMat::shed_rows(): indices out of bounds or incorectly used"
|
||||
"SpMat::shed_rows(): indices out of bounds or incorrectly used"
|
||||
);
|
||||
|
||||
sync_csc();
|
||||
@@ -3288,7 +3281,7 @@ SpMat<eT>::shed_cols(const uword in_col1, const uword in_col2)
|
||||
|
||||
|
||||
/**
|
||||
* Element access; acces the i'th element (works identically to the Mat accessors).
|
||||
* Element access; access the i'th element (works identically to the Mat accessors).
|
||||
* If there is nothing at element i, 0 is returned.
|
||||
*/
|
||||
|
||||
@@ -3484,7 +3477,7 @@ SpMat<eT>::is_colvec() const
|
||||
|
||||
|
||||
|
||||
//! returns true if the object has the same number of non-zero rows and columnns
|
||||
//! returns true if the object has the same number of non-zero rows and columns
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
bool
|
||||
@@ -5131,7 +5124,12 @@ SpMat<eT>::init(const SpMat<eT>& x)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
if(this == &x) { return; }
|
||||
if(this == &x)
|
||||
{
|
||||
arma_debug_print("SpMat::init(): copy omitted");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool init_done = false;
|
||||
|
||||
@@ -5202,7 +5200,7 @@ SpMat<eT>::init(const MapMat<eT>& x)
|
||||
const uword x_index = x_entry.first;
|
||||
const eT x_val = x_entry.second;
|
||||
|
||||
// have we gone past the curent column?
|
||||
// have we gone past the current column?
|
||||
if(x_index >= x_col_index_endp1)
|
||||
{
|
||||
x_col = x_index / x_n_rows;
|
||||
@@ -5481,7 +5479,7 @@ SpMat<eT>::init_batch_add(const Mat<uword>& locs, const Mat<eT>& vals, const boo
|
||||
|
||||
uvec sorted_indices = sort_index(abslocs); // Ascending sort.
|
||||
|
||||
// work out the number of unique elments
|
||||
// work out the number of unique elements
|
||||
uword n_unique = 1; // first element is unique
|
||||
|
||||
for(uword i=1; i < sorted_indices.n_elem; ++i)
|
||||
@@ -5536,7 +5534,7 @@ SpMat<eT>::init_batch_add(const Mat<uword>& locs, const Mat<eT>& vals, const boo
|
||||
|
||||
if( (sort_locations == false) || (actually_sorted == true) )
|
||||
{
|
||||
// work out the number of unique elments
|
||||
// work out the number of unique elements
|
||||
uword n_unique = 1; // first element is unique
|
||||
|
||||
for(uword i=1; i < locs.n_cols; ++i)
|
||||
@@ -5918,7 +5916,7 @@ SpMat<eT>::init_xform_mt(const SpBase<eT2,T1>& A, const Functor& func)
|
||||
{
|
||||
eT& t_values_i = t_values[i];
|
||||
|
||||
t_values_i = func(x_values[i]); // NOTE: func() must produce a value of type eT (ie. act as a convertor between eT2 and eT)
|
||||
t_values_i = func(x_values[i]); // NOTE: func() must produce a value of type eT (ie. act as a converter between eT2 and eT)
|
||||
|
||||
if(t_values_i == eT(0)) { has_zero = true; }
|
||||
}
|
||||
@@ -5936,7 +5934,7 @@ SpMat<eT>::init_xform_mt(const SpBase<eT2,T1>& A, const Functor& func)
|
||||
|
||||
while(it != it_end)
|
||||
{
|
||||
const eT val = func(*it); // NOTE: func() must produce a value of type eT (ie. act as a convertor between eT2 and eT)
|
||||
const eT val = func(*it); // NOTE: func() must produce a value of type eT (ie. act as a converter between eT2 and eT)
|
||||
|
||||
if(val == eT(0)) { has_zero = true; }
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -22,10 +22,8 @@
|
||||
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
class SpOp : public SpBase< typename T1::elem_type, SpOp<T1, op_type> >
|
||||
struct SpOp : public SpBase< typename T1::elem_type, SpOp<T1, op_type> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename T1::elem_type elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
@@ -40,10 +38,10 @@ class SpOp : public SpBase< typename T1::elem_type, SpOp<T1, op_type> >
|
||||
|
||||
arma_inline bool is_alias(const SpMat<elem_type>& X) const;
|
||||
|
||||
arma_aligned const T1& m; //!< the operand; must be derived from SpBase
|
||||
arma_aligned elem_type aux; //!< auxiliary data, using the element type as used by T1
|
||||
arma_aligned uword aux_uword_a; //!< auxiliary data, uword format
|
||||
arma_aligned uword aux_uword_b; //!< auxiliary data, uword format
|
||||
const T1& m; //!< the operand; must be derived from SpBase
|
||||
elem_type aux; //!< auxiliary data, using the element type as used by T1
|
||||
uword aux_uword_a; //!< auxiliary data, uword format
|
||||
uword aux_uword_b; //!< auxiliary data, uword format
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -23,7 +23,7 @@
|
||||
// TODO: clarify and check which variables and functions are valid when 'use_iterator' is either true or false
|
||||
|
||||
|
||||
// within each specialisation of the Proxy class:
|
||||
// within each specialisation of the SpProxy struct:
|
||||
//
|
||||
// elem_type = type of the elements obtained from object Q
|
||||
// pod_type = underlying type of elements if elem_type is std::complex
|
||||
@@ -71,42 +71,42 @@ struct SpProxy< SpMat<eT> >
|
||||
typedef eT elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
typedef SpMat<eT> stored_type;
|
||||
|
||||
|
||||
typedef typename SpMat<eT>::const_iterator const_iterator_type;
|
||||
typedef typename SpMat<eT>::const_row_iterator const_row_iterator_type;
|
||||
|
||||
|
||||
static constexpr bool use_iterator = false;
|
||||
static constexpr bool Q_is_generated = false;
|
||||
|
||||
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const SpMat<eT>& Q;
|
||||
|
||||
|
||||
const SpMat<eT>& Q;
|
||||
|
||||
inline explicit SpProxy(const SpMat<eT>& A)
|
||||
: Q(A)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
Q.sync();
|
||||
}
|
||||
|
||||
|
||||
arma_inline uword get_n_rows() const { return Q.n_rows; }
|
||||
arma_inline uword get_n_cols() const { return Q.n_cols; }
|
||||
arma_inline uword get_n_elem() const { return Q.n_elem; }
|
||||
arma_inline uword get_n_nonzero() const { return Q.n_nonzero; }
|
||||
|
||||
|
||||
arma_inline elem_type operator[](const uword i) const { return Q[i]; }
|
||||
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
|
||||
|
||||
|
||||
arma_inline const eT* get_values() const { return Q.values; }
|
||||
arma_inline const uword* get_row_indices() const { return Q.row_indices; }
|
||||
arma_inline const uword* get_col_ptrs() const { return Q.col_ptrs; }
|
||||
|
||||
|
||||
arma_inline const_iterator_type begin() const { return Q.begin(); }
|
||||
arma_inline const_iterator_type begin_col(const uword col_num) const { return Q.begin_col(col_num); }
|
||||
arma_inline const_row_iterator_type begin_row(const uword row_num = 0) const { return Q.begin_row(row_num); }
|
||||
|
||||
|
||||
arma_inline const_iterator_type end() const { return Q.end(); }
|
||||
arma_inline const_row_iterator_type end_row() const { return Q.end_row(); }
|
||||
arma_inline const_row_iterator_type end_row(const uword row_num) const { return Q.end_row(row_num); }
|
||||
@@ -134,7 +134,7 @@ struct SpProxy< SpCol<eT> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const SpCol<eT>& Q;
|
||||
const SpCol<eT>& Q;
|
||||
|
||||
inline explicit SpProxy(const SpCol<eT>& A)
|
||||
: Q(A)
|
||||
@@ -186,7 +186,7 @@ struct SpProxy< SpRow<eT> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const SpRow<eT>& Q;
|
||||
const SpRow<eT>& Q;
|
||||
|
||||
inline explicit SpProxy(const SpRow<eT>& A)
|
||||
: Q(A)
|
||||
@@ -227,42 +227,42 @@ struct SpProxy< SpSubview<eT> >
|
||||
typedef eT elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
typedef SpSubview<eT> stored_type;
|
||||
|
||||
|
||||
typedef typename SpSubview<eT>::const_iterator const_iterator_type;
|
||||
typedef typename SpSubview<eT>::const_row_iterator const_row_iterator_type;
|
||||
|
||||
|
||||
static constexpr bool use_iterator = true;
|
||||
static constexpr bool Q_is_generated = false;
|
||||
|
||||
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const SpSubview<eT>& Q;
|
||||
|
||||
|
||||
const SpSubview<eT>& Q;
|
||||
|
||||
inline explicit SpProxy(const SpSubview<eT>& A)
|
||||
: Q(A)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
Q.m.sync();
|
||||
}
|
||||
|
||||
|
||||
arma_inline uword get_n_rows() const { return Q.n_rows; }
|
||||
arma_inline uword get_n_cols() const { return Q.n_cols; }
|
||||
arma_inline uword get_n_elem() const { return Q.n_elem; }
|
||||
arma_inline uword get_n_nonzero() const { return Q.n_nonzero; }
|
||||
|
||||
|
||||
arma_inline elem_type operator[](const uword i) const { return Q[i]; }
|
||||
arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); }
|
||||
|
||||
|
||||
arma_inline const eT* get_values() const { return Q.m.values; }
|
||||
arma_inline const uword* get_row_indices() const { return Q.m.row_indices; }
|
||||
arma_inline const uword* get_col_ptrs() const { return Q.m.col_ptrs; }
|
||||
|
||||
|
||||
arma_inline const_iterator_type begin() const { return Q.begin(); }
|
||||
arma_inline const_iterator_type begin_col(const uword col_num) const { return Q.begin_col(col_num); }
|
||||
arma_inline const_row_iterator_type begin_row(const uword row_num = 0) const { return Q.begin_row(row_num); }
|
||||
|
||||
|
||||
arma_inline const_iterator_type end() const { return Q.end(); }
|
||||
arma_inline const_row_iterator_type end_row() const { return Q.end_row(); }
|
||||
arma_inline const_row_iterator_type end_row(const uword row_num) const { return Q.end_row(row_num); }
|
||||
@@ -290,7 +290,7 @@ struct SpProxy< SpSubview_col<eT> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const SpSubview_col<eT>& Q;
|
||||
const SpSubview_col<eT>& Q;
|
||||
|
||||
inline explicit SpProxy(const SpSubview_col<eT>& A)
|
||||
: Q(A)
|
||||
@@ -342,7 +342,7 @@ struct SpProxy< SpSubview_col_list<eT,T1> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const SpMat<eT> Q;
|
||||
const SpMat<eT> Q;
|
||||
|
||||
inline explicit SpProxy(const SpSubview_col_list<eT,T1>& A)
|
||||
: Q(A)
|
||||
@@ -385,7 +385,7 @@ struct SpProxy< SpSubview_row<eT> >
|
||||
|
||||
typedef typename SpSubview<eT>::const_iterator const_iterator_type;
|
||||
typedef typename SpSubview<eT>::const_row_iterator const_row_iterator_type;
|
||||
|
||||
|
||||
static constexpr bool use_iterator = true;
|
||||
static constexpr bool Q_is_generated = false;
|
||||
|
||||
@@ -393,7 +393,7 @@ struct SpProxy< SpSubview_row<eT> >
|
||||
static constexpr bool is_col = false;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const SpSubview_row<eT>& Q;
|
||||
const SpSubview_row<eT>& Q;
|
||||
|
||||
inline explicit SpProxy(const SpSubview_row<eT>& A)
|
||||
: Q(A)
|
||||
@@ -445,7 +445,7 @@ struct SpProxy< spdiagview<eT> >
|
||||
static constexpr bool is_col = true;
|
||||
static constexpr bool is_xvec = false;
|
||||
|
||||
arma_aligned const SpMat<eT> Q;
|
||||
const SpMat<eT> Q;
|
||||
|
||||
inline explicit SpProxy(const spdiagview<eT>& A)
|
||||
: Q(A)
|
||||
@@ -497,7 +497,7 @@ struct SpProxy< SpOp<T1, spop_type> >
|
||||
static constexpr bool is_col = SpOp<T1, spop_type>::is_col;
|
||||
static constexpr bool is_xvec = SpOp<T1, spop_type>::is_xvec;
|
||||
|
||||
arma_aligned const SpMat<eT> Q;
|
||||
const SpMat<eT> Q;
|
||||
|
||||
inline explicit SpProxy(const SpOp<T1, spop_type>& A)
|
||||
: Q(A)
|
||||
@@ -549,7 +549,7 @@ struct SpProxy< SpGlue<T1, T2, spglue_type> >
|
||||
static constexpr bool is_col = SpGlue<T1, T2, spglue_type>::is_col;
|
||||
static constexpr bool is_xvec = SpGlue<T1, T2, spglue_type>::is_xvec;
|
||||
|
||||
arma_aligned const SpMat<eT> Q;
|
||||
const SpMat<eT> Q;
|
||||
|
||||
inline explicit SpProxy(const SpGlue<T1, T2, spglue_type>& A)
|
||||
: Q(A)
|
||||
@@ -600,7 +600,7 @@ struct SpProxy< mtSpOp<out_eT, T1, spop_type> >
|
||||
static constexpr bool is_col = mtSpOp<out_eT, T1, spop_type>::is_col;
|
||||
static constexpr bool is_xvec = mtSpOp<out_eT, T1, spop_type>::is_xvec;
|
||||
|
||||
arma_aligned const SpMat<out_eT> Q;
|
||||
const SpMat<out_eT> Q;
|
||||
|
||||
inline explicit SpProxy(const mtSpOp<out_eT, T1, spop_type>& A)
|
||||
: Q(A)
|
||||
@@ -651,7 +651,7 @@ struct SpProxy< mtSpGlue<out_eT, T1, T2, spglue_type> >
|
||||
static constexpr bool is_col = mtSpGlue<out_eT, T1, T2, spglue_type>::is_col;
|
||||
static constexpr bool is_xvec = mtSpGlue<out_eT, T1, T2, spglue_type>::is_xvec;
|
||||
|
||||
arma_aligned const SpMat<out_eT> Q;
|
||||
const SpMat<out_eT> Q;
|
||||
|
||||
inline explicit SpProxy(const mtSpGlue<out_eT, T1, T2, spglue_type>& A)
|
||||
: Q(A)
|
||||
@@ -702,7 +702,7 @@ struct SpProxy< mtSpReduceOp<out_eT, T1, op_type> >
|
||||
static constexpr bool is_col = mtSpReduceOp<out_eT, T1, op_type>::is_col;
|
||||
static constexpr bool is_xvec = mtSpReduceOp<out_eT, T1, op_type>::is_xvec;
|
||||
|
||||
arma_aligned const SpMat<out_eT> Q;
|
||||
const SpMat<out_eT> Q;
|
||||
|
||||
inline explicit SpProxy(const mtSpReduceOp<out_eT, T1, op_type>& A)
|
||||
: Q(A)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -253,8 +253,6 @@ SpSubview_col_list<eT,T1>::operator*= (const eT val)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
if(val == eT(0)) { (*this).zeros(); return; }
|
||||
|
||||
SpMat<eT>& m_local = const_cast< SpMat<eT>& >(m);
|
||||
|
||||
const umat& ci = U_ci.M;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -816,7 +816,7 @@ SpSubview<eT>::const_row_iterator::operator++()
|
||||
else if((*pos_ptr) == next_min_row + aux_row && col < next_min_col && (*pos_ptr) < aux_row + iterator_base::M->n_rows)
|
||||
{
|
||||
// The first element in this column is in a subsequent row that we
|
||||
// already have another elemnt for, but the column index is less so
|
||||
// already have another element for, but the column index is less so
|
||||
// this element will come first.
|
||||
next_min_col = col;
|
||||
next_actual_pos = col_offset + (pos_ptr - start_ptr);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -157,8 +157,6 @@ SpSubview<eT>::operator*=(const eT val)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
if(val == eT(0)) { (*this).zeros(); return *this; }
|
||||
|
||||
if((n_elem == 0) || (n_nonzero == 0)) { return *this; }
|
||||
|
||||
m.sync_csc();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -22,10 +22,8 @@
|
||||
|
||||
|
||||
template<typename T1, typename T2, typename glue_type>
|
||||
class SpToDGlue : public Base< typename T1::elem_type, SpToDGlue<T1, T2, glue_type> >
|
||||
struct SpToDGlue : public Base< typename T1::elem_type, SpToDGlue<T1, T2, glue_type> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename T1::elem_type elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
@@ -36,6 +34,9 @@ class SpToDGlue : public Base< typename T1::elem_type, SpToDGlue<T1, T2, glue_ty
|
||||
inline explicit SpToDGlue(const T1& in_A, const T2& in_B);
|
||||
inline ~SpToDGlue();
|
||||
|
||||
template<typename eT2>
|
||||
constexpr bool is_alias(const Mat<eT2>&) const { return false; }
|
||||
|
||||
const T1& A; //!< first operand; must be derived from Base or SpBase
|
||||
const T2& B; //!< second operand; must be derived from Base or SpBase
|
||||
};
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -23,10 +23,8 @@
|
||||
// NOTE: SpToDOp is dedicated for unary operations on sparse matrices that result in dense matrices.
|
||||
|
||||
template<typename T1, typename op_type>
|
||||
class SpToDOp : public Base< typename T1::elem_type, SpToDOp<T1, op_type> >
|
||||
struct SpToDOp : public Base< typename T1::elem_type, SpToDOp<T1, op_type> >
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename T1::elem_type elem_type;
|
||||
typedef typename get_pod_type<elem_type>::result pod_type;
|
||||
|
||||
@@ -39,10 +37,13 @@ class SpToDOp : public Base< typename T1::elem_type, SpToDOp<T1, op_type> >
|
||||
inline SpToDOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b);
|
||||
inline ~SpToDOp();
|
||||
|
||||
arma_aligned const T1& m; //!< the operand; must be derived from SpBase
|
||||
arma_aligned elem_type aux; //!< auxiliary data, using the element type as used by T1
|
||||
arma_aligned uword aux_uword_a; //!< auxiliary data, uword format
|
||||
arma_aligned uword aux_uword_b; //!< auxiliary data, uword format
|
||||
template<typename eT2>
|
||||
constexpr bool is_alias(const Mat<eT2>&) const { return false; }
|
||||
|
||||
const T1& m; //!< the operand; must be derived from SpBase
|
||||
elem_type aux; //!< auxiliary data, using the element type as used by T1
|
||||
uword aux_uword_a; //!< auxiliary data, uword format
|
||||
uword aux_uword_b; //!< auxiliary data, uword format
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -73,8 +73,8 @@ class SpValProxy
|
||||
// Deletes the element if it is zero; NOTE: does not check if val_ptr == nullptr
|
||||
arma_inline void check_zero();
|
||||
|
||||
arma_aligned const uword row;
|
||||
arma_aligned const uword col;
|
||||
const uword row;
|
||||
const uword col;
|
||||
|
||||
arma_aligned eT* val_ptr;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -148,24 +148,17 @@ inline
|
||||
SpValProxy<T1>&
|
||||
SpValProxy<T1>::operator*=(const eT rhs)
|
||||
{
|
||||
if(rhs != eT(0))
|
||||
if(val_ptr)
|
||||
{
|
||||
if(val_ptr)
|
||||
{
|
||||
// The value already exists and merely needs to be updated.
|
||||
*val_ptr *= rhs;
|
||||
parent.invalidate_cache();
|
||||
check_zero();
|
||||
}
|
||||
*val_ptr *= rhs;
|
||||
parent.invalidate_cache();
|
||||
check_zero();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(val_ptr)
|
||||
{
|
||||
// Since we are multiplying by zero, the value can be deleted.
|
||||
parent.delete_element(row, col);
|
||||
val_ptr = nullptr;
|
||||
}
|
||||
const eT val = eT(0) * rhs; // in case rhs is inf or nan
|
||||
|
||||
if(val != eT(0)) { val_ptr = &parent.insert_element(row, col, val); }
|
||||
}
|
||||
|
||||
return *this;
|
||||
@@ -178,37 +171,17 @@ inline
|
||||
SpValProxy<T1>&
|
||||
SpValProxy<T1>::operator/=(const eT rhs)
|
||||
{
|
||||
if(rhs != eT(0)) // I hope this is true!
|
||||
if(val_ptr)
|
||||
{
|
||||
if(val_ptr)
|
||||
{
|
||||
*val_ptr /= rhs;
|
||||
parent.invalidate_cache();
|
||||
check_zero();
|
||||
}
|
||||
*val_ptr /= rhs;
|
||||
parent.invalidate_cache();
|
||||
check_zero();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(val_ptr)
|
||||
{
|
||||
*val_ptr /= rhs; // That is where it gets ugly.
|
||||
// Now check if it's 0.
|
||||
if(*val_ptr == eT(0))
|
||||
{
|
||||
parent.delete_element(row, col);
|
||||
val_ptr = nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
eT val = eT(0) / rhs; // This may vary depending on type and implementation.
|
||||
|
||||
if(val != eT(0))
|
||||
{
|
||||
// Ok, now we have to insert it.
|
||||
val_ptr = &parent.insert_element(row, col, val);
|
||||
}
|
||||
}
|
||||
const eT val = eT(0) / rhs; // in case rhs is zero or nan
|
||||
|
||||
if(val != eT(0)) { val_ptr = &parent.insert_element(row, col, val); }
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -20,24 +20,22 @@
|
||||
//! @{
|
||||
|
||||
|
||||
class access
|
||||
struct access
|
||||
{
|
||||
public:
|
||||
|
||||
//! internal function to allow modification of data declared as read-only (use with caution)
|
||||
template<typename T1> constexpr static T1& rw (const T1& x) { return const_cast<T1& >(x); }
|
||||
template<typename T1> constexpr static T1*& rwp(const T1* const& x) { return const_cast<T1*&>(x); }
|
||||
template<typename T1> static constexpr T1& rw (const T1& x) { return const_cast<T1& >(x); }
|
||||
template<typename T1> static constexpr T1*& rwp(const T1* const& x) { return const_cast<T1*&>(x); }
|
||||
|
||||
//! internal function to obtain the real part of either a plain number or a complex number
|
||||
template<typename eT> constexpr static const eT& tmp_real(const eT& X) { return X; }
|
||||
template<typename T> constexpr static const T tmp_real(const std::complex<T>& X) { return X.real(); }
|
||||
template<typename eT> static constexpr const eT& tmp_real(const eT& X) { return X; }
|
||||
template<typename T> static constexpr const T tmp_real(const std::complex<T>& X) { return X.real(); }
|
||||
|
||||
//! internal function to obtain the imag part of either a plain number or a complex number
|
||||
template<typename eT> constexpr static const eT tmp_imag(const eT ) { return eT(0); }
|
||||
template<typename T> constexpr static const T tmp_imag(const std::complex<T>& X) { return X.imag(); }
|
||||
template<typename eT> static constexpr const eT tmp_imag(const eT ) { return eT(0); }
|
||||
template<typename T> static constexpr const T tmp_imag(const std::complex<T>& X) { return X.imag(); }
|
||||
|
||||
//! internal function to work around braindead compilers
|
||||
template<typename eT> constexpr static const typename enable_if2<is_cx<eT>::no, const eT&>::result alt_conj(const eT& X) { return X; }
|
||||
template<typename eT> static constexpr const typename enable_if2<is_cx<eT>::no, const eT&>::result alt_conj(const eT& X) { return X; }
|
||||
template<typename eT> arma_inline static const typename enable_if2<is_cx<eT>::yes, const eT >::result alt_conj(const eT& X) { return std::conj(X); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -65,6 +65,48 @@ arma_isfinite(const std::complex<T>& x)
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
||||
|
||||
template<typename eT>
|
||||
inline
|
||||
bool
|
||||
arma_isnonfinite(eT)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
inline
|
||||
bool
|
||||
arma_isnonfinite(float x)
|
||||
{
|
||||
return (std::isfinite(x) == false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
inline
|
||||
bool
|
||||
arma_isnonfinite(double x)
|
||||
{
|
||||
return (std::isfinite(x) == false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename T>
|
||||
inline
|
||||
bool
|
||||
arma_isnonfinite(const std::complex<T>& x)
|
||||
{
|
||||
return ( (std::isfinite(x.real()) == false) || (std::isfinite(x.imag()) == false) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// wrappers for isinf
|
||||
@@ -156,6 +198,21 @@ arma_isnan(const std::complex<T>& x)
|
||||
|
||||
|
||||
|
||||
//
|
||||
// wrapper for pow; see also the associated FP16 specialisation
|
||||
|
||||
|
||||
|
||||
template<typename eT, typename exponent_eT>
|
||||
inline
|
||||
eT
|
||||
arma_pow(eT base, exponent_eT pow)
|
||||
{
|
||||
return std::pow(base, pow);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// implementation of arma_sign()
|
||||
|
||||
@@ -165,7 +222,9 @@ constexpr
|
||||
typename arma_unsigned_integral_only<eT>::result
|
||||
arma_sign(const eT x)
|
||||
{
|
||||
return (x > eT(0)) ? eT(+1) : eT(0);
|
||||
constexpr eT eT_zero = eT(0);
|
||||
|
||||
return (x > eT_zero) ? eT(+1) : eT_zero;
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +234,9 @@ constexpr
|
||||
typename arma_signed_integral_only<eT>::result
|
||||
arma_sign(const eT x)
|
||||
{
|
||||
return (x > eT(0)) ? eT(+1) : ( (x < eT(0)) ? eT(-1) : eT(0) );
|
||||
constexpr eT eT_zero = eT(0);
|
||||
|
||||
return (x > eT_zero) ? eT(+1) : ( (x < eT_zero) ? eT(-1) : eT_zero );
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +246,9 @@ constexpr
|
||||
typename arma_real_only<eT>::result
|
||||
arma_sign(const eT x)
|
||||
{
|
||||
return (x > eT(0)) ? eT(+1) : ( (x < eT(0)) ? eT(-1) : ((x == eT(0)) ? eT(0) : x) );
|
||||
constexpr eT eT_zero = eT(0);
|
||||
|
||||
return (x > eT_zero) ? eT(+1) : ( (x < eT_zero) ? eT(-1) : ((x == eT_zero) ? eT_zero : x) );
|
||||
}
|
||||
|
||||
|
||||
@@ -375,4 +438,95 @@ struct arma_arg< std::complex<double> >
|
||||
|
||||
|
||||
|
||||
//
|
||||
// extensions for half-precision fp16
|
||||
|
||||
#if defined(ARMA_HAVE_FP16)
|
||||
|
||||
template<>
|
||||
inline
|
||||
bool
|
||||
arma_isfinite(fp16 x)
|
||||
{
|
||||
return std::isfinite(x);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
inline
|
||||
bool
|
||||
arma_isnonfinite(fp16 x)
|
||||
{
|
||||
return (std::isfinite(x) == false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
inline
|
||||
bool
|
||||
arma_isinf(fp16 x)
|
||||
{
|
||||
return std::isinf(x);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
inline
|
||||
bool
|
||||
arma_isnan(fp16 x)
|
||||
{
|
||||
return std::isnan(x);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename exponent_eT>
|
||||
inline
|
||||
fp16
|
||||
arma_pow(fp16 base, exponent_eT pow)
|
||||
{
|
||||
return std::pow(base, fp16(pow));
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
inline
|
||||
fp16
|
||||
arma_hypot(const fp16 x, const fp16 y)
|
||||
{
|
||||
return std::hypot(x, y);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
inline
|
||||
fp16
|
||||
arma_sinc(const fp16 x)
|
||||
{
|
||||
return arma_sinc_generic(x);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
struct arma_arg<fp16>
|
||||
{
|
||||
static
|
||||
inline
|
||||
fp16
|
||||
eval(const fp16 x)
|
||||
{
|
||||
return std::arg(x);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -65,6 +65,13 @@ struct arma_config
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ARMA_OPTIMISE_POWEXPR)
|
||||
static constexpr bool optimise_powexpr = true;
|
||||
#else
|
||||
static constexpr bool optimise_powexpr = false;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ARMA_CHECK_CONFORMANCE)
|
||||
static constexpr bool check_conform = true;
|
||||
#else
|
||||
@@ -153,13 +160,6 @@ struct arma_config
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ARMA_HAVE_CXX14)
|
||||
static constexpr bool cxx14 = true;
|
||||
#else
|
||||
static constexpr bool cxx14 = false;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ARMA_HAVE_CXX17)
|
||||
static constexpr bool cxx17 = true;
|
||||
#else
|
||||
@@ -237,6 +237,20 @@ struct arma_config
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ARMA_HAVE_FP16)
|
||||
static constexpr bool have_fp16 = true;
|
||||
#else
|
||||
static constexpr bool have_fp16 = false;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ARMA_GOOD_FP16)
|
||||
static constexpr bool good_fp16 = true;
|
||||
#else
|
||||
static constexpr bool good_fp16 = false;
|
||||
#endif
|
||||
|
||||
|
||||
static constexpr uword warn_level = (sword(ARMA_WARN_LEVEL) > 0) ? uword(ARMA_WARN_LEVEL) : 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -29,11 +29,10 @@ template<typename eT> class Mat;
|
||||
template<typename eT> class Col;
|
||||
template<typename eT> class Row;
|
||||
template<typename eT> class Cube;
|
||||
template<typename eT> class xvec_htrans;
|
||||
template<typename oT> class field;
|
||||
|
||||
template<typename eT, bool do_conj> class xtrans_mat;
|
||||
|
||||
template<typename eT> struct xvec_htrans;
|
||||
template<typename eT, bool do_conj> struct xtrans_mat;
|
||||
|
||||
template<typename eT> class subview;
|
||||
template<typename eT> class subview_col;
|
||||
@@ -73,89 +72,93 @@ template<typename eT, typename T1> class subview_cube_slices;
|
||||
template<typename eT, typename T1> class SpSubview_col_list;
|
||||
|
||||
|
||||
class SizeMat;
|
||||
class SizeCube;
|
||||
struct SizeMat;
|
||||
struct SizeCube;
|
||||
|
||||
class arma_empty_class {};
|
||||
struct arma_empty_class {};
|
||||
|
||||
class diskio;
|
||||
struct diskio;
|
||||
|
||||
class op_strans;
|
||||
class op_htrans;
|
||||
class op_htrans2;
|
||||
class op_inv_gen_default;
|
||||
class op_inv_spd_default;
|
||||
class op_inv_gen_full;
|
||||
class op_inv_spd_full;
|
||||
class op_diagmat;
|
||||
class op_trimat;
|
||||
class op_vectorise_row;
|
||||
class op_vectorise_col;
|
||||
struct op_strans;
|
||||
struct op_htrans;
|
||||
struct op_htrans2;
|
||||
struct op_inv_gen_default;
|
||||
struct op_inv_spd_default;
|
||||
struct op_inv_gen_full;
|
||||
struct op_inv_spd_full;
|
||||
struct op_diagmat;
|
||||
struct op_trimat;
|
||||
struct op_vectorise_row;
|
||||
struct op_vectorise_col;
|
||||
struct op_symmatu;
|
||||
struct op_symmatl;
|
||||
struct op_omit;
|
||||
|
||||
class op_row_as_mat;
|
||||
class op_col_as_mat;
|
||||
struct op_row_as_mat;
|
||||
struct op_col_as_mat;
|
||||
|
||||
class glue_times;
|
||||
class glue_times_diag;
|
||||
struct glue_times;
|
||||
struct glue_times_diag;
|
||||
|
||||
class glue_rel_lt;
|
||||
class glue_rel_gt;
|
||||
class glue_rel_lteq;
|
||||
class glue_rel_gteq;
|
||||
class glue_rel_eq;
|
||||
class glue_rel_noteq;
|
||||
class glue_rel_and;
|
||||
class glue_rel_or;
|
||||
struct glue_rel_lt;
|
||||
struct glue_rel_gt;
|
||||
struct glue_rel_lteq;
|
||||
struct glue_rel_gteq;
|
||||
struct glue_rel_eq;
|
||||
struct glue_rel_noteq;
|
||||
struct glue_rel_and;
|
||||
struct glue_rel_or;
|
||||
|
||||
class op_rel_lt_pre;
|
||||
class op_rel_lt_post;
|
||||
class op_rel_gt_pre;
|
||||
class op_rel_gt_post;
|
||||
class op_rel_lteq_pre;
|
||||
class op_rel_lteq_post;
|
||||
class op_rel_gteq_pre;
|
||||
class op_rel_gteq_post;
|
||||
class op_rel_eq;
|
||||
class op_rel_noteq;
|
||||
struct op_rel_lt_pre;
|
||||
struct op_rel_lt_post;
|
||||
struct op_rel_gt_pre;
|
||||
struct op_rel_gt_post;
|
||||
struct op_rel_lteq_pre;
|
||||
struct op_rel_lteq_post;
|
||||
struct op_rel_gteq_pre;
|
||||
struct op_rel_gteq_post;
|
||||
struct op_rel_eq;
|
||||
struct op_rel_noteq;
|
||||
|
||||
class gen_eye;
|
||||
class gen_ones;
|
||||
class gen_zeros;
|
||||
struct gen_eye;
|
||||
struct gen_ones;
|
||||
struct gen_zeros;
|
||||
|
||||
|
||||
|
||||
class spop_strans;
|
||||
class spop_htrans;
|
||||
class spop_vectorise_row;
|
||||
class spop_vectorise_col;
|
||||
struct spop_strans;
|
||||
struct spop_htrans;
|
||||
struct spop_vectorise_row;
|
||||
struct spop_vectorise_col;
|
||||
struct spop_square;
|
||||
|
||||
class spop_rel_lt_pre;
|
||||
class spop_rel_lt_post;
|
||||
class spop_rel_gt_pre;
|
||||
class spop_rel_gt_post;
|
||||
class spop_rel_lteq_pre;
|
||||
class spop_rel_lteq_post;
|
||||
class spop_rel_gteq_pre;
|
||||
class spop_rel_gteq_post;
|
||||
class spop_rel_eq;
|
||||
class spop_rel_noteq;
|
||||
struct spop_rel_lt_pre;
|
||||
struct spop_rel_lt_post;
|
||||
struct spop_rel_gt_pre;
|
||||
struct spop_rel_gt_post;
|
||||
struct spop_rel_lteq_pre;
|
||||
struct spop_rel_lteq_post;
|
||||
struct spop_rel_gteq_pre;
|
||||
struct spop_rel_gteq_post;
|
||||
struct spop_rel_eq;
|
||||
struct spop_rel_noteq;
|
||||
|
||||
class spglue_plus;
|
||||
class spglue_minus;
|
||||
class spglue_schur;
|
||||
class spglue_times;
|
||||
class spglue_max;
|
||||
class spglue_min;
|
||||
class spglue_rel_lt;
|
||||
class spglue_rel_gt;
|
||||
struct spglue_plus;
|
||||
struct spglue_minus;
|
||||
struct spglue_schur;
|
||||
struct spglue_times;
|
||||
struct spglue_max;
|
||||
struct spglue_min;
|
||||
struct spglue_rel_lt;
|
||||
struct spglue_rel_gt;
|
||||
|
||||
class op_sp_as_dense;
|
||||
struct op_sp_as_dense;
|
||||
|
||||
class op_internal_equ;
|
||||
class op_internal_plus;
|
||||
class op_internal_minus;
|
||||
class op_internal_schur;
|
||||
class op_internal_div;
|
||||
struct op_internal_equ;
|
||||
struct op_internal_plus;
|
||||
struct op_internal_minus;
|
||||
struct op_internal_schur;
|
||||
struct op_internal_div;
|
||||
|
||||
|
||||
|
||||
@@ -244,40 +247,40 @@ struct traits_glue_or
|
||||
|
||||
|
||||
|
||||
template<const bool, const bool, const bool, const bool> class gemm;
|
||||
template<const bool, const bool, const bool> class gemv;
|
||||
template<const bool, const bool, const bool, const bool> struct gemm;
|
||||
template<const bool, const bool, const bool> struct gemv;
|
||||
|
||||
|
||||
template< typename eT, typename gen_type> class Gen;
|
||||
template< typename eT, typename gen_type> struct Gen;
|
||||
|
||||
template< typename T1, typename op_type> class Op;
|
||||
template< typename T1, typename eop_type> class eOp;
|
||||
template< typename T1, typename op_type> class SpToDOp;
|
||||
template< typename T1, typename op_type> class CubeToMatOp;
|
||||
template<typename out_eT, typename T1, typename op_type> class mtOp;
|
||||
template< typename T1, typename op_type> struct Op;
|
||||
template< typename T1, typename eop_type> struct eOp;
|
||||
template< typename T1, typename op_type> struct SpToDOp;
|
||||
template< typename T1, typename op_type> struct CubeToMatOp;
|
||||
template<typename out_eT, typename T1, typename op_type> struct mtOp;
|
||||
|
||||
template< typename T1, typename T2, typename glue_type> class Glue;
|
||||
template< typename T1, typename T2, typename eglue_type> class eGlue;
|
||||
template< typename T1, typename T2, typename glue_type> class SpToDGlue;
|
||||
template<typename out_eT, typename T1, typename T2, typename glue_type> class mtGlue;
|
||||
template< typename T1, typename T2, typename glue_type> struct Glue;
|
||||
template< typename T1, typename T2, typename eglue_type> struct eGlue;
|
||||
template< typename T1, typename T2, typename glue_type> struct SpToDGlue;
|
||||
template<typename out_eT, typename T1, typename T2, typename glue_type> struct mtGlue;
|
||||
|
||||
|
||||
|
||||
template< typename eT, typename gen_type> class GenCube;
|
||||
template< typename eT, typename gen_type> struct GenCube;
|
||||
|
||||
template< typename T1, typename op_type> class OpCube;
|
||||
template< typename T1, typename eop_type> class eOpCube;
|
||||
template<typename out_eT, typename T1, typename op_type> class mtOpCube;
|
||||
template< typename T1, typename op_type> struct OpCube;
|
||||
template< typename T1, typename eop_type> struct eOpCube;
|
||||
template<typename out_eT, typename T1, typename op_type> struct mtOpCube;
|
||||
|
||||
template< typename T1, typename T2, typename glue_type> class GlueCube;
|
||||
template< typename T1, typename T2, typename eglue_type> class eGlueCube;
|
||||
template<typename out_eT, typename T1, typename T2, typename glue_type> class mtGlueCube;
|
||||
template< typename T1, typename T2, typename glue_type> struct GlueCube;
|
||||
template< typename T1, typename T2, typename eglue_type> struct eGlueCube;
|
||||
template<typename out_eT, typename T1, typename T2, typename glue_type> struct mtGlueCube;
|
||||
|
||||
|
||||
template<typename T1> struct Proxy;
|
||||
template<typename T1> struct ProxyCube;
|
||||
|
||||
template<typename T1> class diagmat_proxy;
|
||||
template<typename T1> struct diagmat_proxy;
|
||||
|
||||
template<typename T1> struct unwrap;
|
||||
template<typename T1> struct quasi_unwrap;
|
||||
@@ -308,7 +311,7 @@ struct state_type
|
||||
int out;
|
||||
|
||||
#if defined(ARMA_USE_OPENMP)
|
||||
#pragma omp atomic read
|
||||
#pragma omp atomic read seq_cst
|
||||
out = state;
|
||||
#elif defined(ARMA_USE_STD_MUTEX)
|
||||
out = state.load();
|
||||
@@ -324,7 +327,7 @@ struct state_type
|
||||
operator= (const int in_state)
|
||||
{
|
||||
#if defined(ARMA_USE_OPENMP)
|
||||
#pragma omp atomic write
|
||||
#pragma omp atomic write seq_cst
|
||||
state = in_state;
|
||||
#elif defined(ARMA_USE_STD_MUTEX)
|
||||
state.store(in_state);
|
||||
@@ -335,12 +338,12 @@ struct state_type
|
||||
};
|
||||
|
||||
|
||||
template< typename T1, typename spop_type> class SpOp;
|
||||
template<typename out_eT, typename T1, typename spop_type> class mtSpOp;
|
||||
template<typename out_eT, typename T1, typename op_type> class mtSpReduceOp;
|
||||
template< typename T1, typename spop_type> struct SpOp;
|
||||
template<typename out_eT, typename T1, typename spop_type> struct mtSpOp;
|
||||
template<typename out_eT, typename T1, typename op_type> struct mtSpReduceOp;
|
||||
|
||||
template< typename T1, typename T2, typename spglue_type> class SpGlue;
|
||||
template<typename out_eT, typename T1, typename T2, typename spglue_type> class mtSpGlue;
|
||||
template< typename T1, typename T2, typename spglue_type> struct SpGlue;
|
||||
template<typename out_eT, typename T1, typename T2, typename spglue_type> struct mtSpGlue;
|
||||
|
||||
|
||||
template<typename T1> struct SpProxy;
|
||||
@@ -358,6 +361,7 @@ struct arma_zeros_indicator : public arma_initmode_indicator<true > {};
|
||||
struct arma_nozeros_indicator : public arma_initmode_indicator<false> {};
|
||||
|
||||
|
||||
|
||||
//! \addtogroup injector
|
||||
//! @{
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -21,18 +21,13 @@
|
||||
|
||||
|
||||
|
||||
class arma_ostream_state
|
||||
struct arma_ostream_state
|
||||
{
|
||||
private:
|
||||
|
||||
const ios::fmtflags orig_flags;
|
||||
const std::streamsize orig_precision;
|
||||
const std::streamsize orig_width;
|
||||
const char orig_fill;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
inline arma_ostream_state(const std::ostream& o);
|
||||
|
||||
inline void restore(std::ostream& o) const;
|
||||
@@ -40,10 +35,8 @@ class arma_ostream_state
|
||||
|
||||
|
||||
|
||||
class arma_ostream
|
||||
struct arma_ostream
|
||||
{
|
||||
public:
|
||||
|
||||
template<typename eT> inline static std::streamsize modify_stream(std::ostream& o, const eT* data, const uword n_elem);
|
||||
template<typename T> inline static std::streamsize modify_stream(std::ostream& o, const std::complex<T>* data, const uword n_elem);
|
||||
template<typename eT> inline static std::streamsize modify_stream(std::ostream& o, typename SpMat<eT>::const_iterator begin, const uword n_elem, const typename arma_not_cx<eT>::result* junk = nullptr);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -70,7 +70,7 @@ arma_ostream::modify_stream(std::ostream& o, const eT* data, const uword n_elem)
|
||||
{
|
||||
const eT val = data[i];
|
||||
|
||||
if(arma_isfinite(val) == false) { continue; }
|
||||
if(arma_isnonfinite(val)) { continue; }
|
||||
|
||||
if(
|
||||
( cond_rel< (sizeof(eT) > 4) && (is_same_type<uword,eT>::yes || is_same_type<sword,eT>::yes) >::geq(val, eT(+10000000000)) )
|
||||
@@ -86,22 +86,22 @@ arma_ostream::modify_stream(std::ostream& o, const eT* data, const uword n_elem)
|
||||
( val >= eT(+100) )
|
||||
||
|
||||
//( (is_signed<eT>::value) && (val <= eT(-100)) ) ||
|
||||
//( (is_non_integral<eT>::value) && (val > eT(0)) && (val <= eT(+1e-4)) ) ||
|
||||
//( (is_non_integral<eT>::value) && (is_signed<eT>::value) && (val < eT(0)) && (val >= eT(-1e-4)) )
|
||||
//( (is_real<eT>::value) && (val > eT(0)) && (val <= eT(+1e-4)) ) ||
|
||||
//( (is_real<eT>::value) && (is_signed<eT>::value) && (val < eT(0)) && (val >= eT(-1e-4)) )
|
||||
(
|
||||
cond_rel< is_signed<eT>::value >::leq(val, eT(-100))
|
||||
)
|
||||
||
|
||||
(
|
||||
cond_rel< is_non_integral<eT>::value >::gt(val, eT(0))
|
||||
cond_rel< is_real<eT>::value >::gt(val, eT(0))
|
||||
&&
|
||||
cond_rel< is_non_integral<eT>::value >::leq(val, eT(+1e-4))
|
||||
cond_rel< is_real<eT>::value >::leq(val, eT(+1e-4))
|
||||
)
|
||||
||
|
||||
(
|
||||
cond_rel< is_non_integral<eT>::value && is_signed<eT>::value >::lt(val, eT(0))
|
||||
cond_rel< is_real<eT>::value && is_signed<eT>::value >::lt(val, eT(0))
|
||||
&&
|
||||
cond_rel< is_non_integral<eT>::value && is_signed<eT>::value >::geq(val, eT(-1e-4))
|
||||
cond_rel< is_real<eT>::value && is_signed<eT>::value >::geq(val, eT(-1e-4))
|
||||
)
|
||||
)
|
||||
{
|
||||
@@ -208,13 +208,13 @@ arma_ostream::modify_stream(std::ostream& o, typename SpMat<eT>::const_iterator
|
||||
{
|
||||
const eT val = (*it);
|
||||
|
||||
if(arma_isfinite(val) == false) { continue; }
|
||||
if(arma_isnonfinite(val)) { continue; }
|
||||
|
||||
if(
|
||||
val >= eT(+100) ||
|
||||
( (is_signed<eT>::value) && (val <= eT(-100)) ) ||
|
||||
( (is_non_integral<eT>::value) && (val > eT(0)) && (val <= eT(+1e-4)) ) ||
|
||||
( (is_non_integral<eT>::value) && (is_signed<eT>::value) && (val < eT(0)) && (val >= eT(-1e-4)) )
|
||||
( ( is_real<eT>::value) && (val > eT(0)) && (val <= eT(+1e-4)) ) ||
|
||||
( ( is_real<eT>::value) && (is_signed<eT>::value) && (val < eT(0)) && (val >= eT(-1e-4)) )
|
||||
)
|
||||
{
|
||||
use_layout_C = true;
|
||||
@@ -368,7 +368,9 @@ inline
|
||||
void
|
||||
arma_ostream::print_elem(std::ostream& o, const std::complex<T>& x, const bool modify)
|
||||
{
|
||||
if( (x.real() == T(0)) && (x.imag() == T(0)) && (modify) )
|
||||
constexpr T T_zero = T(0);
|
||||
|
||||
if( (x.real() == T_zero) && (x.imag() == T_zero) && (modify) )
|
||||
{
|
||||
o << "(0,0)";
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -24,7 +24,7 @@
|
||||
template<typename eT>
|
||||
struct arma_lt_comparator
|
||||
{
|
||||
arma_inline bool operator() (const eT a, const eT b) const { return (a < b); }
|
||||
constexpr bool operator() (const eT a, const eT b) const { return (a < b); }
|
||||
};
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ struct arma_lt_comparator
|
||||
template<typename eT>
|
||||
struct arma_gt_comparator
|
||||
{
|
||||
arma_inline bool operator() (const eT a, const eT b) const { return (a > b); }
|
||||
constexpr bool operator() (const eT a, const eT b) const { return (a > b); }
|
||||
};
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ struct arma_gt_comparator
|
||||
template<typename eT>
|
||||
struct arma_leq_comparator
|
||||
{
|
||||
arma_inline bool operator() (const eT a, const eT b) const { return (a <= b); }
|
||||
constexpr bool operator() (const eT a, const eT b) const { return (a <= b); }
|
||||
};
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ struct arma_leq_comparator
|
||||
template<typename eT>
|
||||
struct arma_geq_comparator
|
||||
{
|
||||
arma_inline bool operator() (const eT a, const eT b) const { return (a >= b); }
|
||||
constexpr bool operator() (const eT a, const eT b) const { return (a >= b); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -79,10 +79,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
class arma_rng
|
||||
struct arma_rng
|
||||
{
|
||||
public:
|
||||
|
||||
#if defined(ARMA_RNG_ALT)
|
||||
typedef arma_rng_alt::seed_type seed_type;
|
||||
#elif defined(ARMA_USE_CXX11_RNG)
|
||||
@@ -267,20 +265,14 @@ arma_rng::set_seed_random()
|
||||
{
|
||||
try
|
||||
{
|
||||
union
|
||||
{
|
||||
seed_type a;
|
||||
unsigned char b[sizeof(seed_type)];
|
||||
} tmp;
|
||||
|
||||
tmp.a = seed_type(0);
|
||||
char tmp[sizeof(seed_type)] = {};
|
||||
|
||||
std::ifstream f("/dev/urandom", std::ifstream::binary);
|
||||
|
||||
if(f.good()) { f.read((char*)(&(tmp.b[0])), sizeof(seed_type)); }
|
||||
if(f.good()) { f.read(&(tmp[0]), sizeof(seed_type)); }
|
||||
|
||||
if(f.good()) { std::memcpy(&seed2, &(tmp[0]), sizeof(seed_type)); }
|
||||
|
||||
if(f.good()) { seed2 = tmp.a; }
|
||||
|
||||
have_seed = (seed2 != seed_type(0));
|
||||
}
|
||||
catch(...) {}
|
||||
@@ -297,19 +289,17 @@ arma_rng::set_seed_random()
|
||||
|
||||
seed3 = static_cast<seed_type>( since_epoch_usec & 0xFFFF );
|
||||
|
||||
union
|
||||
{
|
||||
uword* a;
|
||||
unsigned char b[sizeof(uword*)];
|
||||
} tmp;
|
||||
unsigned char* a = (unsigned char*)std::malloc(std::size_t(4096));
|
||||
|
||||
tmp.a = (uword*)malloc(sizeof(uword));
|
||||
unsigned char b[sizeof(unsigned char*)] = {};
|
||||
|
||||
if(tmp.a != nullptr)
|
||||
if(a != nullptr)
|
||||
{
|
||||
for(size_t i=0; i<sizeof(uword*); ++i) { seed4 += seed_type(tmp.b[i]); }
|
||||
std::memcpy(&(b[0]), &a, sizeof(unsigned char*));
|
||||
|
||||
free(tmp.a);
|
||||
for(size_t i=0; i<sizeof(unsigned char*); ++i) { seed4 += seed_type(b[i]); }
|
||||
|
||||
std::free(a);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -21,10 +21,8 @@
|
||||
|
||||
|
||||
|
||||
class arma_rng_cxx03
|
||||
struct arma_rng_cxx03
|
||||
{
|
||||
public:
|
||||
|
||||
typedef unsigned int seed_type;
|
||||
|
||||
inline static void set_seed(const seed_type val);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -21,10 +21,10 @@
|
||||
|
||||
|
||||
|
||||
#define ARMA_VERSION_MAJOR 14
|
||||
#define ARMA_VERSION_MAJOR 15
|
||||
#define ARMA_VERSION_MINOR 0
|
||||
#define ARMA_VERSION_PATCH 2
|
||||
#define ARMA_VERSION_NAME "Stochastic Parrot"
|
||||
#define ARMA_VERSION_PATCH 1
|
||||
#define ARMA_VERSION_NAME "Medium Roast"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -20,10 +20,8 @@
|
||||
//! @{
|
||||
|
||||
|
||||
class arrayops
|
||||
struct arrayops
|
||||
{
|
||||
public:
|
||||
|
||||
template<typename eT>
|
||||
arma_inline static void
|
||||
copy(eT* dest, const eT* src, const uword n_elem);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -239,7 +239,7 @@ arrayops::convert(out_eT* dest, const in_eT* src, const uword n_elem)
|
||||
{
|
||||
const out_eT* src2 = (const out_eT*)src;
|
||||
|
||||
if(dest != src2) { arrayops::copy(dest, src2, n_elem); }
|
||||
arrayops::copy(dest, src2, n_elem);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -304,6 +304,15 @@ inline
|
||||
void
|
||||
arrayops::convert_cx(out_eT* dest, const in_eT* src, const uword n_elem)
|
||||
{
|
||||
if(is_same_type<out_eT,in_eT>::value)
|
||||
{
|
||||
const out_eT* src2 = (const out_eT*)src;
|
||||
|
||||
arrayops::copy(dest, src2, n_elem);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
uword j;
|
||||
|
||||
for(j=1; j<n_elem; j+=2)
|
||||
@@ -1041,13 +1050,13 @@ arrayops::is_finite(const eT* src, const uword n_elem)
|
||||
const eT val_i = (*src); src++;
|
||||
const eT val_j = (*src); src++;
|
||||
|
||||
if(arma_isfinite(val_i) == false) { return false; }
|
||||
if(arma_isfinite(val_j) == false) { return false; }
|
||||
if(arma_isnonfinite(val_i)) { return false; }
|
||||
if(arma_isnonfinite(val_j)) { return false; }
|
||||
}
|
||||
|
||||
if((j-1) < n_elem)
|
||||
{
|
||||
if(arma_isfinite(*src) == false) { return false; }
|
||||
if(arma_isnonfinite(*src)) { return false; }
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -21,10 +21,8 @@
|
||||
|
||||
|
||||
//! low-level interface functions for accessing LAPACK
|
||||
class auxlib
|
||||
struct auxlib
|
||||
{
|
||||
public:
|
||||
|
||||
//
|
||||
// inv
|
||||
|
||||
@@ -43,6 +41,18 @@ class auxlib
|
||||
template<typename eT>
|
||||
inline static bool inv_tr_rcond(Mat<eT>& A, typename get_pod_type<eT>::result& out_rcond, const uword layout);
|
||||
|
||||
template<typename eT>
|
||||
inline static bool inv_sym(Mat<eT>& A);
|
||||
|
||||
template<typename T>
|
||||
inline static bool inv_sym(Mat< std::complex<T> >& A);
|
||||
|
||||
template<typename eT>
|
||||
inline static bool inv_sym_rcond(Mat<eT>& A, eT& out_rcond);
|
||||
|
||||
template<typename T>
|
||||
inline static bool inv_sym_rcond(Mat< std::complex<T> >& A, T& out_rcond);
|
||||
|
||||
template<typename eT>
|
||||
inline static bool inv_sympd(Mat<eT>& A, bool& out_sympd_state);
|
||||
|
||||
@@ -50,10 +60,10 @@ class auxlib
|
||||
inline static bool inv_sympd(Mat<eT>& out, const Mat<eT>& X);
|
||||
|
||||
template<typename eT>
|
||||
inline static bool inv_sympd_rcond(Mat<eT>& A, bool& out_sympd_state, eT& out_rcond);
|
||||
inline static bool inv_sympd_rcond(Mat<eT>& A, eT& out_rcond);
|
||||
|
||||
template<typename T>
|
||||
inline static bool inv_sympd_rcond(Mat< std::complex<T> >& A, bool& out_sympd_state, T& out_rcond);
|
||||
inline static bool inv_sympd_rcond(Mat< std::complex<T> >& A, T& out_rcond);
|
||||
|
||||
|
||||
//
|
||||
@@ -176,12 +186,6 @@ class auxlib
|
||||
template<typename eT>
|
||||
inline static bool chol_band(Mat<eT>& X, const uword KD, const uword layout);
|
||||
|
||||
template<typename T>
|
||||
inline static bool chol_band(Mat< std::complex<T> >& X, const uword KD, const uword layout);
|
||||
|
||||
template<typename eT>
|
||||
inline static bool chol_band_common(Mat<eT>& X, const uword KD, const uword layout);
|
||||
|
||||
template<typename eT>
|
||||
inline static bool chol_pivot(Mat<eT>& X, Mat<uword>& P, const uword layout);
|
||||
|
||||
@@ -270,10 +274,21 @@ class auxlib
|
||||
//
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_sympd_fast(Mat<typename T1::elem_type>& out, Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);
|
||||
inline static bool solve_sym_fast(Mat<typename T1::pod_type>& out, Mat<typename T1::pod_type>& A, const Base<typename T1::pod_type,T1>& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_sympd_fast_common(Mat<typename T1::elem_type>& out, Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);
|
||||
inline static bool solve_sym_fast(Mat< std::complex<typename T1::pod_type> >& out, Mat< std::complex<typename T1::pod_type> >& A, const Base< std::complex<typename T1::pod_type>, T1 >& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_sym_rcond(Mat<typename T1::pod_type>& out, typename T1::pod_type& out_rcond, Mat<typename T1::pod_type>& A, const Base<typename T1::pod_type,T1>& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_sym_rcond(Mat< std::complex<typename T1::pod_type> >& out, typename T1::pod_type& out_rcond, Mat< std::complex<typename T1::pod_type> >& A, const Base< std::complex<typename T1::pod_type>,T1>& B_expr);
|
||||
|
||||
//
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_sympd_fast(Mat<typename T1::elem_type>& out, Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_sympd_rcond(Mat<typename T1::pod_type>& out, bool& out_sympd_state, typename T1::pod_type& out_rcond, Mat<typename T1::pod_type>& A, const Base<typename T1::pod_type,T1>& B_expr);
|
||||
@@ -314,22 +329,10 @@ class auxlib
|
||||
//
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_band_fast(Mat<typename T1::pod_type>& out, Mat<typename T1::pod_type>& A, const uword KL, const uword KU, const Base<typename T1::pod_type,T1>& B_expr);
|
||||
inline static bool solve_band_fast(Mat<typename T1::elem_type>& out, const Mat<typename T1::elem_type>& A, const uword KL, const uword KU, const Base<typename T1::elem_type,T1>& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_band_fast(Mat< std::complex<typename T1::pod_type> >& out, Mat< std::complex<typename T1::pod_type> >& A, const uword KL, const uword KU, const Base< std::complex<typename T1::pod_type>,T1>& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_band_fast_common(Mat<typename T1::elem_type>& out, const Mat<typename T1::elem_type>& A, const uword KL, const uword KU, const Base<typename T1::elem_type,T1>& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_band_rcond(Mat<typename T1::pod_type>& out, typename T1::pod_type& out_rcond, Mat<typename T1::pod_type>& A, const uword KL, const uword KU, const Base<typename T1::pod_type,T1>& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_band_rcond(Mat< std::complex<typename T1::pod_type> >& out, typename T1::pod_type& out_rcond, Mat< std::complex<typename T1::pod_type> >& A, const uword KL, const uword KU, const Base< std::complex<typename T1::pod_type>,T1>& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_band_rcond_common(Mat<typename T1::elem_type>& out, typename T1::pod_type& out_rcond, const Mat<typename T1::elem_type>& A, const uword KL, const uword KU, const Base<typename T1::elem_type,T1>& B_expr);
|
||||
inline static bool solve_band_rcond(Mat<typename T1::elem_type>& out, typename T1::pod_type& out_rcond, const Mat<typename T1::elem_type>& A, const uword KL, const uword KU, const Base<typename T1::elem_type,T1>& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_band_refine(Mat<typename T1::pod_type>& out, typename T1::pod_type& out_rcond, Mat<typename T1::pod_type>& A, const uword KL, const uword KU, const Base<typename T1::pod_type,T1>& B_expr, const bool equilibrate);
|
||||
@@ -340,13 +343,7 @@ class auxlib
|
||||
//
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_tridiag_fast(Mat<typename T1::pod_type>& out, Mat<typename T1::pod_type>& A, const Base<typename T1::pod_type,T1>& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_tridiag_fast(Mat< std::complex<typename T1::pod_type> >& out, Mat< std::complex<typename T1::pod_type> >& A, const Base< std::complex<typename T1::pod_type>,T1>& B_expr);
|
||||
|
||||
template<typename T1>
|
||||
inline static bool solve_tridiag_fast_common(Mat<typename T1::elem_type>& out, const Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);
|
||||
inline static bool solve_tridiag_fast(Mat<typename T1::elem_type>& out, const Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);
|
||||
|
||||
|
||||
//
|
||||
@@ -365,7 +362,7 @@ class auxlib
|
||||
// solve the Sylvester equation AX + XB = C
|
||||
|
||||
template<typename eT>
|
||||
inline static bool syl(Mat<eT>& X, const Mat<eT>& A, const Mat<eT>& B, const Mat<eT>& C);
|
||||
inline static bool sylvester(Mat<eT>& X, const Mat<eT>& A, const Mat<eT>& B, const Mat<eT>& C);
|
||||
|
||||
|
||||
//
|
||||
@@ -378,6 +375,13 @@ class auxlib
|
||||
inline static bool qz(Mat< std::complex<T> >& A, Mat< std::complex<T> >& B, Mat< std::complex<T> >& vsl, Mat< std::complex<T> >& vsr, const Base< std::complex<T>, T1 >& X_expr, const Base< std::complex<T>, T2 >& Y_expr, const char mode);
|
||||
|
||||
|
||||
//
|
||||
// matrix balance
|
||||
|
||||
template<typename eT>
|
||||
inline static bool balance(Col<typename get_pod_type<eT>::result>& S, Col<uword>& P, Mat<eT>& A, const bool calc_SP, const bool do_scal, const bool do_perm);
|
||||
|
||||
|
||||
//
|
||||
// rcond
|
||||
|
||||
@@ -388,10 +392,10 @@ class auxlib
|
||||
inline static T rcond(Mat< std::complex<T> >& A);
|
||||
|
||||
template<typename eT>
|
||||
inline static eT rcond_sympd(Mat<eT>& A, bool& calc_ok);
|
||||
inline static eT rcond_sym(Mat<eT>& A);
|
||||
|
||||
template<typename T>
|
||||
inline static T rcond_sympd(Mat< std::complex<T> >& A, bool& calc_ok);
|
||||
template<typename T>
|
||||
inline static T rcond_sym(Mat< std::complex<T> >& A);
|
||||
|
||||
template<typename eT>
|
||||
inline static eT rcond_trimat(const Mat<eT>& A, const uword layout);
|
||||
@@ -425,9 +429,6 @@ class auxlib
|
||||
//
|
||||
// misc
|
||||
|
||||
template<typename T1>
|
||||
inline static bool crippled_lapack(const Base<typename T1::elem_type, T1>&);
|
||||
|
||||
template<typename eT>
|
||||
inline static bool rudimentary_sym_check(const Mat<eT>& X);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -242,7 +242,7 @@ compress(Mat<eT>& AB, const Mat<eT>& A, const uword KL, const uword KU, const bo
|
||||
// http://www.netlib.org/lapack/lug/node124.html
|
||||
|
||||
// for ?gbsv, matrix AB size: 2*KL+KU+1 x N; band representation of A stored in rows KL+1 to 2*KL+KU+1 (note: fortran counts from 1)
|
||||
// for ?gbsvx, matrix AB size: KL+KU+1 x N; band representaiton of A stored in rows 1 to KL+KU+1 (note: fortran counts from 1)
|
||||
// for ?gbsvx, matrix AB size: KL+KU+1 x N; band representation of A stored in rows 1 to KL+KU+1 (note: fortran counts from 1)
|
||||
//
|
||||
// the +1 in the above formulas is to take into account the main diagonal
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -78,15 +78,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(ARMA_HAVE_CXX11)
|
||||
#error "*** C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo"
|
||||
#endif
|
||||
|
||||
|
||||
#if (!defined(ARMA_HAVE_CXX14))
|
||||
#if (!defined(ARMA_IGNORE_DEPRECATED_MARKER)) || defined(ARMA_DONT_IGNORE_DEPRECATED_MARKER) || defined(ARMA_DEBUG)
|
||||
#pragma message ("INFO: support for C++11 is deprecated")
|
||||
#endif
|
||||
#if !defined(ARMA_HAVE_CXX14)
|
||||
#error "*** C++14 compiler required; enable C++14 mode in your compiler, or use an earlier version of Armadillo"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -22,8 +22,6 @@
|
||||
#undef arma_aligned
|
||||
#undef arma_align_mem
|
||||
#undef arma_warn_unused
|
||||
#undef arma_deprecated
|
||||
#undef arma_frown
|
||||
#undef arma_malloc
|
||||
#undef arma_inline
|
||||
#undef arma_noinline
|
||||
@@ -34,8 +32,6 @@
|
||||
#define arma_aligned
|
||||
#define arma_align_mem
|
||||
#define arma_warn_unused
|
||||
#define arma_deprecated
|
||||
#define arma_frown(msg)
|
||||
#define arma_malloc
|
||||
#define arma_inline inline
|
||||
#define arma_noinline
|
||||
@@ -102,6 +98,7 @@
|
||||
#define ARMA_SIMPLE_LOOPS
|
||||
|
||||
#undef ARMA_GOOD_COMPILER
|
||||
#undef ARMA_REAL_GCC
|
||||
|
||||
// posix_memalign() is part of IEEE standard 1003.1
|
||||
// http://pubs.opengroup.org/onlinepubs/009696899/functions/posix_memalign.html
|
||||
@@ -158,25 +155,18 @@
|
||||
|
||||
// #pragma message ("using GCC extensions")
|
||||
|
||||
#undef ARMA_GCC_VERSION
|
||||
#define ARMA_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
||||
|
||||
#if (ARMA_GCC_VERSION < 60100)
|
||||
#error "*** newer compiler required; need gcc 6.1 or newer ***"
|
||||
#if (__GNUC__ < 8)
|
||||
#error "*** newer compiler required; need at least gcc 8.1 ***"
|
||||
#endif
|
||||
|
||||
// gcc 6.1 has proper C++14 support and fixes an OpenMP related bug:
|
||||
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57580
|
||||
|
||||
#define ARMA_GOOD_COMPILER
|
||||
#define ARMA_REAL_GCC
|
||||
|
||||
#undef arma_hot
|
||||
#undef arma_cold
|
||||
#undef arma_aligned
|
||||
#undef arma_align_mem
|
||||
#undef arma_warn_unused
|
||||
#undef arma_deprecated
|
||||
#undef arma_frown
|
||||
#undef arma_malloc
|
||||
#undef arma_inline
|
||||
#undef arma_noinline
|
||||
@@ -186,8 +176,6 @@
|
||||
#define arma_aligned __attribute__((__aligned__))
|
||||
#define arma_align_mem __attribute__((__aligned__(16)))
|
||||
#define arma_warn_unused __attribute__((__warn_unused_result__))
|
||||
#define arma_deprecated __attribute__((__deprecated__))
|
||||
#define arma_frown(msg) __attribute__((__deprecated__(msg)))
|
||||
#define arma_malloc __attribute__((__malloc__))
|
||||
#define arma_inline __attribute__((__always_inline__)) inline
|
||||
#define arma_noinline __attribute__((__noinline__))
|
||||
@@ -247,16 +235,6 @@
|
||||
#define arma_warn_unused __attribute__((__warn_unused_result__))
|
||||
#endif
|
||||
|
||||
#if __has_attribute(__deprecated__)
|
||||
#undef arma_deprecated
|
||||
#define arma_deprecated __attribute__((__deprecated__))
|
||||
#endif
|
||||
|
||||
#if __has_attribute(__deprecated__)
|
||||
#undef arma_frown
|
||||
#define arma_frown(msg) __attribute__((__deprecated__(msg)))
|
||||
#endif
|
||||
|
||||
#if __has_attribute(__malloc__)
|
||||
#undef arma_malloc
|
||||
#define arma_malloc __attribute__((__malloc__))
|
||||
@@ -310,13 +288,10 @@
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
#if (_MSC_VER < 1900)
|
||||
#if (_MSC_VER < 1910)
|
||||
#error "*** newer compiler required ***"
|
||||
#endif
|
||||
|
||||
#undef arma_deprecated
|
||||
#define arma_deprecated __declspec(deprecated)
|
||||
|
||||
#undef arma_noinline
|
||||
#define arma_noinline __declspec(noinline)
|
||||
|
||||
@@ -374,15 +349,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ARMA_HAVE_CXX14)
|
||||
#undef arma_deprecated
|
||||
#define arma_deprecated [[deprecated]]
|
||||
|
||||
#undef arma_frown
|
||||
#define arma_frown(msg) [[deprecated(msg)]]
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ARMA_HAVE_CXX17)
|
||||
#undef arma_warn_unused
|
||||
#define arma_warn_unused [[nodiscard]]
|
||||
@@ -390,16 +356,17 @@
|
||||
|
||||
|
||||
#if !defined(ARMA_DONT_USE_OPENMP)
|
||||
#if (defined(_OPENMP) && (_OPENMP >= 201107))
|
||||
#if (defined(_OPENMP) && (_OPENMP >= 201307))
|
||||
#undef ARMA_USE_OPENMP
|
||||
#define ARMA_USE_OPENMP
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if ( defined(ARMA_USE_OPENMP) && (!defined(_OPENMP) || (defined(_OPENMP) && (_OPENMP < 201107))) )
|
||||
#if ( defined(ARMA_USE_OPENMP) && (!defined(_OPENMP) || (defined(_OPENMP) && (_OPENMP < 201307))) )
|
||||
// OpenMP 3.0 required for parallelisation of loops with unsigned integers
|
||||
// OpenMP 3.1 required for atomic read and atomic write
|
||||
// OpenMP 3.1 required for atomic read/write
|
||||
// OpenMP 4.0 required for seq_cst memory order clause in atomic read/write
|
||||
#undef ARMA_USE_OPENMP
|
||||
#undef ARMA_PRINT_OPENMP_WARNING
|
||||
#define ARMA_PRINT_OPENMP_WARNING
|
||||
@@ -407,11 +374,10 @@
|
||||
|
||||
|
||||
#if defined(ARMA_PRINT_OPENMP_WARNING) && !defined(ARMA_DONT_PRINT_OPENMP_WARNING)
|
||||
#pragma message ("WARNING: use of OpenMP disabled; compiler support for OpenMP 3.1+ not detected")
|
||||
#pragma message ("WARNING: use of OpenMP disabled; compiler support for OpenMP 4.0+ not detected")
|
||||
|
||||
#if (defined(_OPENMP) && (_OPENMP < 201107))
|
||||
#if (defined(_OPENMP) && (_OPENMP < 201307))
|
||||
#pragma message ("NOTE: your compiler has an outdated version of OpenMP")
|
||||
#pragma message ("NOTE: consider upgrading to a better compiler")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -445,7 +411,6 @@
|
||||
|
||||
#undef ARMA_DETECTED_FAKE_GCC
|
||||
#undef ARMA_DETECTED_FAKE_CLANG
|
||||
#undef ARMA_GCC_VERSION
|
||||
#undef ARMA_PRINT_OPENMP_WARNING
|
||||
|
||||
|
||||
@@ -471,16 +436,3 @@
|
||||
// https://sourceware.org/bugzilla/show_bug.cgi?id=19239
|
||||
#undef minor
|
||||
#undef major
|
||||
|
||||
|
||||
// optionally allow disabling of compile-time deprecation messages (not recommended)
|
||||
// NOTE: option 'ARMA_IGNORE_DEPRECATED_MARKER' will be removed
|
||||
// NOTE: disabling deprecation messages is counter-productive
|
||||
|
||||
#if defined(ARMA_IGNORE_DEPRECATED_MARKER) && (!defined(ARMA_DONT_IGNORE_DEPRECATED_MARKER)) && (!defined(ARMA_DEBUG))
|
||||
#undef arma_deprecated
|
||||
#define arma_deprecated
|
||||
|
||||
#undef arma_frown
|
||||
#define arma_frown(msg)
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -20,10 +20,26 @@
|
||||
//! @{
|
||||
|
||||
|
||||
//
|
||||
// for preventing pedantic compiler warnings
|
||||
|
||||
template<bool do_eval>
|
||||
struct cond_rel
|
||||
{
|
||||
template<typename eT> static constexpr bool lt(const eT A, const eT B);
|
||||
template<typename eT> static constexpr bool gt(const eT A, const eT B);
|
||||
|
||||
template<typename eT> static constexpr bool leq(const eT A, const eT B);
|
||||
template<typename eT> static constexpr bool geq(const eT A, const eT B);
|
||||
|
||||
template<typename eT> static constexpr eT make_neg(const eT val);
|
||||
};
|
||||
|
||||
|
||||
|
||||
template<>
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
constexpr
|
||||
bool
|
||||
cond_rel<true>::lt(const eT A, const eT B)
|
||||
{
|
||||
@@ -34,7 +50,7 @@ cond_rel<true>::lt(const eT A, const eT B)
|
||||
|
||||
template<>
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
constexpr
|
||||
bool
|
||||
cond_rel<false>::lt(const eT, const eT)
|
||||
{
|
||||
@@ -45,7 +61,7 @@ cond_rel<false>::lt(const eT, const eT)
|
||||
|
||||
template<>
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
constexpr
|
||||
bool
|
||||
cond_rel<true>::gt(const eT A, const eT B)
|
||||
{
|
||||
@@ -56,7 +72,7 @@ cond_rel<true>::gt(const eT A, const eT B)
|
||||
|
||||
template<>
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
constexpr
|
||||
bool
|
||||
cond_rel<false>::gt(const eT, const eT)
|
||||
{
|
||||
@@ -67,7 +83,7 @@ cond_rel<false>::gt(const eT, const eT)
|
||||
|
||||
template<>
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
constexpr
|
||||
bool
|
||||
cond_rel<true>::leq(const eT A, const eT B)
|
||||
{
|
||||
@@ -78,7 +94,7 @@ cond_rel<true>::leq(const eT A, const eT B)
|
||||
|
||||
template<>
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
constexpr
|
||||
bool
|
||||
cond_rel<false>::leq(const eT, const eT)
|
||||
{
|
||||
@@ -89,7 +105,7 @@ cond_rel<false>::leq(const eT, const eT)
|
||||
|
||||
template<>
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
constexpr
|
||||
bool
|
||||
cond_rel<true>::geq(const eT A, const eT B)
|
||||
{
|
||||
@@ -100,7 +116,7 @@ cond_rel<true>::geq(const eT A, const eT B)
|
||||
|
||||
template<>
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
constexpr
|
||||
bool
|
||||
cond_rel<false>::geq(const eT, const eT)
|
||||
{
|
||||
@@ -111,7 +127,7 @@ cond_rel<false>::geq(const eT, const eT)
|
||||
|
||||
template<>
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
constexpr
|
||||
eT
|
||||
cond_rel<true>::make_neg(const eT val)
|
||||
{
|
||||
@@ -122,7 +138,7 @@ cond_rel<true>::make_neg(const eT val)
|
||||
|
||||
template<>
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
constexpr
|
||||
eT
|
||||
cond_rel<false>::make_neg(const eT)
|
||||
{
|
||||
@@ -1,12 +1,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
|
||||
// Copyright 2008-2016 National ICT Australia (NICTA)
|
||||
//
|
||||
// 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
|
||||
// https://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,
|
||||
@@ -102,11 +102,8 @@
|
||||
//// Uncomment the above line if your BLAS and LAPACK libraries have function names with a trailing underscore.
|
||||
//// Conversely, comment it out if the function names don't have a trailing underscore.
|
||||
|
||||
// #define ARMA_BLAS_LONG
|
||||
//// Uncomment the above line if your BLAS and LAPACK libraries use "long" instead of "int"
|
||||
|
||||
// #define ARMA_BLAS_LONG_LONG
|
||||
//// Uncomment the above line if your BLAS and LAPACK libraries use "long long" instead of "int"
|
||||
//// Uncomment the above line if your BLAS and LAPACK libraries use 64 bit integers, ie. "long long" instead of "int"
|
||||
|
||||
// #define ARMA_BLAS_NOEXCEPT
|
||||
//// Uncomment the above line if you require BLAS functions to have the 'noexcept' specification
|
||||
@@ -131,7 +128,7 @@
|
||||
//// Uncomment the above line to use Intel MKL types for complex numbers.
|
||||
//// You will need to include appropriate MKL headers before the Armadillo header.
|
||||
//// You may also need to enable or disable the following options:
|
||||
//// ARMA_BLAS_LONG, ARMA_BLAS_LONG_LONG, ARMA_USE_FORTRAN_HIDDEN_ARGS
|
||||
//// ARMA_BLAS_LONG_LONG, ARMA_USE_FORTRAN_HIDDEN_ARGS
|
||||
|
||||
#if !defined(ARMA_USE_OPENMP)
|
||||
// #define ARMA_USE_OPENMP
|
||||
@@ -150,6 +147,12 @@
|
||||
//// Note that ARMA_64BIT_WORD is automatically enabled when std::size_t has 64 bits and ARMA_32BIT_WORD is not defined.
|
||||
#endif
|
||||
|
||||
#if !defined(ARMA_FORCE_USE_FP16)
|
||||
// #define ARMA_FORCE_USE_FP16
|
||||
//// Uncomment the above line to force the use of fp16 and cx_fp16 element types even if hardware support is not detected.
|
||||
//// NOTE: C++23 is also required for fp16 and cx_fp16.
|
||||
#endif
|
||||
|
||||
#if !defined(ARMA_OPTIMISE_BAND)
|
||||
#define ARMA_OPTIMISE_BAND
|
||||
//// Comment out the above line to disable optimised handling
|
||||
@@ -160,7 +163,7 @@
|
||||
#define ARMA_OPTIMISE_SYM
|
||||
//// Comment out the above line to disable optimised handling
|
||||
//// of symmetric/hermitian matrices by various functions:
|
||||
//// solve(), inv(), pinv(), expmat(), logmat(), sqrtmat(), rcond(), rank()
|
||||
//// solve(), inv(), pinv(), expmat(), logmat(), sqrtmat(), powmat(), rank(), cond(), rcond()
|
||||
#endif
|
||||
|
||||
#if !defined(ARMA_OPTIMISE_INVEXPR)
|
||||
@@ -169,6 +172,11 @@
|
||||
//// of inv() and inv_sympd() within compound expressions
|
||||
#endif
|
||||
|
||||
#if !defined(ARMA_OPTIMISE_POWEXPR)
|
||||
#define ARMA_OPTIMISE_POWEXPR
|
||||
//// Comment out the above line to disable optimised handling of pow()
|
||||
#endif
|
||||
|
||||
#if !defined(ARMA_CHECK_CONFORMANCE)
|
||||
#define ARMA_CHECK_CONFORMANCE
|
||||
//// Comment out the above line to disable conformance checks for bounds and size.
|
||||
@@ -212,32 +220,14 @@
|
||||
#define ARMA_DEBUG
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ARMA_DEFAULT_OSTREAM)
|
||||
#pragma message ("WARNING: support for ARMA_DEFAULT_OSTREAM is deprecated and will be removed;")
|
||||
#pragma message ("WARNING: use ARMA_COUT_STREAM and ARMA_CERR_STREAM instead")
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(ARMA_COUT_STREAM)
|
||||
#if defined(ARMA_DEFAULT_OSTREAM)
|
||||
// for compatibility with earlier versions of Armadillo
|
||||
#define ARMA_COUT_STREAM ARMA_DEFAULT_OSTREAM
|
||||
#else
|
||||
#define ARMA_COUT_STREAM std::cout
|
||||
#endif
|
||||
#define ARMA_COUT_STREAM std::cout
|
||||
#endif
|
||||
|
||||
#if !defined(ARMA_CERR_STREAM)
|
||||
#if defined(ARMA_DEFAULT_OSTREAM)
|
||||
// for compatibility with earlier versions of Armadillo
|
||||
#define ARMA_CERR_STREAM ARMA_DEFAULT_OSTREAM
|
||||
#else
|
||||
#define ARMA_CERR_STREAM std::cerr
|
||||
#endif
|
||||
#define ARMA_CERR_STREAM std::cerr
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(ARMA_PRINT_EXCEPTIONS)
|
||||
// #define ARMA_PRINT_EXCEPTIONS
|
||||
#if defined(ARMA_PRINT_EXCEPTIONS_INTERNAL)
|
||||
@@ -291,13 +281,6 @@
|
||||
#undef ARMA_USE_STD_MUTEX
|
||||
#endif
|
||||
|
||||
// for compatibility with earlier versions of Armadillo
|
||||
#if defined(ARMA_DONT_USE_CXX11_MUTEX)
|
||||
#pragma message ("WARNING: support for ARMA_DONT_USE_CXX11_MUTEX is deprecated and will be removed;")
|
||||
#pragma message ("WARNING: use ARMA_DONT_USE_STD_MUTEX instead")
|
||||
#undef ARMA_USE_STD_MUTEX
|
||||
#endif
|
||||
|
||||
#if defined(ARMA_DONT_USE_OPENMP)
|
||||
#undef ARMA_USE_OPENMP
|
||||
#endif
|
||||
@@ -306,6 +289,31 @@
|
||||
#undef ARMA_64BIT_WORD
|
||||
#endif
|
||||
|
||||
#if defined(ARMA_DONT_USE_FP16)
|
||||
#undef ARMA_FORCE_USE_FP16
|
||||
#endif
|
||||
|
||||
#if (defined(ARMA_BLAS_LONG_LONG) && defined(ARMA_USE_WRAPPER))
|
||||
#pragma message ("WARNING: use of ARMA_BLAS_LONG_LONG in conjunction with ARMA_USE_WRAPPER is not supported")
|
||||
#endif
|
||||
|
||||
#if (defined(ARMA_BLAS_64BIT_INT) && defined(ARMA_USE_WRAPPER))
|
||||
#pragma message ("WARNING: use of ARMA_BLAS_64BIT_INT in conjunction with ARMA_USE_WRAPPER is not supported")
|
||||
#endif
|
||||
|
||||
#if (defined(ARMA_SUPERLU_64BIT_INT) && defined(ARMA_USE_WRAPPER))
|
||||
#pragma message ("WARNING: use of ARMA_SUPERLU_64BIT_INT in conjunction with ARMA_USE_WRAPPER is not supported")
|
||||
#endif
|
||||
|
||||
// for compatibility with earlier versions of Armadillo
|
||||
#if defined(ARMA_BLAS_LONG) || defined(ARMA_BLAS_LONG_LONG)
|
||||
#undef ARMA_BLAS_64BIT_INT
|
||||
#define ARMA_BLAS_64BIT_INT
|
||||
|
||||
// #pragma message ("options ARMA_BLAS_LONG and ARMA_BLAS_LONG_LONG are deprecated;")
|
||||
// #pragma message ("use ARMA_BLAS_64BIT_INT instead")
|
||||
#endif
|
||||
|
||||
#if defined(ARMA_DONT_OPTIMISE_BAND) || defined(ARMA_DONT_OPTIMISE_SOLVE_BAND)
|
||||
#undef ARMA_OPTIMISE_BAND
|
||||
#endif
|
||||
@@ -318,6 +326,10 @@
|
||||
#undef ARMA_OPTIMISE_INVEXPR
|
||||
#endif
|
||||
|
||||
#if defined(ARMA_DONT_OPTIMISE_POWEXPR)
|
||||
#undef ARMA_OPTIMISE_POWEXPR
|
||||
#endif
|
||||
|
||||
#if defined(ARMA_DONT_CHECK_CONFORMANCE)
|
||||
#if defined(ARMA_CHECK_CONFORMANCE) && (ARMA_WARN_LEVEL >= 2)
|
||||
#pragma message ("WARNING: conformance checks disabled")
|
||||
@@ -353,8 +365,12 @@
|
||||
#undef ARMA_PRINT_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#if defined(ARMA_NO_CRIPPLED_LAPACK)
|
||||
#undef ARMA_CRIPPLED_LAPACK
|
||||
#if defined(ARMA_IGNORE_DEPRECATED_MARKER)
|
||||
#pragma message ("NOTE: option ARMA_IGNORE_DEPRECATED_MARKER is not supported")
|
||||
#endif
|
||||
|
||||
#if defined(ARMA_CRIPPLED_LAPACK)
|
||||
#pragma message ("NOTE: option ARMA_CRIPPLED_LAPACK is not supported")
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user