mercredi 1 novembre 2017

error: expected ']' before ',' token

I'm trying to write a data struct in c++,i running in vivado HLS i get many errors and i don't find where are the erros.What is wrong?? My code is

template <typename T, int DIM1,int DIM2,int DIMa,int DIMb,int DIMc,int DIMd,int DIMe,int DIMf>
void pavilion_hw(T LabelS1[DIM1][DIM2], T out predict_label1[DIMa][DIMb], T out precision1[DIMc][DIMd],T out prob_estimates_t1[DIMe][DIMf])
{

    // partition with half dimension size b/c BRAM has two ports

#pragma HLS INLINE off
#pragma HLS array_partition variable=LabelS1 dim=1

    SStest1=[-0.674090537952796,-0.967913560624215,-0.946607312926616,-0.949789832193271,-0.955656497278097,-0.938898706383114,-0.961972723505885,-0.943158564395126,-0.924258334652885,-0.987130021868515,-0.961224433510270,-0.979509038935985,-0.982841580894078,-0.968786461033008;-0.661420074510186,-0.953582957005305,-0.976667803306075,-0.852024795662031,-0.923684241437988,-0.908602156779947,-0.961480830721390,-0.943819721336063,-0.961645084746726,-0.975901524455997,-0.964617784738062,-0.985199969033792,-0.979709442173101,-0.949066533256159;-0.796228139367668,-0.761729500498894,];
struct svm_model
{
    double parameters =[1;1;1;10;0.150000000000000];
    int nr_class=[3];   /* number of classes, = 2 in regression/one class svm */
    int l= [38];            /* total #SV */
    double svm_node **SV=SVs=[0.209400000000000,-0.236800000000000,000000000,-0.900500000000000,-0.949100000000000,-0.896600000000000,-0.950900000000000,-0.863400000000000;0.316800000000000,-0.134600000000000,-0.750300000000000,-0.711100000000000,-0.884900000000000,-0.735900000000000,-0.878500000000000,-0.868500000000000,-0.913100000000000,-0.938700000000000,-0.925300000000000,-0.932200000000000,-0.958400000000000,-0.848600000000000];      /* SVs (SV[l]) */
    double **sv_coef = [0.0441014900184046,047201450973238,-0.106867010440775;0,-1.24158009628657;-0.0247201450973238,-2.56566567302770;-0.0247201450973238,-1.28942381799513]  /* coefficients for SVs in decision functions (sv_coef[k-1][l]) */
    double *rho= [3.85250072056665;1.98260813354295;-9.85381777928213];     /* constants in decision functions (rho[k*(k-1)/2]) */
    double *probA= [-3.04020468884611;-3.02985537320699;-1.22838128162279];     /* pariwise probability information */
    double *probB= [-0.143832034298135;-0.331592706939798;-0.317353460209991];
    double *sv_indices= [1;3;11;18;20;22;25;26;29;30;42;43;45;49;50;51;55;56;60;63;65;69;70;71;72;73;75;82;83;90;94;98;102;104;107;110;113;119];       /* sv_indices[0,...,nSV-1] are values in [1,...,num_traning_data] to indicate SVs in the training set */
/* for classification only */

    double *label= [1;2;3]; /* label of each class (label[k]) */
    double *nSV= [10;17;11];    /* number of SVs for each class (nSV[k]) */
                /* nSV[0] + nSV[1] + ... + nSV[k-1] = l */
    /* XXX */
    int free_sv;        /* 1 if svm_model is created by svm_load_model*/
                /* 0 if svm_model is created by svm_train */
};
 [predict_label1,precision1,prob_estimates_t1]=SVMPredict(LabelS1,SStest1, model);
    return;
}`

the errors are

Aucun commentaire:

Enregistrer un commentaire