From 4fbb1430a0e56d90bcadb732351495faf524202b Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Wed, 16 Oct 2024 14:47:01 +0200 Subject: [PATCH 1/3] Update meta.yaml --- conda.recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index d23a8aa5..0b17f0c7 100755 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -33,7 +33,7 @@ requirements: - liblapack * *openblas # [not win] - libblas * *netlib # [win] - liblapack * *netlib # [win] - - armadillo + - armadillo >=12.6 - carma - llvm-openmp - ninja From 1deb8dc7a5a3eb549ff0964830f5f3670d5ef4dd Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Wed, 16 Oct 2024 14:47:14 +0200 Subject: [PATCH 2/3] update FTensor --- include/simcoon/FTensor.hpp | 1 + include/simcoon/FTensor/Christof/Christof_pointer.hpp | 3 +-- include/simcoon/FTensor/Ddg/Ddg_pointer.hpp | 4 ++-- include/simcoon/FTensor/Dg/Dg_pointer.hpp | 3 +-- include/simcoon/FTensor/Tensor0.hpp | 2 +- include/simcoon/FTensor/Tensor1/Tensor1_pointer.hpp | 2 +- include/simcoon/FTensor/Tensor2/Tensor2_pointer.hpp | 2 +- .../FTensor/Tensor2_symmetric/Tensor2_symmetric_pointer.hpp | 2 +- .../Tensor3_antisymmetric/Tensor3_antisymmetric_pointer.hpp | 3 +-- 9 files changed, 10 insertions(+), 12 deletions(-) diff --git a/include/simcoon/FTensor.hpp b/include/simcoon/FTensor.hpp index 25e9301c..854d8da6 100644 --- a/include/simcoon/FTensor.hpp +++ b/include/simcoon/FTensor.hpp @@ -2,6 +2,7 @@ in namespace FTensor. */ #pragma once + #include #include #include diff --git a/include/simcoon/FTensor/Christof/Christof_pointer.hpp b/include/simcoon/FTensor/Christof/Christof_pointer.hpp index 37fcbe08..60bee2b0 100644 --- a/include/simcoon/FTensor/Christof/Christof_pointer.hpp +++ b/include/simcoon/FTensor/Christof/Christof_pointer.hpp @@ -9,8 +9,7 @@ namespace FTensor template class Christof { - mutable T *restrict - data[Tensor_Dim0][(Tensor_Dim12 * (Tensor_Dim12 + 1)) / 2]; + mutable T *data[Tensor_Dim0][(Tensor_Dim12 * (Tensor_Dim12 + 1)) / 2]; public: template Christof(U *... d) : data{d...} diff --git a/include/simcoon/FTensor/Ddg/Ddg_pointer.hpp b/include/simcoon/FTensor/Ddg/Ddg_pointer.hpp index 60c14802..659fd159 100644 --- a/include/simcoon/FTensor/Ddg/Ddg_pointer.hpp +++ b/include/simcoon/FTensor/Ddg/Ddg_pointer.hpp @@ -7,8 +7,8 @@ namespace FTensor template class Ddg { - mutable T *restrict data[(Tensor_Dim01 * (Tensor_Dim01 + 1)) / 2] - [(Tensor_Dim23 * (Tensor_Dim23 + 1)) / 2]; + mutable T *data[(Tensor_Dim01 * (Tensor_Dim01 + 1)) / 2] + [(Tensor_Dim23 * (Tensor_Dim23 + 1)) / 2]; public: /* There are two operator(int,int,int,int)'s, one for non-consts diff --git a/include/simcoon/FTensor/Dg/Dg_pointer.hpp b/include/simcoon/FTensor/Dg/Dg_pointer.hpp index cb2cbea1..78402909 100644 --- a/include/simcoon/FTensor/Dg/Dg_pointer.hpp +++ b/include/simcoon/FTensor/Dg/Dg_pointer.hpp @@ -7,8 +7,7 @@ namespace FTensor template class Dg { - mutable T *restrict - data[(Tensor_Dim01 * (Tensor_Dim01 + 1)) / 2][Tensor_Dim2]; + mutable T *data[(Tensor_Dim01 * (Tensor_Dim01 + 1)) / 2][Tensor_Dim2]; public: template Dg(U *... d) : data{d...} diff --git a/include/simcoon/FTensor/Tensor0.hpp b/include/simcoon/FTensor/Tensor0.hpp index e48eb401..dff52be9 100644 --- a/include/simcoon/FTensor/Tensor0.hpp +++ b/include/simcoon/FTensor/Tensor0.hpp @@ -18,7 +18,7 @@ namespace FTensor template class Tensor0 { - mutable T *restrict data; + mutable T *data; public: Tensor0(T *d) : data(d) {} diff --git a/include/simcoon/FTensor/Tensor1/Tensor1_pointer.hpp b/include/simcoon/FTensor/Tensor1/Tensor1_pointer.hpp index 8e2a249f..5b76a7ac 100644 --- a/include/simcoon/FTensor/Tensor1/Tensor1_pointer.hpp +++ b/include/simcoon/FTensor/Tensor1/Tensor1_pointer.hpp @@ -10,7 +10,7 @@ namespace FTensor /* Note that the T *'s are mutable, so the pointer can change, allowing iterating over a array. */ - mutable T *restrict data[Tensor_Dim]; + mutable T *data[Tensor_Dim]; public: /* Initializations for varying numbers of elements. */ diff --git a/include/simcoon/FTensor/Tensor2/Tensor2_pointer.hpp b/include/simcoon/FTensor/Tensor2/Tensor2_pointer.hpp index c5d62430..b09f3d3a 100644 --- a/include/simcoon/FTensor/Tensor2/Tensor2_pointer.hpp +++ b/include/simcoon/FTensor/Tensor2/Tensor2_pointer.hpp @@ -7,7 +7,7 @@ namespace FTensor template class Tensor2 { - mutable T *restrict data[Tensor_Dim0][Tensor_Dim1]; + mutable T *data[Tensor_Dim0][Tensor_Dim1]; public: /* Initializations for varying numbers of elements. */ diff --git a/include/simcoon/FTensor/Tensor2_symmetric/Tensor2_symmetric_pointer.hpp b/include/simcoon/FTensor/Tensor2_symmetric/Tensor2_symmetric_pointer.hpp index 96a59064..5d20e475 100644 --- a/include/simcoon/FTensor/Tensor2_symmetric/Tensor2_symmetric_pointer.hpp +++ b/include/simcoon/FTensor/Tensor2_symmetric/Tensor2_symmetric_pointer.hpp @@ -6,7 +6,7 @@ namespace FTensor { template class Tensor2_symmetric { - mutable T *restrict data[(Tensor_Dim * (Tensor_Dim + 1)) / 2]; + mutable T *data[(Tensor_Dim * (Tensor_Dim + 1)) / 2]; public: template Tensor2_symmetric(U *... d) : data{d...} diff --git a/include/simcoon/FTensor/Tensor3_antisymmetric/Tensor3_antisymmetric_pointer.hpp b/include/simcoon/FTensor/Tensor3_antisymmetric/Tensor3_antisymmetric_pointer.hpp index 4a4473da..9b279286 100644 --- a/include/simcoon/FTensor/Tensor3_antisymmetric/Tensor3_antisymmetric_pointer.hpp +++ b/include/simcoon/FTensor/Tensor3_antisymmetric/Tensor3_antisymmetric_pointer.hpp @@ -7,8 +7,7 @@ namespace FTensor template class Tensor3_antisymmetric { - mutable T *restrict - data[Tensor_Dim0][(Tensor_Dim12 * (Tensor_Dim12 - 1)) / 2]; + mutable T *data[Tensor_Dim0][(Tensor_Dim12 * (Tensor_Dim12 - 1)) / 2]; public: template Tensor3_antisymmetric(U *... d) : data{d...} From b27c7b99096d31a202bb4f998cf8aebb785e672b Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Wed, 16 Oct 2024 15:08:25 +0200 Subject: [PATCH 3/3] Update CMakeLists.txt --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c79df83..491f7c5a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,11 +111,11 @@ else() enable_language(Fortran) if (DEBUG) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++ -O0 -Drestrict=") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++ -O0 -fpermissive -Drestrict=") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -std=c++17 -stdlib=libc++") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -std=c++17 -stdlib=libc++") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++ -O3 -Drestrict=") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++ -O3 -fpermissive -Drestrict=") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -std=c++17 -stdlib=libc++") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -std=c++17 -stdlib=libc++") endif()