1 // SPDX-License-Identifier: Apache-2.0 2 // 3 // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au) 4 // Copyright 2008-2016 National ICT Australia (NICTA) 5 // 6 // Licensed under the Apache License, Version 2.0 (the "License"); 7 // you may not use this file except in compliance with the License. 8 // You may obtain a copy of the License at 9 // http://www.apache.org/licenses/LICENSE-2.0 10 // 11 // Unless required by applicable law or agreed to in writing, software 12 // distributed under the License is distributed on an "AS IS" BASIS, 13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 // See the License for the specific language governing permissions and 15 // limitations under the License. 16 // ------------------------------------------------------------------------ 17 18 19 //! \addtogroup arma_config 20 //! @{ 21 22 23 24 struct arma_config 25 { 26 #if defined(ARMA_MAT_PREALLOC) 27 static constexpr uword mat_prealloc = (sword(ARMA_MAT_PREALLOC) > 0) ? uword(ARMA_MAT_PREALLOC) : 1; 28 #else 29 static constexpr uword mat_prealloc = 16; 30 #endif 31 32 33 #if defined(ARMA_OPENMP_THRESHOLD) 34 static constexpr uword mp_threshold = (sword(ARMA_OPENMP_THRESHOLD) > 0) ? uword(ARMA_OPENMP_THRESHOLD) : 320; 35 #else 36 static constexpr uword mp_threshold = 320; 37 #endif 38 39 40 #if defined(ARMA_OPENMP_THREADS) 41 static constexpr uword mp_threads = (sword(ARMA_OPENMP_THREADS) > 0) ? uword(ARMA_OPENMP_THREADS) : 8; 42 #else 43 static constexpr uword mp_threads = 8; 44 #endif 45 46 47 #if defined(ARMA_USE_ATLAS) 48 static constexpr bool atlas = true; 49 #else 50 static constexpr bool atlas = false; 51 #endif 52 53 54 #if defined(ARMA_USE_LAPACK) 55 static constexpr bool lapack = true; 56 #else 57 static constexpr bool lapack = false; 58 #endif 59 60 61 #if defined(ARMA_USE_BLAS) 62 static constexpr bool blas = true; 63 #else 64 static constexpr bool blas = false; 65 #endif 66 67 68 #if defined(ARMA_USE_NEWARP) 69 static constexpr bool newarp = true; 70 #else 71 static constexpr bool newarp = false; 72 #endif 73 74 75 #if defined(ARMA_USE_ARPACK) 76 static constexpr bool arpack = true; 77 #else 78 static constexpr bool arpack = false; 79 #endif 80 81 82 #if defined(ARMA_USE_SUPERLU) 83 static constexpr bool superlu = true; 84 #else 85 static constexpr bool superlu = false; 86 #endif 87 88 89 #if defined(ARMA_USE_HDF5) 90 static constexpr bool hdf5 = true; 91 #else 92 static constexpr bool hdf5 = false; 93 #endif 94 95 96 #if defined(ARMA_NO_DEBUG) 97 static constexpr bool debug = false; 98 #else 99 static constexpr bool debug = true; 100 #endif 101 102 103 #if defined(ARMA_EXTRA_DEBUG) 104 static constexpr bool extra_debug = true; 105 #else 106 static constexpr bool extra_debug = false; 107 #endif 108 109 110 #if defined(ARMA_GOOD_COMPILER) 111 static constexpr bool good_comp = true; 112 #else 113 static constexpr bool good_comp = false; 114 #endif 115 116 117 #if ( \ 118 defined(ARMA_EXTRA_MAT_PROTO) || defined(ARMA_EXTRA_MAT_MEAT) \ 119 || defined(ARMA_EXTRA_COL_PROTO) || defined(ARMA_EXTRA_COL_MEAT) \ 120 || defined(ARMA_EXTRA_ROW_PROTO) || defined(ARMA_EXTRA_ROW_MEAT) \ 121 || defined(ARMA_EXTRA_CUBE_PROTO) || defined(ARMA_EXTRA_CUBE_MEAT) \ 122 || defined(ARMA_EXTRA_FIELD_PROTO) || defined(ARMA_EXTRA_FIELD_MEAT) \ 123 || defined(ARMA_EXTRA_SPMAT_PROTO) || defined(ARMA_EXTRA_SPMAT_MEAT) \ 124 || defined(ARMA_EXTRA_SPCOL_PROTO) || defined(ARMA_EXTRA_SPCOL_MEAT) \ 125 || defined(ARMA_EXTRA_SPROW_PROTO) || defined(ARMA_EXTRA_SPROW_MEAT) \ 126 || defined(ARMA_ALIEN_MEM_ALLOC_FUNCTION) \ 127 || defined(ARMA_ALIEN_MEM_FREE_FUNCTION) \ 128 ) 129 static constexpr bool extra_code = true; 130 #else 131 static constexpr bool extra_code = false; 132 #endif 133 134 135 #if defined(ARMA_HAVE_CXX14) 136 static constexpr bool cxx14 = true; 137 #else 138 static constexpr bool cxx14 = false; 139 #endif 140 141 142 #if defined(ARMA_HAVE_CXX17) 143 static constexpr bool cxx17 = true; 144 #else 145 static constexpr bool cxx17 = false; 146 #endif 147 148 149 #if (!defined(ARMA_DONT_USE_STD_MUTEX)) 150 static constexpr bool std_mutex = true; 151 #else 152 static constexpr bool std_mutex = false; 153 #endif 154 155 156 #if (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) 157 static constexpr bool posix = true; 158 #else 159 static constexpr bool posix = false; 160 #endif 161 162 163 #if defined(ARMA_USE_WRAPPER) 164 static constexpr bool wrapper = true; 165 #else 166 static constexpr bool wrapper = false; 167 #endif 168 169 170 #if defined(ARMA_USE_OPENMP) 171 static constexpr bool openmp = true; 172 #else 173 static constexpr bool openmp = false; 174 #endif 175 176 177 #if defined(ARMA_USE_FORTRAN_HIDDEN_ARGS) 178 static constexpr bool hidden_args = true; 179 #else 180 static constexpr bool hidden_args = false; 181 #endif 182 183 184 static constexpr uword warn_level = (sword(ARMA_WARN_LEVEL) > 0) ? uword(ARMA_WARN_LEVEL) : 0; 185 }; 186 187 188 189 //! @} 190