diff --git a/.gitattributes b/.gitattributes
index e61f414fbc322391782098ed25720bffc0695469..7ba90996907ac2372e61a364721234297425eb01 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -82,4 +82,40 @@ weight/_dep/libcifpp/rsrc/mmcif_pdbx.dic filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
weight/libflash_atten_c.so filter=lfs diff=lfs merge=lfs -text
weight/mmseqs/bin/mmseqs filter=lfs diff=lfs merge=lfs -text
-weight/mmseqs/lib/libmarv.so filter=lfs diff=lfs merge=lfs -text
\ No newline at end of file
+weight/mmseqs/lib/libmarv.so filter=lfs diff=lfs merge=lfs -textflax_model/alphafold3/_tools/hmmer/bin/easel filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-alimerge filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-alirev filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-alimanip filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-alipid filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/alimask filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-afetch filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-mask filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-compstruct filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-reformat filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-seqstat filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-alistat filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-compalign filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-alimask filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/hmmlogo filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-seqrange filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-alimap filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-mixdchlet filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-construct filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-translate filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/hmmscan filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-ssdraw filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-sfetch filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-shuffle filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/hmmbuild filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/hmmsearch filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/hmmsim filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/hmmalign filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/hmmconvert filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-histplot filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/hmmstat filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/makehmmerdb filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/hmmpress filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/esl-weight filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/hmmfetch filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/hmmemit filter=lfs diff=lfs merge=lfs -text
+flax_model/alphafold3/_tools/hmmer/bin/nhmmscan filter=lfs diff=lfs merge=lfs -text
diff --git a/flax_model/alphafold3/_data/libcifpp/components.cif b/flax_model/alphafold3/_data/libcifpp/components.cif
new file mode 100644
index 0000000000000000000000000000000000000000..5c023d164d06a2161f1922c145d0c6159780b5f9
--- /dev/null
+++ b/flax_model/alphafold3/_data/libcifpp/components.cif
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:07589b2cff5cae2cc8847a03cf8354a80c3bbc618aedda80f4d05ccaf8b5a85c
+size 508121501
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/alimask b/flax_model/alphafold3/_tools/hmmer/bin/alimask
new file mode 100644
index 0000000000000000000000000000000000000000..a2be722f20ec51aa2bfd2ffe7333169d0da8dff9
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/alimask
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3829f1617d978132264285088fa1876cc576e468586d8cf88660748ae2b13e34
+size 472688
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/easel b/flax_model/alphafold3/_tools/hmmer/bin/easel
new file mode 100644
index 0000000000000000000000000000000000000000..7533219c6ed255d1886431d4328d7e506e7944dd
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/easel
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:46ba04bd13c9931f11fa14a1f3f3fdc0c650c05aac20de74f6dcb0288fe4be2d
+size 574504
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-afetch b/flax_model/alphafold3/_tools/hmmer/bin/esl-afetch
new file mode 100644
index 0000000000000000000000000000000000000000..2311e779e28f8bfc69c112a9ced6c81ef7264032
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-afetch
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d770ea581ec2bd42c684837d5f8414b3e2f4f8e561c28ae594d35a8855510be0
+size 366424
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-alimanip b/flax_model/alphafold3/_tools/hmmer/bin/esl-alimanip
new file mode 100644
index 0000000000000000000000000000000000000000..0c20967a9cc3ee59676fb448aba019ab398bcbc1
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-alimanip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9e9639fa2303da69519e9b06f631850bb081a3bca0f457f05ae331f484f66057
+size 601624
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-alimap b/flax_model/alphafold3/_tools/hmmer/bin/esl-alimap
new file mode 100644
index 0000000000000000000000000000000000000000..67bf8ff0642ed7e583f02ea30f74bf0d64be836e
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-alimap
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:303169914a002be9658a626a5767ac1e332a01f8497aafc2a0fb786d94bd1166
+size 373920
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-alimask b/flax_model/alphafold3/_tools/hmmer/bin/esl-alimask
new file mode 100644
index 0000000000000000000000000000000000000000..66fee9223f223423a3ccd53806acd13e06910a78
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-alimask
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8e3d36892dbce11b74cba9f7eec125b633ac3def9f3777ff52a712b2a13715ec
+size 427360
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-alimerge b/flax_model/alphafold3/_tools/hmmer/bin/esl-alimerge
new file mode 100644
index 0000000000000000000000000000000000000000..bec9ff7245d45571089136e1c9cb7b867429d5ce
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-alimerge
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:74301a1a9a1e6d1be2b34ff85147f4609373922df4911d8fcd89af9d0f41e20a
+size 421184
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-alipid b/flax_model/alphafold3/_tools/hmmer/bin/esl-alipid
new file mode 100644
index 0000000000000000000000000000000000000000..9e40090dc86fb915e5cf817c0e4e844acb2b65d6
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-alipid
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4fdb5baa1a9e5579f0e542a0eb006cc432181dcc12107c27c84cb2998e2ee66e
+size 384080
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-alirev b/flax_model/alphafold3/_tools/hmmer/bin/esl-alirev
new file mode 100644
index 0000000000000000000000000000000000000000..b5b4fc0a427e78472a19aa100269434abef8aa98
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-alirev
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b27dd80cb51b2aba859bdf162aeaddd32f61d340cdadc21ce14b93e31f37ca86
+size 352920
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-alistat b/flax_model/alphafold3/_tools/hmmer/bin/esl-alistat
new file mode 100644
index 0000000000000000000000000000000000000000..93189fdf52546ed3e5f2dece9af4ddfda011ddb5
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-alistat
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f3d6c6cad3da0e37905979950871183d89bef3dc8fccd5c36a0722b34914659f
+size 434608
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-compalign b/flax_model/alphafold3/_tools/hmmer/bin/esl-compalign
new file mode 100644
index 0000000000000000000000000000000000000000..223f2d5836ad87bd0df47ea1931415447299b607
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-compalign
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d5875b268e83742fb7accad9e44e57c6567285d874ec8574a6bb34e6401b8a9c
+size 370608
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-compstruct b/flax_model/alphafold3/_tools/hmmer/bin/esl-compstruct
new file mode 100644
index 0000000000000000000000000000000000000000..b39b422b7ba014fc30293822d0f4146966a4118e
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-compstruct
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:864b1fde43e2603340d666eb3b2e382b57556b65d68416ea8bec59888516f18a
+size 357136
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-construct b/flax_model/alphafold3/_tools/hmmer/bin/esl-construct
new file mode 100644
index 0000000000000000000000000000000000000000..99398c9b34a7f55d7d8eac113ce9338f4a36fdea
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-construct
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:016ef82d9c226ab2dfa96a6d34e45b903e5de66cf2055396f622f978d5c2255c
+size 374472
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-histplot b/flax_model/alphafold3/_tools/hmmer/bin/esl-histplot
new file mode 100644
index 0000000000000000000000000000000000000000..cd2ae1926f79c8070647267ca8175ac9385c1416
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-histplot
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9f64c1da60a62e2cd4e6c09d89512e28a31b824115ff43c5f4ffdfb2b431f0e2
+size 175248
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-mask b/flax_model/alphafold3/_tools/hmmer/bin/esl-mask
new file mode 100644
index 0000000000000000000000000000000000000000..0c8fdb6e5d0f026a0f623ab3b43bccdbc805f170
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-mask
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:71aa5ec2f448fd03390551b56e0bec104294f96ebca830b71a5ad48a78a62c1b
+size 466512
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-mixdchlet b/flax_model/alphafold3/_tools/hmmer/bin/esl-mixdchlet
new file mode 100644
index 0000000000000000000000000000000000000000..70a36e38851c9ed016915b7ffc56a4fb834d8b1c
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-mixdchlet
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:485ba00164847ae5b3c7b3d9252c893731d5457bd3b9a107bf8328a6dab7607a
+size 166744
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-reformat b/flax_model/alphafold3/_tools/hmmer/bin/esl-reformat
new file mode 100644
index 0000000000000000000000000000000000000000..02333f44a488b93c696a1e0b755d839f5f4f1c84
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-reformat
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:04f041b4b5291ff000d1dd4ad36e291257fb1cc5ee87438c382a681805d4e871
+size 480000
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-seqrange b/flax_model/alphafold3/_tools/hmmer/bin/esl-seqrange
new file mode 100644
index 0000000000000000000000000000000000000000..b5c4015ab8179524ad6af4a0999474fef5a4fb3e
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-seqrange
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8c632736b7e228ff8b1dafd196a975699dc4fe3e328469eb7912adf5ab7b6407
+size 457152
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-seqstat b/flax_model/alphafold3/_tools/hmmer/bin/esl-seqstat
new file mode 100644
index 0000000000000000000000000000000000000000..67799cce6e7ef370790b055db87ba138a29c6afe
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-seqstat
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a98388deebbaf07421a880ac69f3938101f241e471d5e53fb208b053f6820811
+size 466104
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-sfetch b/flax_model/alphafold3/_tools/hmmer/bin/esl-sfetch
new file mode 100644
index 0000000000000000000000000000000000000000..775b4c5479a9d910c2c85cd4edd5728bc54bd6c9
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-sfetch
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:860fcf585ba9bccff9e77d23061a95d878e226b0013dc810d0dafb7716727a72
+size 488216
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-shuffle b/flax_model/alphafold3/_tools/hmmer/bin/esl-shuffle
new file mode 100644
index 0000000000000000000000000000000000000000..a75877f4318d2063f51272aa4502315e32c70679
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-shuffle
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8769d54193fe004f33ec80f5cda4828760ed173fb4359b020997dd21ed8d2825
+size 475808
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-ssdraw b/flax_model/alphafold3/_tools/hmmer/bin/esl-ssdraw
new file mode 100644
index 0000000000000000000000000000000000000000..0dfa8d4f46e60a76b647075042ca8b90968f58a5
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-ssdraw
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:683b7b21d1382a09ef0795e2ef06fb3dc0f2fab4503c032da79271771a2d5b1d
+size 538912
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-translate b/flax_model/alphafold3/_tools/hmmer/bin/esl-translate
new file mode 100644
index 0000000000000000000000000000000000000000..9b7bc82e1b5d51292fa86862d674f9a964eb9a02
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-translate
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:959313addd5ce794b977bfb03daafcc6c0f2974a5dec0f198f7a46822a3c483b
+size 501024
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/esl-weight b/flax_model/alphafold3/_tools/hmmer/bin/esl-weight
new file mode 100644
index 0000000000000000000000000000000000000000..36132a37f1c5d4677cfde91d17752a3d82f93d1b
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/esl-weight
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:439fec1b9e7c3fda0d66e578f2edeae1b7d886693fe4d459588b2943e92f4b76
+size 442000
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmalign b/flax_model/alphafold3/_tools/hmmer/bin/hmmalign
new file mode 100644
index 0000000000000000000000000000000000000000..22cbaea8dc435ca5e084663e3b04fd2f5b85418e
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmalign
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:41d61aa0607f1276a60885aa7bf6211eeb82b0025af14fdc8e065603641822c4
+size 825160
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmbuild b/flax_model/alphafold3/_tools/hmmer/bin/hmmbuild
new file mode 100644
index 0000000000000000000000000000000000000000..ec3e765eff2a2bdd83f79f4415c6993177334b9a
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmbuild
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0d77e1ec8f1cbbbd8f422e4c9086df14827c330571441a643b0e000dffdd3cfa
+size 961776
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmconvert b/flax_model/alphafold3/_tools/hmmer/bin/hmmconvert
new file mode 100644
index 0000000000000000000000000000000000000000..f1ada1ea6680b7dbdd4239baf0a69b2f42cfc219
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmconvert
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:94492f28b9bd0bf189e8939250fd4e17334f438f1fbd5a28d7961c8372560964
+size 522376
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmemit b/flax_model/alphafold3/_tools/hmmer/bin/hmmemit
new file mode 100644
index 0000000000000000000000000000000000000000..58c2eb11854676ac28ef365c5b4cc4617fd685ac
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmemit
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d95014dd6782eda7230deaa99ea69797b2d2f91974562490beb26435fcb342cc
+size 825632
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmfetch b/flax_model/alphafold3/_tools/hmmer/bin/hmmfetch
new file mode 100644
index 0000000000000000000000000000000000000000..40c443ea88894e292c922632ad84936baa98d92e
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmfetch
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:868bffcb8ae9da213e12e57848c0e1a33c8089b5c8e9a46be00ef94b5b96db90
+size 531312
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmlogo b/flax_model/alphafold3/_tools/hmmer/bin/hmmlogo
new file mode 100644
index 0000000000000000000000000000000000000000..f4cbdf56aee89c41307054c86f361e7071ace1a0
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmlogo
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bcfe77862766daec5dbe81fbf4c54a5fb143206de97c48f6f8e970e07ab09e9c
+size 522504
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmpgmd b/flax_model/alphafold3/_tools/hmmer/bin/hmmpgmd
new file mode 100644
index 0000000000000000000000000000000000000000..e1d5d85e9634f2bdf9f56209a4c621d7842b41af
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmpgmd
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c1241da11803085fda21c80ec674d73f483e25e317248e0ac73210156ae500af
+size 1218768
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmpgmd_shard b/flax_model/alphafold3/_tools/hmmer/bin/hmmpgmd_shard
new file mode 100644
index 0000000000000000000000000000000000000000..f7abc7c218899db9d350c53397ea0cf94718b2da
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmpgmd_shard
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f1567ab0cc18dfe3018a7e6cd9c0cacc74ae7da0853f0dcec625b6df48dee7b9
+size 1227248
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmpress b/flax_model/alphafold3/_tools/hmmer/bin/hmmpress
new file mode 100644
index 0000000000000000000000000000000000000000..ec74923677e8de86d6ae5782494df731629fd0b6
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmpress
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0c461a2b8ba09d2edba85a1df8d0de0a802c9ce52cac39c921d421fb393a093b
+size 534896
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmscan b/flax_model/alphafold3/_tools/hmmer/bin/hmmscan
new file mode 100644
index 0000000000000000000000000000000000000000..547df3f731ca528714cc85e3952a99970f2662f2
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmscan
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0ddd177ec8cdf069626ab84801c3f4d0f42d30db316b29f4fad257c9485744e1
+size 987768
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmsearch b/flax_model/alphafold3/_tools/hmmer/bin/hmmsearch
new file mode 100644
index 0000000000000000000000000000000000000000..7725764be79dcf4f91167c66f89993d61aca6885
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmsearch
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cb1e14fc6d2e06b430698bfe7e69141cf877795366c854236c6bd2a46183f92e
+size 988096
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmsim b/flax_model/alphafold3/_tools/hmmer/bin/hmmsim
new file mode 100644
index 0000000000000000000000000000000000000000..05117bf9ada015abc232968f0b721e7807aba10d
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmsim
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2a6f716a3731fae121a5a65bdcc5ad348ad3fe7fad25e72eebaa2eb90814bebc
+size 568416
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/hmmstat b/flax_model/alphafold3/_tools/hmmer/bin/hmmstat
new file mode 100644
index 0000000000000000000000000000000000000000..6f828995d91a353ebecb27903c9eac042625c88a
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/hmmstat
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:64c3444f4cc8503d89dc8af2f3bfad9890a3cf45327233a0ea02038639ddd121
+size 517800
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/jackhmmer b/flax_model/alphafold3/_tools/hmmer/bin/jackhmmer
new file mode 100644
index 0000000000000000000000000000000000000000..64329198db4305feab9c9c58037fab876783f15a
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/jackhmmer
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7046b148ec2ba5e8463b3abeffb43a3816b4371ef9a182d3907de674a84ef9cc
+size 1179480
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/makehmmerdb b/flax_model/alphafold3/_tools/hmmer/bin/makehmmerdb
new file mode 100644
index 0000000000000000000000000000000000000000..d8e6f94f7068071b77674c13e07b1aa5491f58e3
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/makehmmerdb
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6984e98310c61285616e6328b20c315f1fd5c9127c04f976dd410bb84a447504
+size 529872
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/nhmmer b/flax_model/alphafold3/_tools/hmmer/bin/nhmmer
new file mode 100644
index 0000000000000000000000000000000000000000..0635a417c9b9be1ad63900960d2ac997dec69a58
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/nhmmer
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f2c8d3f4d65b4a9fe99b171c1db7b31800b882b2f958905f580836f115b99aec
+size 1191680
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/nhmmscan b/flax_model/alphafold3/_tools/hmmer/bin/nhmmscan
new file mode 100644
index 0000000000000000000000000000000000000000..9563bfe57f00a3151c7570b0c86fee221843c048
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/nhmmscan
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:52c869a81a5ed80aee078ffe23e59b924459128522b5dd5b01d014719d64b75c
+size 988336
diff --git a/flax_model/alphafold3/_tools/hmmer/bin/phmmer b/flax_model/alphafold3/_tools/hmmer/bin/phmmer
new file mode 100644
index 0000000000000000000000000000000000000000..c3f6fdfb5f656301f8d8c579d52f833bc7800c17
--- /dev/null
+++ b/flax_model/alphafold3/_tools/hmmer/bin/phmmer
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:81f7485b18db740b9fa2ae7b43df4e69989e95c31eb9fd9024104acf4b061ac1
+size 1127504
diff --git a/flax_model/alphafold3/constants/converters/ccd.pickle b/flax_model/alphafold3/constants/converters/ccd.pickle
new file mode 100644
index 0000000000000000000000000000000000000000..d1305d41dd59802ddf152663d7b201fe026fac44
--- /dev/null
+++ b/flax_model/alphafold3/constants/converters/ccd.pickle
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:30042b03e81e02f0a3ad2fbee611a71f4af11972862a5a8839e74f96f56f80ab
+size 528645609
diff --git a/flax_model/alphafold3/constants/converters/chemical_component_sets.pickle b/flax_model/alphafold3/constants/converters/chemical_component_sets.pickle
new file mode 100644
index 0000000000000000000000000000000000000000..dc56eecffeb28b6838d0e168a9cadf543d54ff2a
--- /dev/null
+++ b/flax_model/alphafold3/constants/converters/chemical_component_sets.pickle
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a3ddc2beac2d980747c69d24b1a7775c87a43f35528359aef976bc49dfade675
+size 8416
diff --git a/flax_model/alphafold3/cpp.cpython-311-x86_64-linux-gnu.so b/flax_model/alphafold3/cpp.cpython-311-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..3bed329a1517b428487643fbc170bed168f88d26
--- /dev/null
+++ b/flax_model/alphafold3/cpp.cpython-311-x86_64-linux-gnu.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e17054a2eb54cc08a6da93666acb50c388dc829c5db79c7243c58fd3760ee524
+size 2704464
diff --git a/weight/_dep/Catch2.tar b/weight/_dep/Catch2.tar
new file mode 100644
index 0000000000000000000000000000000000000000..e7297d8303dbdb20f78f12ec31c125df7b01c024
--- /dev/null
+++ b/weight/_dep/Catch2.tar
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4642d70e95c74ee6a409592609147979cf8691a5394d3fa2e876ce481d572bbf
+size 35085824
diff --git a/weight/_dep/Catch2/docs/opensource-users.md b/weight/_dep/Catch2/docs/opensource-users.md
new file mode 100644
index 0000000000000000000000000000000000000000..6cc557a8922a07cbf256529c7de0cab0ade349ba
--- /dev/null
+++ b/weight/_dep/Catch2/docs/opensource-users.md
@@ -0,0 +1,126 @@
+
+# Open Source projects using Catch
+
+Catch is great for open source. With its [liberal license](../LICENSE.txt) and single-header, dependency-free, distribution
+it's easy to just drop the header into your project and start writing tests - what's not to like?
+
+As a result Catch is now being used in many Open Source projects, including some quite well known ones.
+This page is an attempt to track those projects. Obviously it can never be complete.
+This effort largely relies on the maintainers of the projects themselves updating this page and submitting a PR
+(or, if you prefer contact one of the maintainers of Catch directly, use the
+[forums](https://groups.google.com/forum/?fromgroups#!forum/catch-forum)), or raise an [issue](https://github.com/philsquared/Catch/issues) to let us know).
+Of course users of those projects might want to update this page too. That's fine - as long you're confident the project maintainers won't mind.
+If you're an Open Source project maintainer and see your project listed here but would rather it wasn't -
+just let us know via any of the previously mentioned means - although I'm sure there won't be many who feel that way.
+
+Listing a project here does not imply endorsement and the plan is to keep these ordered alphabetically to avoid an implication of relative importance.
+
+## Libraries & Frameworks
+
+### [ApprovalTests.cpp](https://github.com/approvals/ApprovalTests.cpp)
+C++11 implementation of Approval Tests, for quick, convenient testing of legacy code.
+
+### [args](https://github.com/Taywee/args)
+A simple header-only C++ argument parser library.
+
+### [Azmq](https://github.com/zeromq/azmq)
+Boost Asio style bindings for ZeroMQ.
+
+### [Cataclysm: Dark Days Ahead](https://github.com/CleverRaven/Cataclysm-DDA)
+Post-apocalyptic survival RPG.
+
+### [ChaiScript](https://github.com/ChaiScript/ChaiScript)
+A, header-only, embedded scripting language designed from the ground up to directly target C++ and take advantage of modern C++ development techniques.
+
+### [ChakraCore](https://github.com/Microsoft/ChakraCore)
+The core part of the Chakra JavaScript engine that powers Microsoft Edge.
+
+### [Clara](https://github.com/philsquared/Clara)
+A, single-header-only, type-safe, command line parser - which also prints formatted usage strings.
+
+### [Couchbase-lite-core](https://github.com/couchbase/couchbase-lite-core)
+The next-generation core storage and query engine for Couchbase Lite.
+
+### [cppcodec](https://github.com/tplgy/cppcodec)
+Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32.
+
+### [DtCraft](https://github.com/twhuang-uiuc/DtCraft)
+A High-performance Cluster Computing Engine.
+
+### [forest](https://github.com/xorz57/forest)
+Template Library of Tree Data Structures.
+
+### [Fuxedo](https://github.com/fuxedo/fuxedo)
+Open source Oracle Tuxedo-like XATMI middleware for C and C++.
+
+### [Inja](https://github.com/pantor/inja)
+A header-only template engine for modern C++.
+
+### [libcluon](https://github.com/chrberger/libcluon)
+A single-header-only library written in C++14 to glue distributed software components (UDP, TCP, shared memory) supporting natively Protobuf, LCM/ZCM, MsgPack, and JSON for dynamic message transformations in-between.
+
+### [MNMLSTC Core](https://github.com/mnmlstc/core)
+A small and easy to use C++11 library that adds a functionality set that will be available in C++14 and later, as well as some useful additions.
+
+### [nanodbc](https://github.com/lexicalunit/nanodbc/)
+A small C++ library wrapper for the native C ODBC API.
+
+### [Nonius](https://github.com/libnonius/nonius)
+A header-only framework for benchmarking small snippets of C++ code.
+
+### [polymorphic_value](https://github.com/jbcoe/polymorphic_value)
+A polymorphic value-type for C++.
+
+### [Ppconsul](https://github.com/oliora/ppconsul)
+A C++ client library for Consul. Consul is a distributed tool for discovering and configuring services in your infrastructure.
+
+### [Reactive-Extensions/ RxCpp](https://github.com/Reactive-Extensions/RxCpp)
+A library of algorithms for values-distributed-in-time.
+
+### [SOCI](https://github.com/SOCI/soci)
+The C++ Database Access Library.
+
+### [TextFlowCpp](https://github.com/philsquared/textflowcpp)
+A small, single-header-only, library for wrapping and composing columns of text.
+
+### [thor](https://github.com/xorz57/thor)
+Wrapper Library for CUDA.
+
+### [toml++](https://github.com/marzer/tomlplusplus)
+A header-only TOML parser and serializer for modern C++.
+
+### [Trompeloeil](https://github.com/rollbear/trompeloeil)
+A thread-safe header-only mocking framework for C++14.
+
+## Applications & Tools
+
+### [App Mesh](https://github.com/laoshanxi/app-mesh)
+A high available cloud native micro-service application management platform implemented by modern C++.
+
+### [ArangoDB](https://github.com/arangodb/arangodb)
+ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values.
+
+### [Giada - Your Hardcore Loop Machine](https://github.com/monocasual/giada)
+Minimal, open-source and cross-platform audio tool for live music production.
+
+### [MAME](https://github.com/mamedev/mame)
+MAME originally stood for Multiple Arcade Machine Emulator.
+
+### [Newsbeuter](https://github.com/akrennmair/newsbeuter)
+Newsbeuter is an open-source RSS/Atom feed reader for text terminals.
+
+### [PopHead](https://github.com/SPC-Some-Polish-Coders/PopHead)
+A 2D, Zombie, RPG game which is being made on our own engine.
+
+### [raspigcd](https://github.com/pantadeusz/raspigcd)
+Low level CLI app and library for execution of GCODE on Raspberry Pi without any additional microcontrolers (just RPi + Stepsticks).
+
+### [SpECTRE](https://github.com/sxs-collaboration/spectre)
+SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.
+
+### [Standardese](https://github.com/foonathan/standardese)
+Standardese aims to be a nextgen Doxygen.
+
+---
+
+[Home](Readme.md#top)
diff --git a/weight/_dep/Catch2/include/internal/benchmark/catch_benchmark.hpp b/weight/_dep/Catch2/include/internal/benchmark/catch_benchmark.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..ec8dde0861f515fcf4a39e4d8b5a7aa1ac59565b
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/catch_benchmark.hpp
@@ -0,0 +1,122 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Benchmark
+#ifndef TWOBLUECUBES_CATCH_BENCHMARK_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_BENCHMARK_HPP_INCLUDED
+
+#include "../catch_config.hpp"
+#include "../catch_context.h"
+#include "../catch_interfaces_reporter.h"
+#include "../catch_test_registry.h"
+
+#include "catch_chronometer.hpp"
+#include "catch_clock.hpp"
+#include "catch_environment.hpp"
+#include "catch_execution_plan.hpp"
+#include "detail/catch_estimate_clock.hpp"
+#include "detail/catch_complete_invoke.hpp"
+#include "detail/catch_analyse.hpp"
+#include "detail/catch_benchmark_function.hpp"
+#include "detail/catch_run_for_at_least.hpp"
+
+#include
+#include
+#include
+#include
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ struct Benchmark {
+ Benchmark(std::string &&name)
+ : name(std::move(name)) {}
+
+ template
+ Benchmark(std::string &&name, FUN &&func)
+ : fun(std::move(func)), name(std::move(name)) {}
+
+ template
+ ExecutionPlan> prepare(const IConfig &cfg, Environment> env) const {
+ auto min_time = env.clock_resolution.mean * Detail::minimum_ticks;
+ auto run_time = std::max(min_time, std::chrono::duration_cast(cfg.benchmarkWarmupTime()));
+ auto&& test = Detail::run_for_at_least(std::chrono::duration_cast>(run_time), 1, fun);
+ int new_iters = static_cast(std::ceil(min_time * test.iterations / test.elapsed));
+ return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast>(cfg.benchmarkWarmupTime()), Detail::warmup_iterations };
+ }
+
+ template
+ void run() {
+ IConfigPtr cfg = getCurrentContext().getConfig();
+
+ auto env = Detail::measure_environment();
+
+ getResultCapture().benchmarkPreparing(name);
+ CATCH_TRY{
+ auto plan = user_code([&] {
+ return prepare(*cfg, env);
+ });
+
+ BenchmarkInfo info {
+ name,
+ plan.estimated_duration.count(),
+ plan.iterations_per_sample,
+ cfg->benchmarkSamples(),
+ cfg->benchmarkResamples(),
+ env.clock_resolution.mean.count(),
+ env.clock_cost.mean.count()
+ };
+
+ getResultCapture().benchmarkStarting(info);
+
+ auto samples = user_code([&] {
+ return plan.template run(*cfg, env);
+ });
+
+ auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end());
+ BenchmarkStats> stats{ info, analysis.samples, analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance };
+ getResultCapture().benchmarkEnded(stats);
+
+ } CATCH_CATCH_ALL{
+ if (translateActiveException() != Detail::benchmarkErrorMsg) // benchmark errors have been reported, otherwise rethrow.
+ std::rethrow_exception(std::current_exception());
+ }
+ }
+
+ // sets lambda to be used in fun *and* executes benchmark!
+ template ::value, int>::type = 0>
+ Benchmark & operator=(Fun func) {
+ fun = Detail::BenchmarkFunction(func);
+ run();
+ return *this;
+ }
+
+ explicit operator bool() {
+ return true;
+ }
+
+ private:
+ Detail::BenchmarkFunction fun;
+ std::string name;
+ };
+ }
+} // namespace Catch
+
+#define INTERNAL_CATCH_GET_1_ARG(arg1, arg2, ...) arg1
+#define INTERNAL_CATCH_GET_2_ARG(arg1, arg2, ...) arg2
+
+#define INTERNAL_CATCH_BENCHMARK(BenchmarkName, name, benchmarkIndex)\
+ if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \
+ BenchmarkName = [&](int benchmarkIndex)
+
+#define INTERNAL_CATCH_BENCHMARK_ADVANCED(BenchmarkName, name)\
+ if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \
+ BenchmarkName = [&]
+
+#endif // TWOBLUECUBES_CATCH_BENCHMARK_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/catch_benchmarking_all.hpp b/weight/_dep/Catch2/include/internal/benchmark/catch_benchmarking_all.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..7717f8993b381f89dd49b52a7b045b44019f4de7
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/catch_benchmarking_all.hpp
@@ -0,0 +1,29 @@
+/*
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+
+// A proxy header that includes all of the benchmarking headers to allow
+// concise include of the benchmarking features. You should prefer the
+// individual includes in standard use.
+
+#include "catch_benchmark.hpp"
+#include "catch_chronometer.hpp"
+#include "catch_clock.hpp"
+#include "catch_constructor.hpp"
+#include "catch_environment.hpp"
+#include "catch_estimate.hpp"
+#include "catch_execution_plan.hpp"
+#include "catch_optimizer.hpp"
+#include "catch_outlier_classification.hpp"
+#include "catch_sample_analysis.hpp"
+#include "detail/catch_analyse.hpp"
+#include "detail/catch_benchmark_function.hpp"
+#include "detail/catch_complete_invoke.hpp"
+#include "detail/catch_estimate_clock.hpp"
+#include "detail/catch_measure.hpp"
+#include "detail/catch_repeat.hpp"
+#include "detail/catch_run_for_at_least.hpp"
+#include "detail/catch_stats.hpp"
+#include "detail/catch_timing.hpp"
diff --git a/weight/_dep/Catch2/include/internal/benchmark/catch_chronometer.hpp b/weight/_dep/Catch2/include/internal/benchmark/catch_chronometer.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..1022017d086fe46756e0f5d8e6deb1c9dd3cdb17
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/catch_chronometer.hpp
@@ -0,0 +1,71 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// User-facing chronometer
+
+#ifndef TWOBLUECUBES_CATCH_CHRONOMETER_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_CHRONOMETER_HPP_INCLUDED
+
+#include "catch_clock.hpp"
+#include "catch_optimizer.hpp"
+#include "detail/catch_complete_invoke.hpp"
+#include "../catch_meta.hpp"
+
+namespace Catch {
+ namespace Benchmark {
+ namespace Detail {
+ struct ChronometerConcept {
+ virtual void start() = 0;
+ virtual void finish() = 0;
+ virtual ~ChronometerConcept() = default;
+ };
+ template
+ struct ChronometerModel final : public ChronometerConcept {
+ void start() override { started = Clock::now(); }
+ void finish() override { finished = Clock::now(); }
+
+ ClockDuration elapsed() const { return finished - started; }
+
+ TimePoint started;
+ TimePoint finished;
+ };
+ } // namespace Detail
+
+ struct Chronometer {
+ public:
+ template
+ void measure(Fun&& fun) { measure(std::forward(fun), is_callable()); }
+
+ int runs() const { return k; }
+
+ Chronometer(Detail::ChronometerConcept& meter, int k)
+ : impl(&meter)
+ , k(k) {}
+
+ private:
+ template
+ void measure(Fun&& fun, std::false_type) {
+ measure([&fun](int) { return fun(); }, std::true_type());
+ }
+
+ template
+ void measure(Fun&& fun, std::true_type) {
+ Detail::optimizer_barrier();
+ impl->start();
+ for (int i = 0; i < k; ++i) invoke_deoptimized(fun, i);
+ impl->finish();
+ Detail::optimizer_barrier();
+ }
+
+ Detail::ChronometerConcept* impl;
+ int k;
+ };
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_CHRONOMETER_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/catch_clock.hpp b/weight/_dep/Catch2/include/internal/benchmark/catch_clock.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..32a3e868b9661076a2c0ed00e74eb6b933e7432e
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/catch_clock.hpp
@@ -0,0 +1,40 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Clocks
+
+#ifndef TWOBLUECUBES_CATCH_CLOCK_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_CLOCK_HPP_INCLUDED
+
+#include
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ template
+ using ClockDuration = typename Clock::duration;
+ template
+ using FloatDuration = std::chrono::duration;
+
+ template
+ using TimePoint = typename Clock::time_point;
+
+ using default_clock = std::chrono::steady_clock;
+
+ template
+ struct now {
+ TimePoint operator()() const {
+ return Clock::now();
+ }
+ };
+
+ using fp_seconds = std::chrono::duration>;
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_CLOCK_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/catch_constructor.hpp b/weight/_dep/Catch2/include/internal/benchmark/catch_constructor.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..4fc04042394964868b2e67cb08a6bd0f27aaba9a
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/catch_constructor.hpp
@@ -0,0 +1,79 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Constructor and destructor helpers
+
+#ifndef TWOBLUECUBES_CATCH_CONSTRUCTOR_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_CONSTRUCTOR_HPP_INCLUDED
+
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ namespace Detail {
+ template
+ struct ObjectStorage
+ {
+ using TStorage = typename std::aligned_storage::value>::type;
+
+ ObjectStorage() : data() {}
+
+ ObjectStorage(const ObjectStorage& other)
+ {
+ new(&data) T(other.stored_object());
+ }
+
+ ObjectStorage(ObjectStorage&& other)
+ {
+ new(&data) T(std::move(other.stored_object()));
+ }
+
+ ~ObjectStorage() { destruct_on_exit(); }
+
+ template
+ void construct(Args&&... args)
+ {
+ new (&data) T(std::forward(args)...);
+ }
+
+ template
+ typename std::enable_if::type destruct()
+ {
+ stored_object().~T();
+ }
+
+ private:
+ // If this is a constructor benchmark, destruct the underlying object
+ template
+ void destruct_on_exit(typename std::enable_if::type* = 0) { destruct(); }
+ // Otherwise, don't
+ template
+ void destruct_on_exit(typename std::enable_if::type* = 0) { }
+
+ T& stored_object() {
+ return *static_cast(static_cast(&data));
+ }
+
+ T const& stored_object() const {
+ return *static_cast(static_cast(&data));
+ }
+
+
+ TStorage data;
+ };
+ }
+
+ template
+ using storage_for = Detail::ObjectStorage;
+
+ template
+ using destructable_object = Detail::ObjectStorage;
+ }
+}
+
+#endif // TWOBLUECUBES_CATCH_CONSTRUCTOR_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/catch_environment.hpp b/weight/_dep/Catch2/include/internal/benchmark/catch_environment.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..5595124987e7bdbc06f743cb924b9ecf7560dd64
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/catch_environment.hpp
@@ -0,0 +1,38 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Environment information
+
+#ifndef TWOBLUECUBES_CATCH_ENVIRONMENT_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_ENVIRONMENT_HPP_INCLUDED
+
+#include "catch_clock.hpp"
+#include "catch_outlier_classification.hpp"
+
+namespace Catch {
+ namespace Benchmark {
+ template
+ struct EnvironmentEstimate {
+ Duration mean;
+ OutlierClassification outliers;
+
+ template
+ operator EnvironmentEstimate() const {
+ return { mean, outliers };
+ }
+ };
+ template
+ struct Environment {
+ using clock_type = Clock;
+ EnvironmentEstimate> clock_resolution;
+ EnvironmentEstimate> clock_cost;
+ };
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_ENVIRONMENT_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/catch_estimate.hpp b/weight/_dep/Catch2/include/internal/benchmark/catch_estimate.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..a3c913ce69bf084888915e95d0990d33c7961d75
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/catch_estimate.hpp
@@ -0,0 +1,31 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Statistics estimates
+
+#ifndef TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED
+
+namespace Catch {
+ namespace Benchmark {
+ template
+ struct Estimate {
+ Duration point;
+ Duration lower_bound;
+ Duration upper_bound;
+ double confidence_interval;
+
+ template
+ operator Estimate() const {
+ return { point, lower_bound, upper_bound, confidence_interval };
+ }
+ };
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_ESTIMATE_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/catch_execution_plan.hpp b/weight/_dep/Catch2/include/internal/benchmark/catch_execution_plan.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..4edfa60c444706a0e0fbd570ca31d6c7c5f120a8
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/catch_execution_plan.hpp
@@ -0,0 +1,59 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Execution plan
+
+#ifndef TWOBLUECUBES_CATCH_EXECUTION_PLAN_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_EXECUTION_PLAN_HPP_INCLUDED
+
+#include "../catch_config.hpp"
+#include "catch_clock.hpp"
+#include "catch_environment.hpp"
+#include "detail/catch_benchmark_function.hpp"
+#include "detail/catch_repeat.hpp"
+#include "detail/catch_run_for_at_least.hpp"
+
+#include
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ template
+ struct ExecutionPlan {
+ int iterations_per_sample;
+ Duration estimated_duration;
+ Detail::BenchmarkFunction benchmark;
+ Duration warmup_time;
+ int warmup_iterations;
+
+ template
+ operator ExecutionPlan() const {
+ return { iterations_per_sample, estimated_duration, benchmark, warmup_time, warmup_iterations };
+ }
+
+ template
+ std::vector> run(const IConfig &cfg, Environment> env) const {
+ // warmup a bit
+ Detail::run_for_at_least(std::chrono::duration_cast>(warmup_time), warmup_iterations, Detail::repeat(now{}));
+
+ std::vector> times;
+ times.reserve(cfg.benchmarkSamples());
+ std::generate_n(std::back_inserter(times), cfg.benchmarkSamples(), [this, env] {
+ Detail::ChronometerModel model;
+ this->benchmark(Chronometer(model, iterations_per_sample));
+ auto sample_time = model.elapsed() - env.clock_cost.mean;
+ if (sample_time < FloatDuration::zero()) sample_time = FloatDuration::zero();
+ return sample_time / iterations_per_sample;
+ });
+ return times;
+ }
+ };
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_EXECUTION_PLAN_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/catch_optimizer.hpp b/weight/_dep/Catch2/include/internal/benchmark/catch_optimizer.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..bda7c6d7e94e2bb09c91f7c96f07b8f50bfcaddd
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/catch_optimizer.hpp
@@ -0,0 +1,68 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Hinting the optimizer
+
+#ifndef TWOBLUECUBES_CATCH_OPTIMIZER_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_OPTIMIZER_HPP_INCLUDED
+
+#if defined(_MSC_VER)
+# include // atomic_thread_fence
+#endif
+
+namespace Catch {
+ namespace Benchmark {
+#if defined(__GNUC__) || defined(__clang__)
+ template
+ inline void keep_memory(T* p) {
+ asm volatile("" : : "g"(p) : "memory");
+ }
+ inline void keep_memory() {
+ asm volatile("" : : : "memory");
+ }
+
+ namespace Detail {
+ inline void optimizer_barrier() { keep_memory(); }
+ } // namespace Detail
+#elif defined(_MSC_VER)
+
+#pragma optimize("", off)
+ template
+ inline void keep_memory(T* p) {
+ // thanks @milleniumbug
+ *reinterpret_cast(p) = *reinterpret_cast(p);
+ }
+ // TODO equivalent keep_memory()
+#pragma optimize("", on)
+
+ namespace Detail {
+ inline void optimizer_barrier() {
+ std::atomic_thread_fence(std::memory_order_seq_cst);
+ }
+ } // namespace Detail
+
+#endif
+
+ template
+ inline void deoptimize_value(T&& x) {
+ keep_memory(&x);
+ }
+
+ template
+ inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if::value>::type {
+ deoptimize_value(std::forward(fn) (std::forward(args...)));
+ }
+
+ template
+ inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> typename std::enable_if::value>::type {
+ std::forward(fn) (std::forward(args...));
+ }
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_OPTIMIZER_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/catch_outlier_classification.hpp b/weight/_dep/Catch2/include/internal/benchmark/catch_outlier_classification.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..66a0adf57917d59406d75698044b99e3c43e0bf0
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/catch_outlier_classification.hpp
@@ -0,0 +1,29 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Outlier information
+#ifndef TWOBLUECUBES_CATCH_OUTLIERS_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_OUTLIERS_HPP_INCLUDED
+
+namespace Catch {
+ namespace Benchmark {
+ struct OutlierClassification {
+ int samples_seen = 0;
+ int low_severe = 0; // more than 3 times IQR below Q1
+ int low_mild = 0; // 1.5 to 3 times IQR below Q1
+ int high_mild = 0; // 1.5 to 3 times IQR above Q3
+ int high_severe = 0; // more than 3 times IQR above Q3
+
+ int total() const {
+ return low_severe + low_mild + high_mild + high_severe;
+ }
+ };
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_OUTLIERS_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/catch_sample_analysis.hpp b/weight/_dep/Catch2/include/internal/benchmark/catch_sample_analysis.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..4550d0bc4e03e000e1b42d7ca3545ada093f4aad
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/catch_sample_analysis.hpp
@@ -0,0 +1,50 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Benchmark results
+
+#ifndef TWOBLUECUBES_CATCH_BENCHMARK_RESULTS_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_BENCHMARK_RESULTS_HPP_INCLUDED
+
+#include "catch_clock.hpp"
+#include "catch_estimate.hpp"
+#include "catch_outlier_classification.hpp"
+
+#include
+#include
+#include
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ template
+ struct SampleAnalysis {
+ std::vector samples;
+ Estimate mean;
+ Estimate standard_deviation;
+ OutlierClassification outliers;
+ double outlier_variance;
+
+ template
+ operator SampleAnalysis() const {
+ std::vector samples2;
+ samples2.reserve(samples.size());
+ std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](Duration d) { return Duration2(d); });
+ return {
+ std::move(samples2),
+ mean,
+ standard_deviation,
+ outliers,
+ outlier_variance,
+ };
+ }
+ };
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_BENCHMARK_RESULTS_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/detail/catch_analyse.hpp b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_analyse.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..a3becbe4d81f255e4109eecee0d5de3994a4bdec
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_analyse.hpp
@@ -0,0 +1,78 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Run and analyse one benchmark
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_ANALYSE_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_ANALYSE_HPP_INCLUDED
+
+#include "../catch_clock.hpp"
+#include "../catch_sample_analysis.hpp"
+#include "catch_stats.hpp"
+
+#include
+#include
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ namespace Detail {
+ template
+ SampleAnalysis analyse(const IConfig &cfg, Environment, Iterator first, Iterator last) {
+ if (!cfg.benchmarkNoAnalysis()) {
+ std::vector samples;
+ samples.reserve(last - first);
+ std::transform(first, last, std::back_inserter(samples), [](Duration d) { return d.count(); });
+
+ auto analysis = Catch::Benchmark::Detail::analyse_samples(cfg.benchmarkConfidenceInterval(), cfg.benchmarkResamples(), samples.begin(), samples.end());
+ auto outliers = Catch::Benchmark::Detail::classify_outliers(samples.begin(), samples.end());
+
+ auto wrap_estimate = [](Estimate e) {
+ return Estimate {
+ Duration(e.point),
+ Duration(e.lower_bound),
+ Duration(e.upper_bound),
+ e.confidence_interval,
+ };
+ };
+ std::vector samples2;
+ samples2.reserve(samples.size());
+ std::transform(samples.begin(), samples.end(), std::back_inserter(samples2), [](double d) { return Duration(d); });
+ return {
+ std::move(samples2),
+ wrap_estimate(analysis.mean),
+ wrap_estimate(analysis.standard_deviation),
+ outliers,
+ analysis.outlier_variance,
+ };
+ } else {
+ std::vector samples;
+ samples.reserve(last - first);
+
+ Duration mean = Duration(0);
+ int i = 0;
+ for (auto it = first; it < last; ++it, ++i) {
+ samples.push_back(Duration(*it));
+ mean += Duration(*it);
+ }
+ mean /= i;
+
+ return {
+ std::move(samples),
+ Estimate{mean, mean, mean, 0.0},
+ Estimate{Duration(0), Duration(0), Duration(0), 0.0},
+ OutlierClassification{},
+ 0.0
+ };
+ }
+ }
+ } // namespace Detail
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_ANALYSE_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/detail/catch_benchmark_function.hpp b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_benchmark_function.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..60c7f1d692c2a93d3bbdea7a8becdc478272e3c8
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_benchmark_function.hpp
@@ -0,0 +1,105 @@
+ /*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Dumb std::function implementation for consistent call overhead
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_BENCHMARK_FUNCTION_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_BENCHMARK_FUNCTION_HPP_INCLUDED
+
+#include "../catch_chronometer.hpp"
+#include "catch_complete_invoke.hpp"
+#include "../../catch_meta.hpp"
+
+#include
+#include
+#include
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ namespace Detail {
+ template
+ using Decay = typename std::decay::type;
+ template
+ struct is_related
+ : std::is_same, Decay> {};
+
+ /// We need to reinvent std::function because every piece of code that might add overhead
+ /// in a measurement context needs to have consistent performance characteristics so that we
+ /// can account for it in the measurement.
+ /// Implementations of std::function with optimizations that aren't always applicable, like
+ /// small buffer optimizations, are not uncommon.
+ /// This is effectively an implementation of std::function without any such optimizations;
+ /// it may be slow, but it is consistently slow.
+ struct BenchmarkFunction {
+ private:
+ struct callable {
+ virtual void call(Chronometer meter) const = 0;
+ virtual callable* clone() const = 0;
+ virtual ~callable() = default;
+ };
+ template
+ struct model : public callable {
+ model(Fun&& fun) : fun(std::move(fun)) {}
+ model(Fun const& fun) : fun(fun) {}
+
+ model* clone() const override { return new model(*this); }
+
+ void call(Chronometer meter) const override {
+ call(meter, is_callable());
+ }
+ void call(Chronometer meter, std::true_type) const {
+ fun(meter);
+ }
+ void call(Chronometer meter, std::false_type) const {
+ meter.measure(fun);
+ }
+
+ Fun fun;
+ };
+
+ struct do_nothing { void operator()() const {} };
+
+ template
+ BenchmarkFunction(model* c) : f(c) {}
+
+ public:
+ BenchmarkFunction()
+ : f(new model{ {} }) {}
+
+ template ::value, int>::type = 0>
+ BenchmarkFunction(Fun&& fun)
+ : f(new model::type>(std::forward(fun))) {}
+
+ BenchmarkFunction(BenchmarkFunction&& that)
+ : f(std::move(that.f)) {}
+
+ BenchmarkFunction(BenchmarkFunction const& that)
+ : f(that.f->clone()) {}
+
+ BenchmarkFunction& operator=(BenchmarkFunction&& that) {
+ f = std::move(that.f);
+ return *this;
+ }
+
+ BenchmarkFunction& operator=(BenchmarkFunction const& that) {
+ f.reset(that.f->clone());
+ return *this;
+ }
+
+ void operator()(Chronometer meter) const { f->call(meter); }
+
+ private:
+ std::unique_ptr f;
+ };
+ } // namespace Detail
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_BENCHMARK_FUNCTION_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..f6a083d486f1943b418cf99d980430b819229da5
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp
@@ -0,0 +1,68 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Invoke with a special case for void
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED
+
+#include "../../catch_enforce.h"
+#include "../../catch_meta.hpp"
+
+#include
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ namespace Detail {
+ template
+ struct CompleteType { using type = T; };
+ template <>
+ struct CompleteType { struct type {}; };
+
+ template
+ using CompleteType_t = typename CompleteType::type;
+
+ template
+ struct CompleteInvoker {
+ template
+ static Result invoke(Fun&& fun, Args&&... args) {
+ return std::forward(fun)(std::forward(args)...);
+ }
+ };
+ template <>
+ struct CompleteInvoker {
+ template
+ static CompleteType_t invoke(Fun&& fun, Args&&... args) {
+ std::forward(fun)(std::forward(args)...);
+ return {};
+ }
+ };
+
+ // invoke and not return void :(
+ template
+ CompleteType_t> complete_invoke(Fun&& fun, Args&&... args) {
+ return CompleteInvoker>::invoke(std::forward(fun), std::forward(args)...);
+ }
+
+ const std::string benchmarkErrorMsg = "a benchmark failed to run successfully";
+ } // namespace Detail
+
+ template
+ Detail::CompleteType_t> user_code(Fun&& fun) {
+ CATCH_TRY{
+ return Detail::complete_invoke(std::forward(fun));
+ } CATCH_CATCH_ALL{
+ getResultCapture().benchmarkFailed(translateActiveException());
+ CATCH_RUNTIME_ERROR(Detail::benchmarkErrorMsg);
+ }
+ }
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/detail/catch_estimate_clock.hpp b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_estimate_clock.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..391f5d24ce0092071a72eca5aaf81fc98920e6c2
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_estimate_clock.hpp
@@ -0,0 +1,115 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+ // Environment measurement
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_ESTIMATE_CLOCK_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_ESTIMATE_CLOCK_HPP_INCLUDED
+
+#include "../catch_clock.hpp"
+#include "../catch_environment.hpp"
+#include "catch_stats.hpp"
+#include "catch_measure.hpp"
+#include "catch_run_for_at_least.hpp"
+#include "../catch_clock.hpp"
+
+#include
+#include
+#include
+#include
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ namespace Detail {
+ template
+ std::vector resolution(int k) {
+ std::vector> times;
+ times.reserve(k + 1);
+ std::generate_n(std::back_inserter(times), k + 1, now{});
+
+ std::vector deltas;
+ deltas.reserve(k);
+ std::transform(std::next(times.begin()), times.end(), times.begin(),
+ std::back_inserter(deltas),
+ [](TimePoint a, TimePoint b) { return static_cast((a - b).count()); });
+
+ return deltas;
+ }
+
+ const auto warmup_iterations = 10000;
+ const auto warmup_time = std::chrono::milliseconds(100);
+ const auto minimum_ticks = 1000;
+ const auto warmup_seed = 10000;
+ const auto clock_resolution_estimation_time = std::chrono::milliseconds(500);
+ const auto clock_cost_estimation_time_limit = std::chrono::seconds(1);
+ const auto clock_cost_estimation_tick_limit = 100000;
+ const auto clock_cost_estimation_time = std::chrono::milliseconds(10);
+ const auto clock_cost_estimation_iterations = 10000;
+
+ template
+ int warmup() {
+ return run_for_at_least(std::chrono::duration_cast>(warmup_time), warmup_seed, &resolution)
+ .iterations;
+ }
+ template
+ EnvironmentEstimate> estimate_clock_resolution(int iterations) {
+ auto r = run_for_at_least(std::chrono::duration_cast>(clock_resolution_estimation_time), iterations, &resolution)
+ .result;
+ return {
+ FloatDuration(mean(r.begin(), r.end())),
+ classify_outliers(r.begin(), r.end()),
+ };
+ }
+ template
+ EnvironmentEstimate> estimate_clock_cost(FloatDuration resolution) {
+ auto time_limit = (std::min)(
+ resolution * clock_cost_estimation_tick_limit,
+ FloatDuration(clock_cost_estimation_time_limit));
+ auto time_clock = [](int k) {
+ return Detail::measure([k] {
+ for (int i = 0; i < k; ++i) {
+ volatile auto ignored = Clock::now();
+ (void)ignored;
+ }
+ }).elapsed;
+ };
+ time_clock(1);
+ int iters = clock_cost_estimation_iterations;
+ auto&& r = run_for_at_least(std::chrono::duration_cast>(clock_cost_estimation_time), iters, time_clock);
+ std::vector times;
+ int nsamples = static_cast(std::ceil(time_limit / r.elapsed));
+ times.reserve(nsamples);
+ std::generate_n(std::back_inserter(times), nsamples, [time_clock, &r] {
+ return static_cast((time_clock(r.iterations) / r.iterations).count());
+ });
+ return {
+ FloatDuration(mean(times.begin(), times.end())),
+ classify_outliers(times.begin(), times.end()),
+ };
+ }
+
+ template
+ Environment> measure_environment() {
+ static Environment>* env = nullptr;
+ if (env) {
+ return *env;
+ }
+
+ auto iters = Detail::warmup();
+ auto resolution = Detail::estimate_clock_resolution(iters);
+ auto cost = Detail::estimate_clock_cost(resolution.mean);
+
+ env = new Environment>{ resolution, cost };
+ return *env;
+ }
+ } // namespace Detail
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_ESTIMATE_CLOCK_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/detail/catch_measure.hpp b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_measure.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..c3bd35fab32fdeaa6ac00b0515f81b5f23304884
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_measure.hpp
@@ -0,0 +1,35 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Measure
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_MEASURE_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_MEASURE_HPP_INCLUDED
+
+#include "../catch_clock.hpp"
+#include "catch_complete_invoke.hpp"
+#include "catch_timing.hpp"
+
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ namespace Detail {
+ template
+ TimingOf measure(Fun&& fun, Args&&... args) {
+ auto start = Clock::now();
+ auto&& r = Detail::complete_invoke(fun, std::forward(args)...);
+ auto end = Clock::now();
+ auto delta = end - start;
+ return { delta, std::forward(r), 1 };
+ }
+ } // namespace Detail
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_MEASURE_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/detail/catch_repeat.hpp b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_repeat.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..ab240792b79700b6528dc565f490561fee7bf8cf
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_repeat.hpp
@@ -0,0 +1,37 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// repeat algorithm
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_REPEAT_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_REPEAT_HPP_INCLUDED
+
+#include
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ namespace Detail {
+ template
+ struct repeater {
+ void operator()(int k) const {
+ for (int i = 0; i < k; ++i) {
+ fun();
+ }
+ }
+ Fun fun;
+ };
+ template
+ repeater::type> repeat(Fun&& fun) {
+ return { std::forward(fun) };
+ }
+ } // namespace Detail
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_DETAIL_REPEAT_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..f63d2b1f85b677d3f8332b5ceaabd696de339d9a
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp
@@ -0,0 +1,65 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Run a function for a minimum amount of time
+
+#ifndef TWOBLUECUBES_CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED
+
+#include "../catch_clock.hpp"
+#include "../catch_chronometer.hpp"
+#include "catch_measure.hpp"
+#include "catch_complete_invoke.hpp"
+#include "catch_timing.hpp"
+#include "../../catch_meta.hpp"
+
+#include
+#include
+
+namespace Catch {
+ namespace Benchmark {
+ namespace Detail {
+ template
+ TimingOf measure_one(Fun&& fun, int iters, std::false_type) {
+ return Detail::measure(fun, iters);
+ }
+ template
+ TimingOf measure_one(Fun&& fun, int iters, std::true_type) {
+ Detail::ChronometerModel meter;
+ auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters));
+
+ return { meter.elapsed(), std::move(result), iters };
+ }
+
+ template
+ using run_for_at_least_argument_t = typename std::conditional::value, Chronometer, int>::type;
+
+ struct optimized_away_error : std::exception {
+ const char* what() const noexcept override {
+ return "could not measure benchmark, maybe it was optimized away";
+ }
+ };
+
+ template
+ TimingOf> run_for_at_least(ClockDuration how_long, int seed, Fun&& fun) {
+ auto iters = seed;
+ while (iters < (1 << 30)) {
+ auto&& Timing = measure_one(fun, iters, is_callable());
+
+ if (Timing.elapsed >= how_long) {
+ return { Timing.elapsed, std::move(Timing.result), iters };
+ }
+ iters *= 2;
+ }
+ Catch::throw_exception(optimized_away_error{});
+ }
+ } // namespace Detail
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // TWOBLUECUBES_CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED
diff --git a/weight/_dep/Catch2/include/internal/benchmark/detail/catch_stats.cpp b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_stats.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..dcb51b15ea41337d42383c2480d2fd76a3fdbf7b
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_stats.cpp
@@ -0,0 +1,224 @@
+/*
+ * Created by Martin on 15/06/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Statistical analysis tools
+
+#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
+
+#include "catch_stats.hpp"
+
+#include "../../catch_compiler_capabilities.h"
+
+#include
+#include
+
+
+#if defined(CATCH_CONFIG_USE_ASYNC)
+#include
+#endif
+
+namespace {
+ double erf_inv(double x) {
+ // Code accompanying the article "Approximating the erfinv function" in GPU Computing Gems, Volume 2
+ double w, p;
+
+ w = -log((1.0 - x) * (1.0 + x));
+
+ if (w < 6.250000) {
+ w = w - 3.125000;
+ p = -3.6444120640178196996e-21;
+ p = -1.685059138182016589e-19 + p * w;
+ p = 1.2858480715256400167e-18 + p * w;
+ p = 1.115787767802518096e-17 + p * w;
+ p = -1.333171662854620906e-16 + p * w;
+ p = 2.0972767875968561637e-17 + p * w;
+ p = 6.6376381343583238325e-15 + p * w;
+ p = -4.0545662729752068639e-14 + p * w;
+ p = -8.1519341976054721522e-14 + p * w;
+ p = 2.6335093153082322977e-12 + p * w;
+ p = -1.2975133253453532498e-11 + p * w;
+ p = -5.4154120542946279317e-11 + p * w;
+ p = 1.051212273321532285e-09 + p * w;
+ p = -4.1126339803469836976e-09 + p * w;
+ p = -2.9070369957882005086e-08 + p * w;
+ p = 4.2347877827932403518e-07 + p * w;
+ p = -1.3654692000834678645e-06 + p * w;
+ p = -1.3882523362786468719e-05 + p * w;
+ p = 0.0001867342080340571352 + p * w;
+ p = -0.00074070253416626697512 + p * w;
+ p = -0.0060336708714301490533 + p * w;
+ p = 0.24015818242558961693 + p * w;
+ p = 1.6536545626831027356 + p * w;
+ } else if (w < 16.000000) {
+ w = sqrt(w) - 3.250000;
+ p = 2.2137376921775787049e-09;
+ p = 9.0756561938885390979e-08 + p * w;
+ p = -2.7517406297064545428e-07 + p * w;
+ p = 1.8239629214389227755e-08 + p * w;
+ p = 1.5027403968909827627e-06 + p * w;
+ p = -4.013867526981545969e-06 + p * w;
+ p = 2.9234449089955446044e-06 + p * w;
+ p = 1.2475304481671778723e-05 + p * w;
+ p = -4.7318229009055733981e-05 + p * w;
+ p = 6.8284851459573175448e-05 + p * w;
+ p = 2.4031110387097893999e-05 + p * w;
+ p = -0.0003550375203628474796 + p * w;
+ p = 0.00095328937973738049703 + p * w;
+ p = -0.0016882755560235047313 + p * w;
+ p = 0.0024914420961078508066 + p * w;
+ p = -0.0037512085075692412107 + p * w;
+ p = 0.005370914553590063617 + p * w;
+ p = 1.0052589676941592334 + p * w;
+ p = 3.0838856104922207635 + p * w;
+ } else {
+ w = sqrt(w) - 5.000000;
+ p = -2.7109920616438573243e-11;
+ p = -2.5556418169965252055e-10 + p * w;
+ p = 1.5076572693500548083e-09 + p * w;
+ p = -3.7894654401267369937e-09 + p * w;
+ p = 7.6157012080783393804e-09 + p * w;
+ p = -1.4960026627149240478e-08 + p * w;
+ p = 2.9147953450901080826e-08 + p * w;
+ p = -6.7711997758452339498e-08 + p * w;
+ p = 2.2900482228026654717e-07 + p * w;
+ p = -9.9298272942317002539e-07 + p * w;
+ p = 4.5260625972231537039e-06 + p * w;
+ p = -1.9681778105531670567e-05 + p * w;
+ p = 7.5995277030017761139e-05 + p * w;
+ p = -0.00021503011930044477347 + p * w;
+ p = -0.00013871931833623122026 + p * w;
+ p = 1.0103004648645343977 + p * w;
+ p = 4.8499064014085844221 + p * w;
+ }
+ return p * x;
+ }
+
+ double standard_deviation(std::vector::iterator first, std::vector::iterator last) {
+ auto m = Catch::Benchmark::Detail::mean(first, last);
+ double variance = std::accumulate(first, last, 0., [m](double a, double b) {
+ double diff = b - m;
+ return a + diff * diff;
+ }) / (last - first);
+ return std::sqrt(variance);
+ }
+
+}
+
+namespace Catch {
+ namespace Benchmark {
+ namespace Detail {
+
+ double weighted_average_quantile(int k, int q, std::vector::iterator first, std::vector::iterator last) {
+ auto count = last - first;
+ double idx = (count - 1) * k / static_cast(q);
+ int j = static_cast(idx);
+ double g = idx - j;
+ std::nth_element(first, first + j, last);
+ auto xj = first[j];
+ if (g == 0) return xj;
+
+ auto xj1 = *std::min_element(first + (j + 1), last);
+ return xj + g * (xj1 - xj);
+ }
+
+
+ double erfc_inv(double x) {
+ return erf_inv(1.0 - x);
+ }
+
+ double normal_quantile(double p) {
+ static const double ROOT_TWO = std::sqrt(2.0);
+
+ double result = 0.0;
+ assert(p >= 0 && p <= 1);
+ if (p < 0 || p > 1) {
+ return result;
+ }
+
+ result = -erfc_inv(2.0 * p);
+ // result *= normal distribution standard deviation (1.0) * sqrt(2)
+ result *= /*sd * */ ROOT_TWO;
+ // result += normal disttribution mean (0)
+ return result;
+ }
+
+
+ double outlier_variance(Estimate mean, Estimate stddev, int n) {
+ double sb = stddev.point;
+ double mn = mean.point / n;
+ double mg_min = mn / 2.;
+ double sg = (std::min)(mg_min / 4., sb / std::sqrt(n));
+ double sg2 = sg * sg;
+ double sb2 = sb * sb;
+
+ auto c_max = [n, mn, sb2, sg2](double x) -> double {
+ double k = mn - x;
+ double d = k * k;
+ double nd = n * d;
+ double k0 = -n * nd;
+ double k1 = sb2 - n * sg2 + nd;
+ double det = k1 * k1 - 4 * sg2 * k0;
+ return (int)(-2. * k0 / (k1 + std::sqrt(det)));
+ };
+
+ auto var_out = [n, sb2, sg2](double c) {
+ double nc = n - c;
+ return (nc / n) * (sb2 - nc * sg2);
+ };
+
+ return (std::min)(var_out(1), var_out((std::min)(c_max(0.), c_max(mg_min)))) / sb2;
+ }
+
+
+ bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector::iterator first, std::vector::iterator last) {
+ CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
+ CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
+ static std::random_device entropy;
+ CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
+
+ auto n = static_cast(last - first); // seriously, one can't use integral types without hell in C++
+
+ auto mean = &Detail::mean::iterator>;
+ auto stddev = &standard_deviation;
+
+#if defined(CATCH_CONFIG_USE_ASYNC)
+ auto Estimate = [=](double(*f)(std::vector::iterator, std::vector::iterator)) {
+ auto seed = entropy();
+ return std::async(std::launch::async, [=] {
+ std::mt19937 rng(seed);
+ auto resampled = resample(rng, n_resamples, first, last, f);
+ return bootstrap(confidence_level, first, last, resampled, f);
+ });
+ };
+
+ auto mean_future = Estimate(mean);
+ auto stddev_future = Estimate(stddev);
+
+ auto mean_estimate = mean_future.get();
+ auto stddev_estimate = stddev_future.get();
+#else
+ auto Estimate = [=](double(*f)(std::vector::iterator, std::vector::iterator)) {
+ auto seed = entropy();
+ std::mt19937 rng(seed);
+ auto resampled = resample(rng, n_resamples, first, last, f);
+ return bootstrap(confidence_level, first, last, resampled, f);
+ };
+
+ auto mean_estimate = Estimate(mean);
+ auto stddev_estimate = Estimate(stddev);
+#endif // CATCH_USE_ASYNC
+
+ double outlier_variance = Detail::outlier_variance(mean_estimate, stddev_estimate, n);
+
+ return { mean_estimate, stddev_estimate, outlier_variance };
+ }
+ } // namespace Detail
+ } // namespace Benchmark
+} // namespace Catch
+
+#endif // CATCH_CONFIG_ENABLE_BENCHMARKING
diff --git a/weight/_dep/Catch2/include/internal/benchmark/detail/catch_stats.hpp b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_stats.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..1bcbc259b9f525615caa46bc9a00d6ad999a3a33
--- /dev/null
+++ b/weight/_dep/Catch2/include/internal/benchmark/detail/catch_stats.hpp
@@ -0,0 +1,160 @@
+/*
+ * Created by Joachim on 16/04/2019.
+ * Adapted from donated nonius code.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+// Statistical analysis tools
+
+#ifndef TWOBLUECUBES_CATCH_DETAIL_ANALYSIS_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_DETAIL_ANALYSIS_HPP_INCLUDED
+
+#include "../catch_clock.hpp"
+#include "../catch_estimate.hpp"
+#include "../catch_outlier_classification.hpp"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include