| 186 | double **a = nullptr, **b = nullptr, **c = nullptr; |
| 187 | |
| 188 | void matrix_multiplication(const std::string& model, const unsigned num_threads, |
| 189 | const unsigned num_rounds) { |
| 190 | if (dev_run) |
| 191 | std::cout << std::setw(12) << "size" << std::setw(12) << "runtime" |
| 192 | << std::endl; |
| 193 | |
| 194 | for (int i = 128; i <= 512; i += 128) { |
| 195 | N = i; |
| 196 | |
| 197 | allocate_matrix(); |
| 198 | |
| 199 | double runtime{0.0}; |
| 200 | |
| 201 | for (unsigned j = 0; j < num_rounds; ++j) { |
| 202 | #if 0 |
| 203 | if (model == "highs") { |
| 204 | runtime += measure_time_highs(num_threads).count(); |
| 205 | } else if (model == "omp") { |
| 206 | runtime += measure_time_omp(num_threads).count(); |
| 207 | } else |
| 208 | assert(false); |
| 209 | #else |
| 210 | runtime += measure_time_highs(num_threads).count(); |
| 211 | #endif |
| 212 | } |
| 213 | |
| 214 | if (dev_run) |
| 215 | std::cout << std::setw(12) << N << std::setw(12) |
| 216 | << runtime / num_rounds / 1e3 << std::endl; |
| 217 | |
| 218 | deallocate_matrix(); |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | TEST_CASE("MatrixMultHighs", "[parallel]") { |
| 223 | HighsTaskExecutor::shutdown(); |
no test coverage detected