0

Can some one suggest best way to calculate the huge matrix.

Example:

```
const int NUMPAT = 1212;
const int NUMIN = 6;
const int NUMHID1= 13;
const int NUMHID2 =15;
const int NUMOUT = 12;
#define rando() ((double)rand()/(RAND_MAX+1))
```

Below are-----

```
double Input[NUMPAT+1][NUMIN+1];
double Target[NUMPAT+1][NUMOUT+1];
double SumH1[NUMPAT+1][NUMHID1+1], WeightIH1[NUMIN+1][NUMHID1+1], Hidden1[NUMPAT+1][NUMHID1+1];
double SumH2[NUMPAT+1][NUMHID2+1], WeightH1H2[NUMHID1+1][NUMHID2+1], Hidden2[NUMPAT+1][NUMHID2+1];
double SumO[NUMPAT+1][NUMOUT+1], WeightH2O[NUMHID2+1][NUMOUT+1], Output[NUMPAT+1][NUMOUT+1];
double DeltaO[NUMOUT+1],SumDOW1[NUMHID1+1],SumDOW2[NUMHID2+1],DeltaH1[NUMHID1+1],DeltaH2[NUMHID2+1];
double DeltaWeightIH1[NUMIN+1][NUMHID1+1],DeltaWeightH1H2[NUMHID1+1][NUMHID2+1],DeltaWeightH2O[NUMHID2+1][NUMOUT+1];
```

Operations required to do on those matrices are:

1) Processing the values of huge matrix and calculating results.

2) Multiplication of two matrices.

3) Adding or subtracting matrices to matrices

Of course, all the matrices size could be same.