ROOT
master
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_BATCHCOMPUTE_ROOVDTHEADERS_H
18
#define ROOFIT_BATCHCOMPUTE_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
26
#if defined(R__HAS_VDT)
27
#include "vdt/exp.h"
28
#include "vdt/log.h"
29
#include "vdt/sqrt.h"
30
31
namespace
RooBatchCompute
{
32
33
inline
double
fast_exp
(
double
x
) {
34
return
vdt::fast_exp
(
x
);
35
}
36
37
inline
double
fast_log
(
double
x
) {
38
return
vdt::fast_log
(
x
);
39
}
40
41
inline
double
fast_isqrt
(
double
x
) {
42
return
vdt::fast_isqrt
(
x
);
43
}
44
45
}
46
47
#else
48
#include <cmath>
49
50
namespace
RooBatchCompute
{
51
52
inline
double
fast_exp
(
double
x
) {
53
return
std::exp
(
x
);
54
}
55
56
inline
double
fast_log
(
double
x
) {
57
return
std::log
(
x
);
58
}
59
60
inline
double
fast_isqrt
(
double
x
) {
61
return
1/
std::sqrt
(
x
);
62
}
63
64
}
65
66
#endif
67
68
69
#endif
/* ROOFIT_BATCHCOMPUTE_ROOVDTHEADERS_H_ */
exp
double exp(double)
log
double log(double)
x
Double_t x[n]
Definition:
legend1.C:17
sqrt
double sqrt(double)
RooBatchCompute
VDT headers for RooFit.
Definition:
BracketAdapter.h:24
RooBatchCompute::fast_isqrt
double fast_isqrt(double x)
Definition:
RooVDTHeaders.h:60
RooBatchCompute::fast_log
double fast_log(double x)
Definition:
RooVDTHeaders.h:56
RooBatchCompute::fast_exp
double fast_exp(double x)
Definition:
RooVDTHeaders.h:52
roofit
batchcompute
inc
RooVDTHeaders.h
ROOT master - Reference Guide Generated on Thu Feb 25 2021 12:01:09 (GVA Time) using Doxygen 1.9.0