MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / predict

Method predict

src/ml/dyn_lib_classifier.cpp:36–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36int DynLibClassifier::predict (double *data, int data_len, double *output, int *output_len)
37{
38 if (dll_loader == NULL)
39 {
40 return (int)BrainFlowExitCodes::CLASSIFIER_IS_NOT_PREPARED_ERROR;
41 }
42 int (*func) (double *, int, double *, int *, struct BrainFlowModelParams *) =
43 (int (*) (double *, int, double *, int *,
44 struct BrainFlowModelParams *))dll_loader->get_address ("predict");
45 if (func == NULL)
46 {
47 safe_logger (spdlog::level::err, "failed to get function address for predict");
48 return (int)BrainFlowExitCodes::GENERAL_ERROR;
49 }
50 return func (data, data_len, output, output_len, &params);
51}
52
53int DynLibClassifier::release ()
54{

Callers

nothing calls this directly

Calls 1

get_addressMethod · 0.45

Tested by

no test coverage detected