1 | initial version |
If you can explain what's the big picture of the project, I may can help better. Sometimes, you can iterate over every even or odd row/col. This is possible if the accuracy is not a very big deal!
For instance, I would re-write your code to be:
vector <double> temp_row;
double temp;
vector <double> oup;
for (int i = 0; i < rows; i++) { //you can say i +=2 and say the output, if you like it it makes the iteration much faster.
for (int j = 0; j < cols; j++) {
temp = signal[i][j];
temp_row.push_back(temp);
}
branch_lp_dn(name, temp_row, oup);
temp_row.clear();
for (int j = 0; j < (int) oup.size(); j++) {
lp_dn1[i][j] = oup[j];
}
}
2 | No.2 Revision |
If you can explain what's the big picture of the project, I may can help better. Sometimes, you can iterate over every even or odd row/col. This is possible if the accuracy is not a very big deal!
For instance, I would re-write your code to be:
vector <double> temp_row;
double temp;
vector <double> oup;
for (int i = 0; i < rows; i++) { //you can say i +=2 and say the output, if you like it it makes the iteration much faster.
for (int j = 0; j < cols; j++) {
temp = signal[i][j];
temp_row.push_back(temp);
}
branch_lp_dn(name, temp_row, oup);
temp_row.clear();
for (int j = 0; j < (int) oup.size(); j++) {
lp_dn1[i][j] = oup[j];
}
}
3 | No.3 Revision |
If you can explain what's the big picture of the project, I may help better. Sometimes, you can iterate over every even or odd row/col. This is possible if the accuracy is not a very big deal!
For instance, I would re-write your code to be:
vector <double> temp_row;
double temp;
vector <double> oup;
for (int i = 0; i < rows; i++) { //you can say i +=2 and say the output, if you like it it makes the iteration much faster.
for (int j = 0; j < cols; j++) {
temp = signal[i][j];
temp_row.push_back(temp);
}
branch_lp_dn(name, temp_row, oup);
temp_row.clear();
for (int j = 0; j < (int) oup.size(); j++) {
lp_dn1[i][j] = oup[j];
}
}