13#ifndef ML_UTILS_SYSTEM_H
14#define ML_UTILS_SYSTEM_H
28#if !defined(MEVIS_TARGET)
29# error "The compiler definition MEVIS_TARGET is not set! It must specify the name of the compiled executable (without _d etc.)"
39#ifndef ML_UTILS_NAMESPACE
40#define ML_UTILS_NAMESPACE ml
46#ifndef ML_UTILS_START_NAMESPACE
47#define ML_UTILS_START_NAMESPACE namespace ML_UTILS_NAMESPACE {
51#ifndef ML_UTILS_END_NAMESPACE
52#define ML_UTILS_END_NAMESPACE }
69template<
typename T>
T mlMin(
T a,
T b){
return a < b ? a : b; }
73template<
typename T>
T mlMax(
T a,
T b){
return a > b ? a : b; }
103#include <ThirdPartyWarningsDisable.h>
105#include <ThirdPartyWarningsRestore.h>
114inline long double pow(
__int64 i,
int value) {
return pow(
static_cast<long double>(
i),
static_cast<long double>(value)); }
115inline long double pow(
unsigned __int64 i,
int value) {
return pow(
static_cast<long double>(
i),
static_cast<long double>(value)); }
116inline long double pow(
__int64 i,
float value) {
return pow(
static_cast<long double>(
i),
static_cast<long double>(value)); }
117inline long double pow(
unsigned __int64 i,
float value) {
return pow(
static_cast<long double>(
i),
static_cast<long double>(value)); }
118inline long double pow(
__int64 i,
double value) {
return pow(
static_cast<long double>(
i),
static_cast<long double>(value)); }
119inline long double pow(
unsigned __int64 i,
double value) {
return pow(
static_cast<long double>(
i),
static_cast<long double>(value)); }
120inline long double pow(
__int64 i,
long double value) {
return pow(
static_cast<long double>(
i),
static_cast<long double>(value)); }
121inline long double pow(
unsigned __int64 i,
long double value) {
return pow(
static_cast<long double>(
i),
static_cast<long double>(value)); }
133inline long double fabs(
__int64 i) {
return static_cast<long double>(
i < 0 ? -
i :
i); }
134inline long double fabs(
unsigned __int64 i) {
return static_cast<long double>(
i); }
137inline double pow (
float f,
double d ) {
return pow(
static_cast<double>(f), d); }
139inline double pow (
double d,
float f ) {
return pow(d,
static_cast<double>(f)); }
140inline double pow (
double d,
unsigned int i ) {
return pow(d,
static_cast<double>(
i)); }
141inline long double pow (
double d,
__int64 i ) {
return pow(
static_cast<long double>(d),
static_cast<long double>(
i)); }
142inline long double pow (
double d,
unsigned __int64 i ) {
return pow(
static_cast<long double>(d),
static_cast<long double>(
i)); }
143inline long double pow (
double d,
long double ld) {
return pow(
static_cast<long double>(d),
ld); }
144inline long double pow (
long double ld,
double d ) {
return pow(
ld,
static_cast<long double>(d)); }
146template <
typename T>
inline double atan (
T value) {
return atan (
static_cast<double>(value)); }
147template <
typename T>
inline double ceil (
T value) {
return ceil (
static_cast<double>(value)); }
148template <
typename T>
inline double exp (
T value) {
return exp (
static_cast<double>(value)); }
149template <
typename T>
inline double fabs (
T value) {
return fabs (
static_cast<double>(value)); }
150template <
typename T>
inline double floor(
T value) {
return floor(
static_cast<double>(value)); }
151template <
typename T>
inline double log (
T value) {
return log (
static_cast<double>(value)); }
152template <
typename T>
inline double sqrt (
T value) {
return sqrt (
static_cast<double>(value)); }
153template <
typename T>
inline double pow (
int i,
T value) {
return pow (
static_cast<double>(
i), value); }
154template <
typename T>
inline double pow (
unsigned int i,
T value) {
return pow (
static_cast<double>(
i), value); }
155template <
typename T>
inline long double pow (
__int64 i,
T value) {
return pow (
static_cast<long double>(
i),
static_cast<long double>(value)); }
156template <
typename T>
inline long double pow (
unsigned __int64 i,
T value) {
return pow (
static_cast<long double>(
i),
static_cast<long double>(value)); }
158template <
typename T>
inline double pow (
float f,
T value) {
return pow (
static_cast<double>(f), value); }
173#define ML_TYPENAME typename
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
UINT64 MLuint64
Introduce platform independent 64 bit unsigned integer type.
T mlAbs(T a)
Defines ML specific abs template since only type depended library functions exists.
T mlMax(T a, T b)
Defines ML specific max template since max template is platform dependent.
T mlMin(T a, T b)
Defines ML specific min template since min template is platform dependent.