| 34 | } |
| 35 | |
| 36 | int 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, ¶ms); |
| 51 | } |
| 52 | |
| 53 | int DynLibClassifier::release () |
| 54 | { |
nothing calls this directly
no test coverage detected