GDAL

include_fast_float.h
1#ifndef INCLUDE_FAST_FLOAT_H
2#define INCLUDE_FAST_FLOAT_H
3
4#if defined(__GNUC__)
5#pragma GCC system_header
6#endif
7
8// Detect if there's a system fast_float library available
9#if defined(__has_include) && !defined(USE_SYSTEM_FAST_FLOAT)
10#if __has_include("fast_float/fast_float.h")
11#define USE_SYSTEM_FAST_FLOAT 1
12#endif
13#endif
14
15#ifdef __clang__
16#pragma clang attribute push( \
17 __attribute__((no_sanitize("unsigned-integer-overflow"))), \
18 apply_to = function)
19#endif
20
21#if USE_SYSTEM_FAST_FLOAT
22
23#include "fast_float/fast_float.h"
24
25#else
26
27// GDAL wrapper around fast_float to namespace it under gdal_fast_float
28// if using vendored version
29
30#define fast_float gdal_fast_float
31#include "../third_party/fast_float/fast_float.h"
32#endif
33
34#ifdef __clang__
35#pragma clang attribute pop
36#endif
37
38#endif // INCLUDE_FAST_FLOAT_H