MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / assertImageSubstep

Function assertImageSubstep

src/library/blas/generic/solution_assert.c:141–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void VISIBILITY_HIDDEN
142assertImageSubstep(
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
171void VISIBILITY_HIDDEN
172assertImageStep(SolutionStep *wholeStep, ListHead *doneSubsteps)

Callers 1

executeImageStepFunction · 0.85

Calls 3

assertEnclosedFunction · 0.85
listNodeSearchFunction · 0.85
listAddToTailFunction · 0.85

Tested by

no test coverage detected