svmPredict - 2023.1 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.1 English
#include "xf_data_analytics/classification/svm_predict.hpp"
template <
    typename MType,
    unsigned WD,
    unsigned StreamN,
    unsigned SampleDepth
    >
void svmPredict (
    const int cols,
    hls::stream <MType> sample_strm [StreamN],
    hls::stream <bool>& e_sample_strm,
    hls::stream <ap_uint <512>>& weight_strm,
    hls::stream <bool>& eTag,
    hls::stream <ap_uint <1>>& predictionsStrm,
    hls::stream <bool>& predictionsTag
    )

svmPredict, Top function of svm Predict.

This function first loads weight (the corresponding function : getWeight) from weight_strm Then, read sample from sample_strm, and output its classification id into predictionsStrm streams

Parameters:

MType The data type of sample
WD The width of data type MType, can get by sizeof(MType)
StreamN The stream number of input sample stream vector
SampleDepth stream depth number of one input sample
cols colum number of input data sample
sample_strm Input data streams of MType
e_sample_strm End flag stream for input data
weight_strm weight streams
eTag End flag stream for weight streams
predictionsStrm Output data streams
predictionsTagStrm End flag stream for output