KSeExpr 6.0.0.0
Utils.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2020 L. E. Segovia <amy@amyspark.me>
2// SPDX-License-Identifier: GPL-3.0-or-later
3
4#include <cfloat>
5#include <cmath>
6#include <cstdint>
7#include <stdexcept>
8#include <string>
9
10#include "ExprConfig.h"
11
12#if defined(KSeExpr_HAVE_DYNAMIC_DISPATCH)
13// Enable SSE4.1 functions only with automagic dynamic dispatch available.
14#include <smmintrin.h>
15#define KSeExpr_DEFAULT [[gnu::target("default")]]
16#define KSeExpr_SSE41 [[gnu::target("sse4.1")]]
17#else
18#define KSeExpr_DEFAULT
19#endif
20
21namespace KSeExpr
22{
23namespace Utils
24{
25double_t atof(const char *num);
26double_t atof(const std::string &num);
27int32_t strtol(const char *num);
28int32_t strtol(const std::string &num);
31
32#if defined(KSeExpr_HAVE_DYNAMIC_DISPATCH)
35#endif
36} // namespace Utils
37} // namespace KSeExpr
#define KSeExpr_DEFAULT
Definition Utils.h:18
KSeExpr_DEFAULT double_t round(double_t val)
Definition Utils.cpp:163
KSeExpr_DEFAULT double_t floor(double_t val)
Definition Utils.cpp:168
int32_t strtol(const char *num)
double_t atof(const char *num)
Definition Utils.cpp:51