From bfe244a3b3f9fcd5fb1d55d18520c4194b240bb3 Mon Sep 17 00:00:00 2001 From: "M.F.B" <10900242+mfbolus@users.noreply.github.com> Date: Tue, 22 Jun 2021 21:15:22 -0700 Subject: [PATCH] Windows Compatibility Update + Minor ForceSymPD Change (#25) * added matlab functions for saving PLDS controller parameters (single and concatenated/switched systems); changed behavior of ForceSymPD * merging windows updates into mfbolus master * built updated documentation * bumped version to 0.6.2 Co-authored-by: mfbolus --- .gitignore | 3 + CMakeLists.txt | 22 +- CMakeSettings.json | 16 + cmake/Modules/Armadillo.cmake | 2 +- cmake/Modules/HDF5.cmake | 3 + cmake/Modules/MKL.cmake | 150 ++++++++ docs/404.html | 6 +- docs/acknowledgements/index.html | 27 +- ...9a68f3687608045f0f23eebeb7810c1ac57077.css | 1 + docs/categories/index.html | 27 +- .../classlds_1_1_controller/index.html | 29 +- .../api/classes/classlds_1_1_e_m/index.html | 29 +- .../api/classes/classlds_1_1_fit/index.html | 29 +- .../classes/classlds_1_1_s_s_i_d/index.html | 29 +- .../index.html | 29 +- .../classes/classlds_1_1_system/index.html | 48 ++- .../index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../classlds_1_1gaussian_1_1_fit/index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../index.html | 35 +- .../index.html | 29 +- .../classlds_1_1poisson_1_1_fit/index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../classlds_1_1poisson_1_1_system/index.html | 35 +- docs/docs/api/classes/index.html | 29 +- .../eg_glds_ctrl_8cpp-example/index.html | 29 +- .../index.html | 29 +- .../eg_plds_ctrl_8cpp-example/index.html | 29 +- .../eg_plds_est_8cpp-example/index.html | 29 +- .../index.html | 29 +- docs/docs/api/examples/index.html | 31 +- .../index.html | 29 +- .../index.html | 33 +- .../index.html | 33 +- .../index.html | 33 +- .../api/files/eg__glds__ctrl_8cpp/index.html | 29 +- .../eg__glds__du__plds__ctrl_8cpp/index.html | 29 +- .../api/files/eg__plds__ctrl_8cpp/index.html | 29 +- .../api/files/eg__plds__est_8cpp/index.html | 29 +- .../eg__plds__switched__ctrl_8cpp/index.html | 29 +- docs/docs/api/files/index.html | 29 +- docs/docs/api/files/index.xml | 6 +- docs/docs/api/files/lds_8cpp/index.html | 52 ++- docs/docs/api/files/lds_8h/index.html | 29 +- docs/docs/api/files/lds__ctrl_8h/index.html | 31 +- docs/docs/api/files/lds__fit_8h/index.html | 29 +- .../docs/api/files/lds__fit__em_8h/index.html | 29 +- .../api/files/lds__fit__ssid_8h/index.html | 29 +- .../api/files/lds__gaussian_8h/index.html | 29 +- .../files/lds__gaussian__ctrl_8h/index.html | 29 +- .../files/lds__gaussian__fit_8h/index.html | 29 +- .../lds__gaussian__fit__em_8h/index.html | 29 +- .../lds__gaussian__fit__ssid_8h/index.html | 29 +- .../files/lds__gaussian__sctrl_8h/index.html | 29 +- .../files/lds__gaussian__sys_8cpp/index.html | 29 +- .../files/lds__gaussian__sys_8h/index.html | 29 +- .../docs/api/files/lds__poisson_8h/index.html | 38 +- .../files/lds__poisson__ctrl_8h/index.html | 29 +- .../api/files/lds__poisson__fit_8h/index.html | 29 +- .../files/lds__poisson__fit__em_8h/index.html | 29 +- .../lds__poisson__fit__ssid_8h/index.html | 29 +- .../files/lds__poisson__sctrl_8h/index.html | 29 +- .../files/lds__poisson__sys_8cpp/index.html | 46 +-- .../api/files/lds__poisson__sys_8h/index.html | 39 ++- docs/docs/api/files/lds__sctrl_8h/index.html | 38 +- docs/docs/api/files/lds__sys_8cpp/index.html | 29 +- docs/docs/api/files/lds__sys_8h/index.html | 37 +- .../files/lds__uniform__mats_8h/index.html | 29 +- .../files/lds__uniform__systems_8h/index.html | 29 +- .../files/lds__uniform__vecs_8cpp/index.html | 29 +- .../files/lds__uniform__vecs_8h/index.html | 29 +- .../docs/api/files/mex__c__util_8h/index.html | 29 +- .../api/files/mex__cpp__util_8h/index.html | 29 +- .../modules/group__control__masks/index.html | 29 +- .../api/modules/group__defaults/index.html | 33 +- docs/docs/api/modules/index.html | 31 +- docs/docs/api/modules/index.xml | 2 +- docs/docs/api/namespaces/index.html | 31 +- docs/docs/api/namespaces/index.xml | 2 +- .../namespaces/namespacearmamexc/index.html | 29 +- .../namespaces/namespacearmamexcpp/index.html | 29 +- .../api/namespaces/namespacelds/index.html | 29 +- .../namespacelds_1_1gaussian/index.html | 29 +- .../namespacelds_1_1poisson/index.html | 82 ++++- .../api/namespaces/namespacestd/index.html | 33 +- docs/docs/api/pages/index.html | 31 +- .../getting-started/index.html | 247 +++++++++++++ .../getting-started/linux-macos/index.html | 328 ++++++++++++++++++ docs/docs/getting-started/windows/index.html | 262 ++++++++++++++ docs/docs/index.html | 27 +- docs/docs/index.xml | 25 +- .../terminology/control-estimation/index.html | 27 +- docs/docs/terminology/model/index.html | 27 +- .../docs/tutorials/eg_glds_control/index.html | 27 +- .../eg_plds_state_estimation/index.html | 27 +- .../eg_switched_plds_control/index.html | 27 +- docs/docs/tutorials/index.html | 27 +- ...2f66182e193934d8b0897cb7d669aea2a76c1.json | 1 + ...9a5edfd9496696a1fb6e75c14942a43f310854e.js | 10 + docs/fonts/roboto-mono-v13-latin-regular.woff | Bin 0 -> 15160 bytes .../fonts/roboto-mono-v13-latin-regular.woff2 | Bin 0 -> 12312 bytes docs/fonts/roboto-v27-latin-700.woff | Bin 0 -> 20396 bytes docs/fonts/roboto-v27-latin-700.woff2 | Bin 0 -> 15828 bytes docs/fonts/roboto-v27-latin-regular.woff | Bin 0 -> 20332 bytes docs/fonts/roboto-v27-latin-regular.woff2 | Bin 0 -> 15688 bytes docs/index.html | 28 +- docs/index.xml | 35 +- docs/issues-contributing/index.html | 27 +- docs/sitemap.xml | 10 +- docs/tags/index.html | 27 +- matlab/@PLDS/PLDS.m | 2 + matlab/@PLDS/save_params_controller.m | 37 ++ matlab/save_params_controller_cat_plds.m | 95 +++++ misc/docs-hugo/.DS_Store | Bin 6148 -> 6148 bytes .../content/docs/api/Classes/_index.md | 2 +- .../api/Classes/classlds_1_1_controller.md | 2 +- .../docs/api/Classes/classlds_1_1_e_m.md | 2 +- .../docs/api/Classes/classlds_1_1_fit.md | 2 +- .../docs/api/Classes/classlds_1_1_s_s_i_d.md | 2 +- .../classlds_1_1_switched_controller.md | 2 +- .../docs/api/Classes/classlds_1_1_system.md | 19 +- .../classlds_1_1_uniform_matrix_list.md | 2 +- .../classlds_1_1_uniform_system_list.md | 2 +- .../classlds_1_1_uniform_vector_list.md | 2 +- .../classlds_1_1gaussian_1_1_controller.md | 2 +- .../Classes/classlds_1_1gaussian_1_1_fit.md | 2 +- .../classlds_1_1gaussian_1_1_fit_e_m.md | 2 +- .../classlds_1_1gaussian_1_1_fit_s_s_i_d.md | 2 +- ...lds_1_1gaussian_1_1_switched_controller.md | 2 +- .../classlds_1_1gaussian_1_1_system.md | 5 +- .../classlds_1_1poisson_1_1_controller.md | 2 +- .../Classes/classlds_1_1poisson_1_1_fit.md | 2 +- .../classlds_1_1poisson_1_1_fit_e_m.md | 2 +- .../classlds_1_1poisson_1_1_fit_s_s_i_d.md | 2 +- ...slds_1_1poisson_1_1_switched_controller.md | 2 +- .../Classes/classlds_1_1poisson_1_1_system.md | 5 +- .../content/docs/api/Examples/_index.md | 2 +- .../api/Examples/eg_glds_ctrl_8cpp-example.md | 2 +- .../eg_glds_du_plds_ctrl_8cpp-example.md | 2 +- .../api/Examples/eg_plds_ctrl_8cpp-example.md | 2 +- .../api/Examples/eg_plds_est_8cpp-example.md | 2 +- .../eg_plds_switched_ctrl_8cpp-example.md | 2 +- .../content/docs/api/Files/_index.md | 2 +- .../dir_156a98879751e549d6939ca71a62d61f.md | 2 +- .../dir_68267d1309a1af8e8297ef4c3efbcdba.md | 2 +- .../dir_d28a4824dc47e487b107a5db32ef43c4.md | 2 +- .../dir_d44c64559bbebec7f509842c48db8b23.md | 2 +- .../docs/api/Files/eg__glds__ctrl_8cpp.md | 2 +- .../Files/eg__glds__du__plds__ctrl_8cpp.md | 2 +- .../docs/api/Files/eg__plds__ctrl_8cpp.md | 2 +- .../docs/api/Files/eg__plds__est_8cpp.md | 2 +- .../Files/eg__plds__switched__ctrl_8cpp.md | 2 +- .../content/docs/api/Files/lds_8cpp.md | 25 +- .../content/docs/api/Files/lds_8h.md | 2 +- .../content/docs/api/Files/lds__ctrl_8h.md | 4 +- .../content/docs/api/Files/lds__fit_8h.md | 2 +- .../content/docs/api/Files/lds__fit__em_8h.md | 2 +- .../docs/api/Files/lds__fit__ssid_8h.md | 2 +- .../docs/api/Files/lds__gaussian_8h.md | 2 +- .../docs/api/Files/lds__gaussian__ctrl_8h.md | 2 +- .../docs/api/Files/lds__gaussian__fit_8h.md | 2 +- .../api/Files/lds__gaussian__fit__em_8h.md | 2 +- .../api/Files/lds__gaussian__fit__ssid_8h.md | 2 +- .../docs/api/Files/lds__gaussian__sctrl_8h.md | 2 +- .../docs/api/Files/lds__gaussian__sys_8cpp.md | 2 +- .../docs/api/Files/lds__gaussian__sys_8h.md | 2 +- .../content/docs/api/Files/lds__poisson_8h.md | 9 +- .../docs/api/Files/lds__poisson__ctrl_8h.md | 2 +- .../docs/api/Files/lds__poisson__fit_8h.md | 2 +- .../api/Files/lds__poisson__fit__em_8h.md | 2 +- .../api/Files/lds__poisson__fit__ssid_8h.md | 2 +- .../docs/api/Files/lds__poisson__sctrl_8h.md | 2 +- .../docs/api/Files/lds__poisson__sys_8cpp.md | 19 +- .../docs/api/Files/lds__poisson__sys_8h.md | 12 +- .../content/docs/api/Files/lds__sctrl_8h.md | 9 +- .../content/docs/api/Files/lds__sys_8cpp.md | 2 +- .../content/docs/api/Files/lds__sys_8h.md | 10 +- .../docs/api/Files/lds__uniform__mats_8h.md | 2 +- .../api/Files/lds__uniform__systems_8h.md | 2 +- .../docs/api/Files/lds__uniform__vecs_8cpp.md | 2 +- .../docs/api/Files/lds__uniform__vecs_8h.md | 2 +- .../content/docs/api/Files/mex__c__util_8h.md | 2 +- .../docs/api/Files/mex__cpp__util_8h.md | 2 +- .../content/docs/api/Modules/_index.md | 2 +- .../docs/api/Modules/group__control__masks.md | 2 +- .../docs/api/Modules/group__defaults.md | 2 +- .../content/docs/api/Namespaces/_index.md | 2 +- .../docs/api/Namespaces/namespacearmamexc.md | 2 +- .../api/Namespaces/namespacearmamexcpp.md | 2 +- .../docs/api/Namespaces/namespacelds.md | 2 +- .../Namespaces/namespacelds_1_1gaussian.md | 2 +- .../api/Namespaces/namespacelds_1_1poisson.md | 28 +- .../docs/api/Namespaces/namespacestd.md | 2 +- .../content/docs/api/Pages/_index.md | 2 +- .../docs/getting-started/getting-started.md | 6 + .../linux-macos.md} | 10 +- .../content/docs/getting-started/windows.md | 16 + misc/docs-hugo/content/menu/index.md | 4 +- misc/docs-hugo/public/404.html | 6 +- .../public/acknowledgements/index.html | 27 +- ...9a68f3687608045f0f23eebeb7810c1ac57077.css | 1 + misc/docs-hugo/public/categories/index.html | 27 +- .../classlds_1_1_controller/index.html | 29 +- .../api/classes/classlds_1_1_e_m/index.html | 29 +- .../api/classes/classlds_1_1_fit/index.html | 29 +- .../classes/classlds_1_1_s_s_i_d/index.html | 29 +- .../index.html | 29 +- .../classes/classlds_1_1_system/index.html | 48 ++- .../index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../classlds_1_1gaussian_1_1_fit/index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../index.html | 35 +- .../index.html | 29 +- .../classlds_1_1poisson_1_1_fit/index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../index.html | 29 +- .../classlds_1_1poisson_1_1_system/index.html | 35 +- .../public/docs/api/classes/index.html | 29 +- .../eg_glds_ctrl_8cpp-example/index.html | 29 +- .../index.html | 29 +- .../eg_plds_ctrl_8cpp-example/index.html | 29 +- .../eg_plds_est_8cpp-example/index.html | 29 +- .../index.html | 29 +- .../public/docs/api/examples/index.html | 31 +- .../index.html | 29 +- .../index.html | 33 +- .../index.html | 33 +- .../index.html | 33 +- .../api/files/eg__glds__ctrl_8cpp/index.html | 29 +- .../eg__glds__du__plds__ctrl_8cpp/index.html | 29 +- .../api/files/eg__plds__ctrl_8cpp/index.html | 29 +- .../api/files/eg__plds__est_8cpp/index.html | 29 +- .../eg__plds__switched__ctrl_8cpp/index.html | 29 +- .../public/docs/api/files/index.html | 29 +- .../docs-hugo/public/docs/api/files/index.xml | 6 +- .../public/docs/api/files/lds_8cpp/index.html | 52 ++- .../public/docs/api/files/lds_8h/index.html | 29 +- .../docs/api/files/lds__ctrl_8h/index.html | 31 +- .../docs/api/files/lds__fit_8h/index.html | 29 +- .../docs/api/files/lds__fit__em_8h/index.html | 29 +- .../api/files/lds__fit__ssid_8h/index.html | 29 +- .../api/files/lds__gaussian_8h/index.html | 29 +- .../files/lds__gaussian__ctrl_8h/index.html | 29 +- .../files/lds__gaussian__fit_8h/index.html | 29 +- .../lds__gaussian__fit__em_8h/index.html | 29 +- .../lds__gaussian__fit__ssid_8h/index.html | 29 +- .../files/lds__gaussian__sctrl_8h/index.html | 29 +- .../files/lds__gaussian__sys_8cpp/index.html | 29 +- .../files/lds__gaussian__sys_8h/index.html | 29 +- .../docs/api/files/lds__poisson_8h/index.html | 38 +- .../files/lds__poisson__ctrl_8h/index.html | 29 +- .../api/files/lds__poisson__fit_8h/index.html | 29 +- .../files/lds__poisson__fit__em_8h/index.html | 29 +- .../lds__poisson__fit__ssid_8h/index.html | 29 +- .../files/lds__poisson__sctrl_8h/index.html | 29 +- .../files/lds__poisson__sys_8cpp/index.html | 46 +-- .../api/files/lds__poisson__sys_8h/index.html | 39 ++- .../docs/api/files/lds__sctrl_8h/index.html | 38 +- .../docs/api/files/lds__sys_8cpp/index.html | 29 +- .../docs/api/files/lds__sys_8h/index.html | 37 +- .../files/lds__uniform__mats_8h/index.html | 29 +- .../files/lds__uniform__systems_8h/index.html | 29 +- .../files/lds__uniform__vecs_8cpp/index.html | 29 +- .../files/lds__uniform__vecs_8h/index.html | 29 +- .../docs/api/files/mex__c__util_8h/index.html | 29 +- .../api/files/mex__cpp__util_8h/index.html | 29 +- .../modules/group__control__masks/index.html | 29 +- .../api/modules/group__defaults/index.html | 33 +- .../public/docs/api/modules/index.html | 31 +- .../public/docs/api/modules/index.xml | 2 +- .../public/docs/api/namespaces/index.html | 31 +- .../public/docs/api/namespaces/index.xml | 2 +- .../namespaces/namespacearmamexc/index.html | 29 +- .../namespaces/namespacearmamexcpp/index.html | 29 +- .../api/namespaces/namespacelds/index.html | 29 +- .../namespacelds_1_1gaussian/index.html | 29 +- .../namespacelds_1_1poisson/index.html | 82 ++++- .../api/namespaces/namespacestd/index.html | 33 +- .../public/docs/api/pages/index.html | 31 +- .../getting-started/index.html | 247 +++++++++++++ .../getting-started/linux-macos/index.html | 328 ++++++++++++++++++ .../docs/getting-started/windows/index.html | 262 ++++++++++++++ misc/docs-hugo/public/docs/index.html | 27 +- misc/docs-hugo/public/docs/index.xml | 25 +- .../terminology/control-estimation/index.html | 27 +- .../public/docs/terminology/model/index.html | 27 +- .../docs/tutorials/eg_glds_control/index.html | 27 +- .../eg_plds_state_estimation/index.html | 27 +- .../eg_switched_plds_control/index.html | 27 +- .../public/docs/tutorials/index.html | 27 +- ...2f66182e193934d8b0897cb7d669aea2a76c1.json | 1 + ...9a5edfd9496696a1fb6e75c14942a43f310854e.js | 10 + .../fonts/roboto-mono-v13-latin-regular.woff | Bin 0 -> 15160 bytes .../fonts/roboto-mono-v13-latin-regular.woff2 | Bin 0 -> 12312 bytes .../public/fonts/roboto-v27-latin-700.woff | Bin 0 -> 20396 bytes .../public/fonts/roboto-v27-latin-700.woff2 | Bin 0 -> 15828 bytes .../fonts/roboto-v27-latin-regular.woff | Bin 0 -> 20332 bytes .../fonts/roboto-v27-latin-regular.woff2 | Bin 0 -> 15688 bytes misc/docs-hugo/public/index.html | 28 +- misc/docs-hugo/public/index.xml | 35 +- .../public/issues-contributing/index.html | 27 +- misc/docs-hugo/public/sitemap.xml | 10 +- misc/docs-hugo/public/tags/index.html | 27 +- ...s_50fc8c04e12a2f59027287995557ceff.content | 2 +- ...scss_50fc8c04e12a2f59027287995557ceff.json | 2 +- misc/docs-hugo/themes/book | 2 +- src-fit/lds_gaussian_fit_ssid.cpp | 1 - src/lds.cpp | 32 +- 321 files changed, 5963 insertions(+), 2265 deletions(-) create mode 100644 CMakeSettings.json create mode 100644 cmake/Modules/MKL.cmake create mode 100644 docs/book.min.1f18e1770470f1550b743441539a68f3687608045f0f23eebeb7810c1ac57077.css create mode 100644 docs/docs/getting-started/getting-started/index.html create mode 100644 docs/docs/getting-started/linux-macos/index.html create mode 100644 docs/docs/getting-started/windows/index.html create mode 100644 docs/en.search-data.min.a50c9bac716cd692d555bfea8b62f66182e193934d8b0897cb7d669aea2a76c1.json create mode 100644 docs/en.search.min.80cd14d7c8667f450e8f403ef9a5edfd9496696a1fb6e75c14942a43f310854e.js create mode 100644 docs/fonts/roboto-mono-v13-latin-regular.woff create mode 100644 docs/fonts/roboto-mono-v13-latin-regular.woff2 create mode 100644 docs/fonts/roboto-v27-latin-700.woff create mode 100644 docs/fonts/roboto-v27-latin-700.woff2 create mode 100644 docs/fonts/roboto-v27-latin-regular.woff create mode 100644 docs/fonts/roboto-v27-latin-regular.woff2 create mode 100644 matlab/@PLDS/save_params_controller.m create mode 100644 matlab/save_params_controller_cat_plds.m create mode 100644 misc/docs-hugo/content/docs/getting-started/getting-started.md rename misc/docs-hugo/content/docs/{getting-started.md => getting-started/linux-macos.md} (89%) create mode 100644 misc/docs-hugo/content/docs/getting-started/windows.md create mode 100644 misc/docs-hugo/public/book.min.1f18e1770470f1550b743441539a68f3687608045f0f23eebeb7810c1ac57077.css create mode 100644 misc/docs-hugo/public/docs/getting-started/getting-started/index.html create mode 100644 misc/docs-hugo/public/docs/getting-started/linux-macos/index.html create mode 100644 misc/docs-hugo/public/docs/getting-started/windows/index.html create mode 100644 misc/docs-hugo/public/en.search-data.min.a50c9bac716cd692d555bfea8b62f66182e193934d8b0897cb7d669aea2a76c1.json create mode 100644 misc/docs-hugo/public/en.search.min.80cd14d7c8667f450e8f403ef9a5edfd9496696a1fb6e75c14942a43f310854e.js create mode 100644 misc/docs-hugo/public/fonts/roboto-mono-v13-latin-regular.woff create mode 100644 misc/docs-hugo/public/fonts/roboto-mono-v13-latin-regular.woff2 create mode 100644 misc/docs-hugo/public/fonts/roboto-v27-latin-700.woff create mode 100644 misc/docs-hugo/public/fonts/roboto-v27-latin-700.woff2 create mode 100644 misc/docs-hugo/public/fonts/roboto-v27-latin-regular.woff create mode 100644 misc/docs-hugo/public/fonts/roboto-v27-latin-regular.woff2 diff --git a/.gitignore b/.gitignore index 3fa09876..375ca834 100755 --- a/.gitignore +++ b/.gitignore @@ -92,7 +92,10 @@ Thumbs.db # Specific to this project # ############################ build/ +out/ cpp.sublime-workspace +.vs/ +.vscode/ .cache/ # whitelist documentation diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e3c8e92..57837a0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR) # set project name and version (MAJOR.minor.patch) -project(ldsCtrlEst VERSION 0.6.1 LANGUAGES CXX C) +project(ldsCtrlEst VERSION 0.6.2 LANGUAGES CXX C) # some name variants I will be using: set(CMAKE_PROJECT_NAME_CAP LDSCTRLEST)#all caps @@ -52,13 +52,18 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS true) # user settings: option(LDSCTRLEST_BUILD_EXAMPLES "Build the example programs." ON) -option(LDSCTRLEST_BUILD_FIT "Whether to build the fitting accessory code." OFF) +option(LDSCTRLEST_BUILD_FIT "Whether to build the fitting accessory code." ON) option(LDSCTRLEST_BUILD_STATIC "Whether to statically link library against OpenBLAS \ - and build a static version of the library." OFF) + and build a static version of the library." ON) # n.b., if both LDSCTRLEST_BUILD_FIT & LDSCTRLEST_BUILD_STATIC are enabled, # Matlab/Octave mex files will be built. +if (WIN32) + # needed to build static library + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + message(STATUS "CMAKE_SYSTEM_NAME = ${CMAKE_SYSTEM_NAME}" ) message(STATUS "CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}" ) message(STATUS "CMAKE_CXX_COMPILER_VERSION = ${CMAKE_CXX_COMPILER_VERSION}") @@ -97,11 +102,16 @@ endif() # pkg-config used for libraries that were not installed with CMake config files. # provides `pkg_check_modules` -find_package(PkgConfig REQUIRED) +find_package(PkgConfig) find_package(Doxygen COMPONENTS dot OPTIONAL_COMPONENTS mscgen dia) -if(LDSCTRLEST_BUILD_STATIC AND NOT APPLE) +# Use MKL on windows +if (WIN32) + include(MKL) +endif() + +if(LDSCTRLEST_BUILD_STATIC AND NOT APPLE AND NOT WIN32) #statically-linking against openblas in this case # OpenBLAS include(OpenBLAS) @@ -203,7 +213,7 @@ if(LDSCTRLEST_BUILD_STATIC) $) set_target_properties(${CMAKE_PROJECT_NAME}Static PROPERTIES VERSION ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH} - OUTPUT_NAME ${CMAKE_PROJECT_NAME}) + OUTPUT_NAME ${CMAKE_PROJECT_NAME}Static) endif() add_subdirectory(src) #add source files... diff --git a/CMakeSettings.json b/CMakeSettings.json new file mode 100644 index 00000000..c2d44725 --- /dev/null +++ b/CMakeSettings.json @@ -0,0 +1,16 @@ +{ + "configurations": [ + { + "name": "x64-Clang-Release", + "generator": "Ninja", + "configurationType": "RelWithDebInfo", + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "clang_cl_x64_x64" ], + "variables": [ + ] + } + ] +} \ No newline at end of file diff --git a/cmake/Modules/Armadillo.cmake b/cmake/Modules/Armadillo.cmake index 920b2ed1..1bbbc170 100644 --- a/cmake/Modules/Armadillo.cmake +++ b/cmake/Modules/Armadillo.cmake @@ -5,7 +5,7 @@ list(APPEND PROJECT_REQUIRED_INCLUDE_DIRS ${ARMADILLO_INCLUDE_DIRS}) # have made hdf5 a required dependency set(PROJECT_REQUIRED_CXX_FLAGS "${PROJECT_REQUIRED_CXX_FLAGS} -DARMA_USE_HDF5") -if (LDSCTRLEST_BUILD_STATIC AND NOT APPLE) +if ((LDSCTRLEST_BUILD_STATIC AND NOT APPLE) OR (WIN32)) message(STATUS "Not using armadillo wrapper.") set(PROJECT_REQUIRED_CXX_FLAGS "${PROJECT_REQUIRED_CXX_FLAGS} -DARMA_DONT_USE_WRAPPER") set(ARMADILLO_LIBRARIES "") diff --git a/cmake/Modules/HDF5.cmake b/cmake/Modules/HDF5.cmake index 1d028a60..d7f375b8 100644 --- a/cmake/Modules/HDF5.cmake +++ b/cmake/Modules/HDF5.cmake @@ -17,6 +17,9 @@ endif() if(HDF5_FOUND) list(APPEND PROJECT_REQUIRED_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + if (WIN32) + set(PROJECT_REQUIRED_CXX_FLAGS "${PROJECT_REQUIRED_CXX_FLAGS} -DH5_BUILT_AS_DYNAMIC_LIB") + endif() else() message(FATAL_ERROR "HDF5 was not found by cmake or pkg-config.") endif() diff --git a/cmake/Modules/MKL.cmake b/cmake/Modules/MKL.cmake new file mode 100644 index 00000000..95060e08 --- /dev/null +++ b/cmake/Modules/MKL.cmake @@ -0,0 +1,150 @@ +# MODIFED FROM ORIGINAL IN ARMADILLO LIBRARY. ALL CREDIT TO ORIGINAL AUTHORS. +# + +# - Find the MKL libraries (no includes) +# This module defines +# MKL_LIBRARIES, the libraries needed to use Intel's implementation of BLAS & LAPACK. +# MKL_FOUND, If false, do not try to use MKL. + +## the link below explains why we're linking only with mkl_rt +## https://software.intel.com/en-us/articles/a-new-linking-model-single-dynamic-library-mkl_rt-since-intel-mkl-103 + +set(MKL_NAMES ${MKL_NAMES} mkl_rt) + +# Explicitly link? +# see: https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl/link-line-advisor.html +# +#set(MKL_NAMES ${MKL_NAMES} mkl_intel_ilp64_dll) +#set(MKL_NAMES ${MKL_NAMES} mkl_intel_thread_dll) +#set(MKL_NAMES ${MKL_NAMES} mkl_core_dll) +#set(MKL_NAMES ${MKL_NAMES} libiomp5md) + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(MKL_ARCH intel64) +else() + set(MKL_ARCH ia32) +endif() + +# set(MKL_ROOT $ENV{MKLROOT} CACHE TYPE STRING) +# message(STATUS "MKL_ROOT = ${MKL_ROOT}") +# +# if(NOT MKL_ROOT) +# set(MKL_ROOT "/opt/intel/oneapi/mkl") +# message(STATUS "NOTE: Assuming MKL_ROOT = ${MKL_ROOT}") +# endif() + +set(ONEAPI_ROOT $ENV{ONEAPI_ROOT}) +message(STATUS "ONEAPI_ROOT = ${ONEAPI_ROOT}") + +if(NOT ONEAPI_ROOT) + set(ONEAPI_ROOT "/opt/intel/oneapi") + message(STATUS "NOTE: Assuming ONEAPI_ROOT = ${ONEAPI_ROOT}") +endif() + +set(MKL_ROOT "${ONEAPI_ROOT}mkl") +message(STATUS "MKL_ROOT = ${MKL_ROOT}") + +foreach (MKL_NAME ${MKL_NAMES}) + find_library(${MKL_NAME}_LIBRARY + NAMES ${MKL_NAME} + PATHS + ${CMAKE_SYSTEM_LIBRARY_PATH} + ${MKL_ROOT}/lib/${MKL_ARCH} + ${MKL_ROOT}/latest/lib/${MKL_ARCH} + ${MKL_ROOT} + /usr/lib64 + /usr/lib + /usr/local/lib64 + /usr/local/lib + /opt/intel/composerxe/lib/intel64 + /opt/intel/composerxe/lib/ia32 + /opt/intel/composerxe/lib/mkl/lib/intel64 + /opt/intel/composerxe/lib/mkl/lib/ia32 + /usr/local/intel/composerxe/lib/intel64 + /usr/local/intel/composerxe/lib/ia32 + /usr/local/intel/composerxe/lib/mkl/lib/intel64 + /usr/local/intel/composerxe/lib/mkl/lib/ia32 + /opt/intel/lib + /opt/intel/lib/intel64 + /opt/intel/lib/em64t + /opt/intel/lib/lib64 + /opt/intel/lib/ia32 + /opt/intel/mkl/lib + /opt/intel/mkl/lib/intel64 + /opt/intel/mkl/lib/em64t + /opt/intel/mkl/lib/lib64 + /opt/intel/mkl/lib/ia32 + /opt/intel/mkl/*/lib + /opt/intel/mkl/*/lib/intel64 + /opt/intel/mkl/*/lib/em64t + /opt/intel/mkl/*/lib/lib64 + /opt/intel/mkl/*/lib/32 + /opt/intel/*/mkl/lib + /opt/intel/*/mkl/lib/intel64 + /opt/intel/*/mkl/lib/em64t + /opt/intel/*/mkl/lib/lib64 + /opt/intel/*/mkl/lib/ia32 + /opt/mkl/lib + /opt/mkl/lib/intel64 + /opt/mkl/lib/em64t + /opt/mkl/lib/lib64 + /opt/mkl/lib/ia32 + /opt/mkl/*/lib + /opt/mkl/*/lib/intel64 + /opt/mkl/*/lib/em64t + /opt/mkl/*/lib/lib64 + /opt/mkl/*/lib/32 + /usr/local/intel/lib + /usr/local/intel/lib/intel64 + /usr/local/intel/lib/em64t + /usr/local/intel/lib/lib64 + /usr/local/intel/lib/ia32 + /usr/local/intel/mkl/lib + /usr/local/intel/mkl/lib/intel64 + /usr/local/intel/mkl/lib/em64t + /usr/local/intel/mkl/lib/lib64 + /usr/local/intel/mkl/lib/ia32 + /usr/local/intel/mkl/*/lib + /usr/local/intel/mkl/*/lib/intel64 + /usr/local/intel/mkl/*/lib/em64t + /usr/local/intel/mkl/*/lib/lib64 + /usr/local/intel/mkl/*/lib/32 + /usr/local/intel/*/mkl/lib + /usr/local/intel/*/mkl/lib/intel64 + /usr/local/intel/*/mkl/lib/em64t + /usr/local/intel/*/mkl/lib/lib64 + /usr/local/intel/*/mkl/lib/ia32 + /usr/local/mkl/lib + /usr/local/mkl/lib/intel64 + /usr/local/mkl/lib/em64t + /usr/local/mkl/lib/lib64 + /usr/local/mkl/lib/ia32 + /usr/local/mkl/*/lib + /usr/local/mkl/*/lib/intel64 + /usr/local/mkl/*/lib/em64t + /usr/local/mkl/*/lib/lib64 + /usr/local/mkl/*/lib/32 + ) + + set(TMP_LIBRARY ${${MKL_NAME}_LIBRARY}) + + if(TMP_LIBRARY) + set(MKL_LIBRARIES ${MKL_LIBRARIES} ${TMP_LIBRARY}) + endif() +endforeach() + +if(MKL_LIBRARIES) + set(MKL_FOUND "YES") +else() + set(MKL_FOUND "NO") +endif() + +if(MKL_FOUND) +# Add for linked libs commented above: -DMKL_ILP64 + set(PROJECT_REQUIRED_CXX_FLAGS "${PROJECT_REQUIRED_CXX_FLAGS} -DARMA_USE_LAPACK -DARMA_USE_BLAS") + list(APPEND PROJECT_REQUIRED_LIBRARIES_ABSOLUTE_NAME ${MKL_LIBRARIES}) + message(STATUS "Found MKL libraries: ${MKL_LIBRARIES}") +else() + message(FATAL_ERROR "Could not find MKL libraries") +endif() + diff --git a/docs/404.html b/docs/404.html index 8a3cb994..dbf9492c 100644 --- a/docs/404.html +++ b/docs/404.html @@ -13,13 +13,13 @@ 404 Page not found | LDS C&E - - + + + -