ROOT
v6-22
Reference Guide
RooVDTHeaders.h
Go to the documentation of this file.
1
// Author: Stephan Hageboeck, CERN 2 Sep 2019
2
3
/*****************************************************************************
4
* RooFit
5
* Authors: *
6
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8
* *
9
* Copyright (c) 2000-2019, Regents of the University of California *
10
* and Stanford University. All rights reserved. *
11
* *
12
* Redistribution and use in source and binary forms, *
13
* with or without modification, are permitted according to the terms *
14
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15
*****************************************************************************/
16
17
#ifndef ROOFIT_ROOFITCORE_ROOVDTHEADERS_H_
18
#define ROOFIT_ROOFITCORE_ROOVDTHEADERS_H_
19
20
/**
21
* VDT headers for RooFit. Since RooFit cannot directly depend on VDT (it might not be available),
22
* this layer can be used to switch between different implementations.
23
*/
24
25
#include "
ROOT/RConfig.hxx
"
26
27
#if defined(R__HAS_VDT)
28
#include "vdt/exp.h"
29
#include "vdt/log.h"
30
#include "vdt/sqrt.h"
31
32
inline
double
_rf_fast_exp
(
double
x
) {
33
return
vdt::fast_exp(
x
);
34
}
35
36
inline
double
_rf_fast_log
(
double
x
) {
37
return
vdt::fast_log(
x
);
38
}
39
40
inline
double
_rf_fast_isqrt
(
double
x
) {
41
return
vdt::fast_isqrt(
x
);
42
}
43
44
#else
45
#include <cmath>
46
47
inline
double
_rf_fast_exp
(
double
x
) {
48
return
std::exp
(
x
);
49
}
50
51
inline
double
_rf_fast_log
(
double
x
) {
52
return
std::log
(
x
);
53
}
54
55
inline
double
_rf_fast_isqrt
(
double
x
) {
56
return
1/
std::sqrt
(
x
);
57
}
58
59
#endif
60
61
62
#endif
/* ROOFIT_ROOFITCORE_ROOVDTHEADERS_H_ */
RConfig.hxx
_rf_fast_exp
double _rf_fast_exp(double x)
VDT headers for RooFit.
Definition:
RooVDTHeaders.h:47
_rf_fast_log
double _rf_fast_log(double x)
Definition:
RooVDTHeaders.h:51
_rf_fast_isqrt
double _rf_fast_isqrt(double x)
Definition:
RooVDTHeaders.h:55
sqrt
double sqrt(double)
exp
double exp(double)
log
double log(double)
x
Double_t x[n]
Definition:
legend1.C:17
roofit
roofitcore
inc
RooVDTHeaders.h
ROOT v6-22 - Reference Guide Generated on Fri Apr 1 2022 11:52:43 (GVA Time) using Doxygen 1.9.4