Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cmake/modules/RootConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ if(lz4)
else()
set(haslz4compression undef)
endif()
if(clad)
set(hasclad define)
else()
set(hasclad undef)
endif()
if(cocoa)
set(hascocoa define)
else()
Expand Down
1 change: 1 addition & 0 deletions config/RConfigure.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#@hasmathmore@ R__HAS_MATHMORE /**/
#@haspthread@ R__HAS_PTHREAD /**/
#@hasxft@ R__HAS_XFT /**/
#@hasclad@ R__HAS_CLAD /**/
#@hascocoa@ R__HAS_COCOA /**/
#@hasvc@ R__HAS_VC /**/
#@hasvdt@ R__HAS_VDT /**/
Expand Down
14 changes: 8 additions & 6 deletions roofit/roofitcore/inc/RooFit/Detail/MathFuncs.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#ifndef RooFit_Detail_MathFuncs_h
#define RooFit_Detail_MathFuncs_h

#include <ROOT/RConfig.hxx> // for R__HAS_CLAD

#include <TMath.h>
#include <Math/PdfFuncMathCore.h>
#include <Math/ProbFuncMathCore.h>
Expand Down Expand Up @@ -177,9 +179,9 @@ template <typename DoubleArray>
double constraintSum(DoubleArray comp, unsigned int compSize)
{
double sum = 0;
#ifdef __CLING__
#pragma clad checkpoint loop
#endif
#if defined(__CLING__) && defined(R__HAS_CLAD)
#pragma clad checkpoint loop
#endif
for (unsigned int i = 0; i < compSize; i++) {
sum -= std::log(comp[i]);
}
Expand Down Expand Up @@ -367,9 +369,9 @@ double flexibleInterp(unsigned int code, ParamsArray params, unsigned int n, Dou
double boundary, double nominal, int doCutoff)
{
double total = nominal;
#ifdef __CLING__
#pragma clad checkpoint loop
#endif
#if defined(__CLING__) && defined(R__HAS_CLAD)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, we define __CLAD__ which probably is what we could use here.

#pragma clad checkpoint loop
#endif
for (std::size_t i = 0; i < n; ++i) {
total += flexibleInterpSingle(code, low[i], high[i], boundary, nominal, params[i], total);
}
Expand Down
Loading