arma_config.hpp 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
  2. // Copyright 2008-2016 National ICT Australia (NICTA)
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // ------------------------------------------------------------------------
  15. //! \addtogroup arma_config
  16. //! @{
  17. struct arma_config
  18. {
  19. #if defined(ARMA_MAT_PREALLOC)
  20. static const uword mat_prealloc = (sword(ARMA_MAT_PREALLOC) > 0) ? uword(ARMA_MAT_PREALLOC) : 1;
  21. #else
  22. static const uword mat_prealloc = 16;
  23. #endif
  24. #if defined(ARMA_OPENMP_THRESHOLD)
  25. static const uword mp_threshold = (sword(ARMA_OPENMP_THRESHOLD) > 0) ? uword(ARMA_OPENMP_THRESHOLD) : 240;
  26. #else
  27. static const uword mp_threshold = 240;
  28. #endif
  29. #if defined(ARMA_OPENMP_THREADS)
  30. static const uword mp_threads = (sword(ARMA_OPENMP_THREADS) > 0) ? uword(ARMA_OPENMP_THREADS) : 10;
  31. #else
  32. static const uword mp_threads = 10;
  33. #endif
  34. #if defined(ARMA_USE_ATLAS)
  35. static const bool atlas = true;
  36. #else
  37. static const bool atlas = false;
  38. #endif
  39. #if defined(ARMA_USE_LAPACK)
  40. static const bool lapack = true;
  41. #else
  42. static const bool lapack = false;
  43. #endif
  44. #if defined(ARMA_USE_BLAS)
  45. static const bool blas = true;
  46. #else
  47. static const bool blas = false;
  48. #endif
  49. #if defined(ARMA_USE_NEWARP)
  50. static const bool newarp = true;
  51. #else
  52. static const bool newarp = false;
  53. #endif
  54. #if defined(ARMA_USE_ARPACK)
  55. static const bool arpack = true;
  56. #else
  57. static const bool arpack = false;
  58. #endif
  59. #if defined(ARMA_USE_SUPERLU)
  60. static const bool superlu = true;
  61. #else
  62. static const bool superlu = false;
  63. #endif
  64. #if defined(ARMA_USE_HDF5)
  65. static const bool hdf5 = true;
  66. #else
  67. static const bool hdf5 = false;
  68. #endif
  69. #if defined(ARMA_NO_DEBUG)
  70. static const bool debug = false;
  71. #else
  72. static const bool debug = true;
  73. #endif
  74. #if defined(ARMA_EXTRA_DEBUG)
  75. static const bool extra_debug = true;
  76. #else
  77. static const bool extra_debug = false;
  78. #endif
  79. #if defined(ARMA_GOOD_COMPILER)
  80. static const bool good_comp = true;
  81. #else
  82. static const bool good_comp = false;
  83. #endif
  84. #if ( \
  85. defined(ARMA_EXTRA_MAT_PROTO) || defined(ARMA_EXTRA_MAT_MEAT) \
  86. || defined(ARMA_EXTRA_COL_PROTO) || defined(ARMA_EXTRA_COL_MEAT) \
  87. || defined(ARMA_EXTRA_ROW_PROTO) || defined(ARMA_EXTRA_ROW_MEAT) \
  88. || defined(ARMA_EXTRA_CUBE_PROTO) || defined(ARMA_EXTRA_CUBE_MEAT) \
  89. || defined(ARMA_EXTRA_FIELD_PROTO) || defined(ARMA_EXTRA_FIELD_MEAT) \
  90. || defined(ARMA_EXTRA_SPMAT_PROTO) || defined(ARMA_EXTRA_SPMAT_MEAT) \
  91. || defined(ARMA_EXTRA_SPCOL_PROTO) || defined(ARMA_EXTRA_SPCOL_MEAT) \
  92. || defined(ARMA_EXTRA_SPROW_PROTO) || defined(ARMA_EXTRA_SPROW_MEAT) \
  93. )
  94. static const bool extra_code = true;
  95. #else
  96. static const bool extra_code = false;
  97. #endif
  98. #if defined(ARMA_USE_CXX11)
  99. static const bool cxx11 = true;
  100. #else
  101. static const bool cxx11 = false;
  102. #endif
  103. #if (defined(ARMA_USE_CXX11) && !defined(ARMA_DONT_USE_CXX11_MUTEX))
  104. static const bool cxx11_mutex = true;
  105. #else
  106. static const bool cxx11_mutex = false;
  107. #endif
  108. #if (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L))
  109. static const bool posix = true;
  110. #else
  111. static const bool posix = false;
  112. #endif
  113. #if defined(ARMA_USE_WRAPPER)
  114. static const bool wrapper = true;
  115. #else
  116. static const bool wrapper = false;
  117. #endif
  118. #if defined(ARMA_USE_OPENMP)
  119. static const bool openmp = true;
  120. #else
  121. static const bool openmp = false;
  122. #endif
  123. #if defined(ARMA_USE_FORTRAN_HIDDEN_ARGS)
  124. static const bool hidden_args = true;
  125. #else
  126. static const bool hidden_args = false;
  127. #endif
  128. };
  129. //! @}