| 139 | } |
| 140 | |
| 141 | void VISIBILITY_HIDDEN |
| 142 | assertImageSubstep( |
| 143 | SolutionStep *wholeStep, |
| 144 | SolutionStep *substep, |
| 145 | ListHead *doneSubsteps) |
| 146 | { |
| 147 | CLBlasKargs *kargs1 = &substep->args; |
| 148 | CLBlasKargs *kargs2 = &wholeStep->args; |
| 149 | ListNode *node; |
| 150 | SolArea *area; |
| 151 | |
| 152 | assertEnclosed(kargs1->offsetM, kargs1->M, kargs2->offsetM, kargs2->M); |
| 153 | assertEnclosed(kargs1->offsetN, kargs1->N, kargs2->offsetN, kargs2->N); |
| 154 | node = listNodeSearch(doneSubsteps, (const void*)&substep->args, |
| 155 | solAreaCmp); |
| 156 | assert(!node); |
| 157 | area = malloc(sizeof(SolArea)); |
| 158 | if (area == NULL) { |
| 159 | fprintf(stderr, "[%s, line %d]: Failed to allocate memory for image " |
| 160 | "step assertion!\n", __FILE__, __LINE__); |
| 161 | } |
| 162 | else { |
| 163 | area->offsetM = substep->args.offsetM; |
| 164 | area->M = substep->args.M; |
| 165 | area->offsetN = substep->args.offsetN; |
| 166 | area->N = substep->args.N; |
| 167 | listAddToTail(doneSubsteps, &area->node); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | void VISIBILITY_HIDDEN |
| 172 | assertImageStep(SolutionStep *wholeStep, ListHead *doneSubsteps) |
no test coverage detected