forked from AMICI-dev/AMICI
-
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
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
ThirdParty/sundials/include/sundials/sundials_types_deprecated.h
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,72 @@ | ||
/* ----------------------------------------------------------------- | ||
* SUNDIALS Copyright Start | ||
* Copyright (c) 2002-2024, Lawrence Livermore National Security | ||
* and Southern Methodist University. | ||
* All rights reserved. | ||
* | ||
* See the top-level LICENSE and NOTICE files for details. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* SUNDIALS Copyright End | ||
* ----------------------------------------------------------------- | ||
* This header file exports realtype and booleantype and a few macros | ||
* related to realtype for backwards compatibility. It is preferable | ||
* to only use the types defined in sundials_types.h . | ||
* -----------------------------------------------------------------*/ | ||
|
||
#ifndef _SUNDIALS_TYPES_DEPRECATED_H | ||
#define _SUNDIALS_TYPES_DEPRECATED_H | ||
|
||
#include <float.h> | ||
#include <stddef.h> | ||
#include <stdint.h> | ||
#include <sundials/sundials_config.h> | ||
#include <sundials/sundials_types.h> | ||
|
||
#ifdef __cplusplus /* wrapper to enable C++ usage */ | ||
extern "C" { | ||
#endif | ||
|
||
/* | ||
*------------------------------------------------------------------ | ||
* Type realtype | ||
* Macro RCONST | ||
* Constants SMALL_REAL, BIG_REAL, and UNIT_ROUNDOFF | ||
*------------------------------------------------------------------ | ||
*/ | ||
|
||
#if defined(SUNDIALS_SINGLE_PRECISION) | ||
|
||
typedef float realtype; | ||
#define RCONST(x) x##F | ||
#define BIG_REAL FLT_MAX | ||
#define SMALL_REAL FLT_MIN | ||
#define UNIT_ROUNDOFF FLT_EPSILON | ||
|
||
#elif defined(SUNDIALS_DOUBLE_PRECISION) | ||
|
||
typedef double realtype; | ||
#define RCONST(x) x | ||
#define BIG_REAL DBL_MAX | ||
#define SMALL_REAL DBL_MIN | ||
#define UNIT_ROUNDOFF DBL_EPSILON | ||
|
||
#elif defined(SUNDIALS_EXTENDED_PRECISION) | ||
|
||
typedef long double realtype; | ||
#define RCONST(x) x##L | ||
#define BIG_REAL LDBL_MAX | ||
#define SMALL_REAL LDBL_MIN | ||
#define UNIT_ROUNDOFF LDBL_EPSILON | ||
|
||
#endif | ||
|
||
#ifndef booleantype | ||
#define booleantype int | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* _SUNDIALS_TYPES_DEPRECATED_H */ |