ROOT
remotes/pull/22321/merge
Reference Guide
Loading...
Searching...
No Matches
RInferenceUtils.hxx
Go to the documentation of this file.
1
#ifndef TMVA_RINFERENCEUTILS
2
#define TMVA_RINFERENCEUTILS
3
4
#include <utility>
// std::forward, std::index_sequence
5
6
namespace
TMVA
{
7
namespace
Experimental
{
8
9
namespace
Internal
{
10
11
/// Compute helper
12
template
<
typename
I,
typename
T,
typename
F>
13
class
ComputeHelper
;
14
15
template
<std::size_t...
N
,
typename
T,
typename
F
>
16
class
ComputeHelper
<std::index_sequence<N...>, T,
F
> {
17
template
<std::
size_t
Idx>
18
using
AlwaysT = T;
19
F
fFunc;
20
21
public
:
22
ComputeHelper
(
F
&&
f
) : fFunc(std::
forward
<
F
>(
f
)) {}
23
auto
operator()(AlwaysT<N>... args) ->
decltype
(fFunc.Compute({args...})) {
24
return
fFunc.Compute({args...});
25
}
26
};
27
28
}
// namespace Internal
29
30
/// Helper to pass TMVA model to RDataFrame.Define nodes
31
template
<std::
size_t
N,
typename
T,
typename
F>
32
auto
Compute
(
F
&&
f
) ->
Internal::ComputeHelper<std::make_index_sequence<N>
, T,
F
>
33
{
34
return
Internal::ComputeHelper<std::make_index_sequence<N>
, T,
F
>(std::forward<F>(
f
));
35
}
36
37
}
// namespace Experimental
38
}
// namespace TMVA
39
40
#endif
// TMVA_RINFERENCEUTILS
f
#define f(i)
Definition
RSha256.hxx:104
N
#define N
TMVA::Experimental::Internal::ComputeHelper
Compute helper.
Definition
RInferenceUtils.hxx:13
F
#define F(x, y, z)
TMVA::DNN::forward
void forward(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData)
apply the weights (and functions) in forward direction of the DNN
Definition
NeuralNet.icc:546
TMVA::Experimental::Internal
Definition
RInferenceUtils.hxx:9
TMVA::Experimental
Definition
RFunction.hxx:11
TMVA::Experimental::Compute
auto Compute(F &&f) -> Internal::ComputeHelper< std::make_index_sequence< N >, T, F >
Helper to pass TMVA model to RDataFrame.Define nodes.
Definition
RInferenceUtils.hxx:32
TMVA
create variable transformations
Definition
GeneticMinimizer.h:22
tmva
tmva
inc
TMVA
RInferenceUtils.hxx
ROOTremotes/pull/22321/merge - Reference Guide Generated on Thu Jun 25 2026 10:46:04 (GVA Time) using Doxygen 1.13.2