forked from GazzolaLab/PyElastica
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
|
||
//****************************************************************************** | ||
// Includes | ||
//****************************************************************************** | ||
|
||
namespace elastica { | ||
|
||
//============================================================================ | ||
// | ||
// PARALLEL CONFIGURATION | ||
// | ||
//============================================================================ | ||
|
||
#include "Configuration/Parallel.hpp" | ||
|
||
//****************************************************************************** | ||
/*!\brief Compilation switch for TBB parallelization. | ||
* \ingroup parallel | ||
* | ||
* This compilation switch enables/disables TBB parallelization. In case TBB is | ||
* enabled during compilation, \elastica attempts to parallelize computations, | ||
* if requested by the configuration. In case no parallelization is enabled, | ||
* all computations are performed on a single compute core, even if the | ||
* configuration requests it | ||
*/ | ||
#if defined(ELASTICA_USE_SHARED_MEMORY_PARALLELIZATION) && \ | ||
defined(ELASTICA_USE_TBB) | ||
#define ELASTICA_TBB_PARALLEL_MODE 1 | ||
#else | ||
#define ELASTICA_TBB_PARALLEL_MODE 0 | ||
#endif | ||
//**************************************************************************** | ||
|
||
} // namespace elastica |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#pragma once | ||
|
||
//****************************************************************************** | ||
// Includes | ||
//****************************************************************************** | ||
#include <cstdlib> | ||
|
||
namespace elastica { | ||
|
||
//============================================================================ | ||
// | ||
// SYSTEMS CONFIGURATION | ||
// | ||
//============================================================================ | ||
|
||
#include "Configuration/Systems.hpp" | ||
|
||
namespace detail { | ||
|
||
inline bool systems_warnings_enabled() /* noexcept*/ { | ||
// if set to 0 also return true | ||
if (const char* env_v = std::getenv(ENV_ELASTICA_NO_SYSTEM_WARN)) | ||
return not bool(env_v[0]); | ||
else | ||
return true; | ||
} | ||
|
||
} // namespace detail | ||
|
||
} // namespace elastica |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
//****************************************************************************** | ||
// Includes | ||
//****************************************************************************** | ||
|
||
// Ideally the check here would include system vectorization macro checks, such | ||
// as in blaze. | ||
// But directly including blaze's vectorization also includes intrinsics headers | ||
// which we want to avoid. | ||
|
||
//****************************************************************************** | ||
/*!\brief Vectorization flag for some Elastica++ kernels | ||
* \ingroup config | ||
* | ||
* This macro enables use of vectorized kernels when available. | ||
*/ | ||
#if defined(__APPLE__) && defined(__arm64__) | ||
#define ELASTICA_USE_VECTORIZATION 0 | ||
#else | ||
#define ELASTICA_USE_VECTORIZATION BLAZE_USE_VECTORIZATION | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#pragma once | ||
|
||
//****************************************************************************** | ||
/*!\brief Major version of \elastica. | ||
* \ingroup config | ||
* | ||
* \details | ||
* This value corresponds to the major version of \elastica. For | ||
* instance, in \elastica version 3.9.0, the ELASTICA_MAJOR_VERSION corresponds | ||
* to 3. | ||
*/ | ||
#define ELASTICA_MAJOR_VERSION 0 | ||
//****************************************************************************** | ||
|
||
//****************************************************************************** | ||
/*!\brief Minor version of \elastica. | ||
* \ingroup config | ||
* | ||
* \details | ||
* This value corresponds to the minor version of \elastica. For | ||
* instance, in \elastica version 3.9.0, the ELASTICA_MINOR_VERSION corresponds | ||
* to 9. | ||
*/ | ||
#define ELASTICA_MINOR_VERSION 0 | ||
//****************************************************************************** | ||
|
||
//****************************************************************************** | ||
/*!\brief Patch version of \elastica. | ||
* \ingroup config | ||
* | ||
* \details | ||
* This value corresponds to the patch version of \elastica. For | ||
* instance, in \elastica version 3.9.0, the ELASTICA_PATCH_VERSION corresponds | ||
* to 0. | ||
*/ | ||
#define ELASTICA_PATCH_VERSION 2 | ||
//****************************************************************************** |