mirror of
https://github.com/DrasLorus/HLS_arbitrary_Precision_Types.git
synced 2024-07-06 14:35:18 +02:00
ap_common.h: move decl of half to front, too
This commit is contained in:
parent
7e637dcd71
commit
81f1c748b0
|
@ -22,6 +22,21 @@
|
||||||
// Forward declaration of all AP types.
|
// Forward declaration of all AP types.
|
||||||
#include <ap_decl.h>
|
#include <ap_decl.h>
|
||||||
|
|
||||||
|
// TODO Undefine in open-source release.
|
||||||
|
#define _AP_ENABLE_HALF_ 1
|
||||||
|
|
||||||
|
#ifdef _AP_ENABLE_HALF_
|
||||||
|
// Before ap_private definition.
|
||||||
|
#ifdef __SYNTHESIS__
|
||||||
|
#define _HLS_HALF_DEFINED_
|
||||||
|
typedef __fp16 half;
|
||||||
|
#else
|
||||||
|
class half;
|
||||||
|
#endif // __SYNTHESIS__
|
||||||
|
#endif // _AP_ENABLE_HALF_
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
// Macro functions
|
// Macro functions
|
||||||
#define AP_MAX(a, b) ((a) > (b) ? (a) : (b))
|
#define AP_MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||||
#define AP_MIN(a, b) ((a) < (b) ? (a) : (b))
|
#define AP_MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||||
|
@ -560,18 +575,6 @@ static inline unsigned char guess_radix(const char* s) {
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
#ifdef _AP_ENABLE_HALF_
|
|
||||||
// Before ap_private definition.
|
|
||||||
#ifdef __SYNTHESIS__
|
|
||||||
#define _HLS_HALF_DEFINED_
|
|
||||||
typedef __fp16 half;
|
|
||||||
#else
|
|
||||||
class half;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
// Basic integral struct upon which ap_int and ap_fixed are defined.
|
// Basic integral struct upon which ap_int and ap_fixed are defined.
|
||||||
#ifdef __SYNTHESIS__
|
#ifdef __SYNTHESIS__
|
||||||
// Use ssdm_int, a compiler dependent, attribute constrained integeral type as
|
// Use ssdm_int, a compiler dependent, attribute constrained integeral type as
|
||||||
|
|
Loading…
Reference in a new issue