blob: f4a1abda79afccebefd5ecb4d0db6060da176c4d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef CONTOURPY_UTIL_H
#define CONTOURPY_UTIL_H
#include "common.h"
namespace contourpy {
class Util
{
public:
static void ensure_nan_loaded();
static index_t get_max_threads();
// This is the NaN used internally and returned to calling functions. The value is taken from
// numpy rather than the standard C++ approach so that it is guaranteed to work with
// numpy.isnan(). The value is actually the same for many platforms, but this approach
// guarantees it works for all platforms that numpy supports.
//
// ensure_nan_loaded() must be called before this value is read.
static double nan;
private:
static bool _nan_loaded;
};
} // namespace contourpy
#endif // CONTOURPY_UTIL_H
|