42 | | Freq_discr = (ItemCount***) calloc (nrThreads, sizeof(ItemCount**));[[BR]] |
43 | | ValFreq_discr = (ItemCount**) calloc (nrThreads, sizeof(ItemCount*));[[BR]] |
44 | | UnknownRate_discr = (float**) calloc (nrThreads, sizeof(float*));[[BR]] |
45 | | for(i = 0; i < nrThreads; i++){[[BR]] |
46 | | Freq_discr[i] = (ItemCount **) calloc(MaxDiscrVal + 1, sizeof(ItemCount *));[[BR]] |
47 | | ForEach(v, 0, MaxDiscrVal) {[[BR]] |
48 | | Freq_discr[i][v] = (ItemCount *) calloc(MaxClass + 1, sizeof(ItemCount));[[BR]] |
49 | | }[[BR]] |
| 42 | Freq_discr = (ItemCount***) calloc (nrThreads, sizeof(ItemCount**)); |
| 43 | ValFreq_discr = (ItemCount**) calloc (nrThreads, sizeof(ItemCount*)); |
| 44 | UnknownRate_discr = (float**) calloc (nrThreads, sizeof(float*)); |
| 45 | for(i = 0; i < nrThreads; i++) |
| 46 | { |
| 47 | Freq_discr[i] = (ItemCount **) calloc(MaxDiscrVal + 1, sizeof(ItemCount *)); |
| 48 | ForEach(v, 0, MaxDiscrVal) |
| 49 | { |
| 50 | Freq_discr[i][v] = (ItemCount *) calloc(MaxClass + 1, sizeof(ItemCount)); |
| 51 | } |
60 | | - in build.c - the `FormTree_discr()` function contains the #pragma omp parallel for construct that computes attribute gains in parllel.[[BR]] |
61 | | The directive also has a reduction clause on two variables: `AvGain`, `Possible`. The variables are necessary to compute the average gain of the attribute.[[BR]] |
62 | | The `FormTree_discr()` function calls `EvalAttributeDisc_discr()` for every attribute in the for loop.[[BR]] |
| 62 | - in build.c - the `FormTree_discr()` function contains the #pragma omp parallel for construct that computes attribute gains in parllel. |
| 63 | The directive also has a reduction clause on two variables: `AvGain`, `Possible`. The variables are necessary to compute the average gain of the attribute. |
| 64 | The `FormTree_discr()` function calls `EvalAttributeDisc_discr()` for every attribute in the for loop. |