| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 527b03e commit f452f04
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -118,21 +118,21 @@ void openmp(const std::vector<size_t>& D) { | |||
| 118 | 118 | std::cout << "Generating matrix As ...\n"; | |
| 119 | 119 | std::vector<matrix_t> As(D.size()); | |
| 120 | 120 | #pragma omp parallel for | |
| 121 | - for(int j=0; j<D.size(); ++j) { | ||
| 121 | + for(int j=0; j<(int)D.size(); ++j) { | ||
| 122 | 122 | As[j] = random_matrix(D[j]); | |
| 123 | 123 | } | |
| 124 | 124 | ||
| 125 | 125 | std::cout << "Generating matrix Bs ...\n"; | |
| 126 | 126 | std::vector<matrix_t> Bs(D.size()); | |
| 127 | 127 | #pragma omp parallel for | |
| 128 | - for(int j=0; j<D.size(); ++j) { | ||
| 128 | + for(int j=0; j<(int)D.size(); ++j) { | ||
| 129 | 129 | Bs[j] = random_matrix(D[j]); | |
| 130 | 130 | } | |
| 131 | 131 | ||
| 132 | 132 | std::cout << "Computing matrix product values Cs ...\n"; | |
| 133 | 133 | std::vector<matrix_t> Cs(D.size()); | |
| 134 | 134 | #pragma omp parallel for | |
| 135 | - for(int j=0; j<D.size(); ++j) { | ||
| 135 | + for(int j=0; j<(int)D.size(); ++j) { | ||
| 136 | 136 | Cs[j] = As[j] * Bs[j]; | |
| 137 | 137 | } | |
| 138 | 138 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1033,19 +1033,13 @@ std::string BasicTaskflow<F>::dump() const { | |||
| 1033 | 1033 | ||
| 1034 | 1034 | for(const auto& node : _nodes) { | |
| 1035 | 1035 | ||
| 1036 | - os << " \""; | ||
| 1037 | - if(!node.name().empty()) os << node.name(); | ||
| 1038 | - else os << &node; | ||
| 1039 | - os << "\";\n"; | ||
| 1036 | + os << " \"" << (node.name().empty() ? &node : node.name()) << "\";\n"; | ||
| 1040 | 1037 | ||
| 1041 | 1038 | for(const auto s : node._successors) { | |
| 1042 | - os << " \""; | ||
| 1043 | - if(!node.name().empty()) os << node.name(); | ||
| 1044 | - else os << &node; | ||
| 1045 | - os << "\" -> \""; | ||
| 1046 | - if(s->name() != "") os << s->name(); | ||
| 1047 | - else os << s; | ||
| 1048 | - os << "\";\n"; | ||
| 1039 | + os << " \"" << (node.name().empty() ? &node : node.name()) | ||
| 1040 | + << "\" -> \"" | ||
| 1041 | + << (s->name().empty() ? s : s->name()) | ||
| 1042 | + << "\";\n"; | ||
| 1049 | 1043 | } | |
| 1050 | 1044 | } | |
| 1051 | 1045 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments