forked from shibatch/sleef
-
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.
[CUDA] Include purec header from CUDA (shibatch#394)
With this patch, the pure C inline header can be included from CUDA programs along with the CUDA inline header.
- Loading branch information
Showing
27 changed files
with
238 additions
and
195 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
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
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
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
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
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
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,54 @@ | ||
// Copyright Naoki Shibata and contributors 2010 - 2021. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See accompanying file LICENSE.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#if !defined(SLEEF_GENHEADER) | ||
|
||
#if (defined(__SIZEOF_FLOAT128__) && __SIZEOF_FLOAT128__ == 16) || (defined(__linux__) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))) || (defined(__PPC64__) && defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 8) | ||
#define SLEEF_FLOAT128_IS_IEEEQP | ||
#endif | ||
|
||
#if !defined(SLEEF_FLOAT128_IS_IEEEQP) && defined(__SIZEOF_LONG_DOUBLE__) && __SIZEOF_LONG_DOUBLE__ == 16 && (defined(__aarch64__) || defined(__zarch__)) | ||
#define SLEEF_LONGDOUBLE_IS_IEEEQP | ||
#endif | ||
|
||
#if !defined(Sleef_quad_DEFINED) | ||
#define Sleef_quad_DEFINED | ||
typedef struct { uint64_t x, y; } Sleef_uint64_2t; | ||
#if defined(SLEEF_FLOAT128_IS_IEEEQP) | ||
typedef __float128 Sleef_quad; | ||
#define SLEEF_QUAD_C(x) (x ## Q) | ||
#elif defined(SLEEF_LONGDOUBLE_IS_IEEEQP) | ||
typedef long double Sleef_quad; | ||
#define SLEEF_QUAD_C(x) (x ## L) | ||
#else | ||
typedef Sleef_uint64_2t Sleef_quad; | ||
#endif | ||
#endif | ||
|
||
#else // #if !defined(SLEEF_GENHEADER) | ||
|
||
SLEEFSHARPif (defined(SLEEFXXX__SIZEOF_FLOAT128__) && SLEEFXXX__SIZEOF_FLOAT128__ == 16) || (defined(SLEEFXXX__linux__) && defined(SLEEFXXX__GNUC__) && (defined(SLEEFXXX__i386__) || defined(SLEEFXXX__x86_64__))) || (defined(SLEEFXXX__PPC64__) && defined(SLEEFXXX__GNUC__) && !defined(SLEEFXXX__clang__) && SLEEFXXX__GNUC__ >= 8) | ||
SLEEFSHARPdefine SLEEFXXXSLEEF_FLOAT128_IS_IEEEQP | ||
SLEEFSHARPendif | ||
|
||
SLEEFSHARPif !defined(SLEEFXXXSLEEF_FLOAT128_IS_IEEEQP) && defined(SLEEFXXX__SIZEOF_LONG_DOUBLE__) && SLEEFXXX__SIZEOF_LONG_DOUBLE__ == 16 && (defined(SLEEFXXX__aarch64__) || defined(SLEEFXXX__zarch__)) | ||
SLEEFSHARPdefine SLEEFXXXSLEEF_LONGDOUBLE_IS_IEEEQP | ||
SLEEFSHARPendif | ||
|
||
SLEEFSHARPif !defined(SLEEFXXXSleef_quad_DEFINED) | ||
SLEEFSHARPdefine SLEEFXXXSleef_quad_DEFINED | ||
typedef struct { uint64_t x, y; } Sleef_uint64_2t; | ||
SLEEFSHARPif defined(SLEEFXXXSLEEF_FLOAT128_IS_IEEEQP) | ||
typedef __float128 Sleef_quad; | ||
SLEEFSHARPdefine SLEEFXXXSLEEF_QUAD_C(x) (x ## Q) | ||
SLEEFSHARPelif defined(SLEEFXXXSLEEF_LONGDOUBLE_IS_IEEEQP) | ||
typedef long double Sleef_quad; | ||
SLEEFSHARPdefine SLEEFXXXSLEEF_QUAD_C(x) (x ## L) | ||
SLEEFSHARPelse | ||
typedef Sleef_uint64_2t Sleef_quad; | ||
SLEEFSHARPendif | ||
SLEEFSHARPendif | ||
|
||
#endif // #if !defined(SLEEF_GENHEADER) |
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
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
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 |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
#include <signal.h> | ||
#endif | ||
|
||
#include "quaddef.h" | ||
#include "misc.h" | ||
|
||
#if !defined(USE_INLINE_HEADER) | ||
|
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
#endif | ||
|
||
#include "sleef.h" | ||
#include "quaddef.h" | ||
#include "testerutil.h" | ||
|
||
#ifdef ENABLE_SSE2 | ||
|
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
Oops, something went wrong.