Revision 615d6aaa209c0f859eb29cbcc75826b34be26268 authored by Christoph Lehmann on 29 September 2023, 05:32:53 UTC, committed by Christoph Lehmann on 29 September 2023, 05:32:53 UTC
Renamed tag <is_linear> to <linear> See merge request ogs/ogs!4747
DisableFPE.h
/**
* \file
* \copyright
* Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#if !defined(_WIN32) && !defined(__APPLE__)
#include <cfenv>
class DisableFPE
{
public:
DisableFPE()
{
fegetenv(&fe_env); // Store floating-point exception handling.
fesetenv(FE_DFL_ENV); // Set default environment effectively disabling
// exceptions.
}
~DisableFPE()
{
fesetenv(&fe_env); // Restore floating-point exception handling.
}
private:
fenv_t fe_env;
};
#else
// No-op for Windows and Apple
class DisableFPE
{
};
#endif
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...