-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmlinference.h
62 lines (48 loc) · 1.41 KB
/
mlinference.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
This software is Copyright by the Board of Trustees of Michigan
State University (c) Copyright 2017.
You may use this software under the terms of the GNU public license
(GPL). The terms of this license are described at:
http://www.gnu.org/licenses/gpl.txt
Authors:
Aaron Chester
Bashir Sadeghi
FRIB
Michigan State University
East Lansing, MI 48824-1321
*/
/**
* @file mlinference.h
* @brief Function definitions for the machine-learning inference editor.
*/
#ifndef MLINFERENCE_H
#define MLINFERENCE_H
#include <cstdint>
#include <vector>
#include <torch/script.h> // Can forward-declare?
/** @namespace ddastoys */
namespace ddastoys {
struct FitInfo;
/** @namespace ddastoys::mlinference */
namespace mlinference {
/**
*@ingroup mlinference
* @{
*/
/**
* @brief Perform ML inference to determine the pulse parameters.
* @param[in, out] pResult Pointer to the fit results.
* @param[in] trace References the trace we're processing.
* @param[in] saturation ADC saturation value. Only samples below the
* saturation threshold are used to extrat the pulse parameters.
* @param[in] module References the inference model for this channel.
*/
void performInference(
FitInfo* pResult,
std::vector<uint16_t>& trace, unsigned saturation,
torch::jit::script::Module& module
);
/** @} */
}
}
#endif