| 250 | } |
| 251 | |
| 252 | static cl_int |
| 253 | executeImageStep( |
| 254 | SolutionStep *step, |
| 255 | cl_uint numEventsInWaitList, |
| 256 | const cl_event *eventWaitList, |
| 257 | cl_event *event) |
| 258 | { |
| 259 | SolutionStep outerStep, innerStep, execStep; |
| 260 | cl_int err = CL_SUCCESS; |
| 261 | int currImg = 0; |
| 262 | size_t imgWidth, imgHeight; |
| 263 | size_t ha, hb; |
| 264 | size_t maxPanels[MATRIX_ROLES_NUMBER], maxBlocks[MATRIX_ROLES_NUMBER]; |
| 265 | size_t off; |
| 266 | SubproblemDim wholeDim; |
| 267 | MatrixRole mrole; |
| 268 | CLBlasKargs *kargs = &step->args; |
| 269 | cl_mem *imgs = kargs->scimage; |
| 270 | MemoryPattern *mempat = &clblasSolvers[step->funcID].memPatterns[step->patternID]; |
| 271 | ProblemIterator innerIter, outerIter; |
| 272 | int oend = 0, iend; |
| 273 | SDimComponent comp[2]; |
| 274 | bool backward; |
| 275 | ListHead doneSteps; |
| 276 | CLBlasKernelType ktype; |
| 277 | |
| 278 | kargsToProbDims(&wholeDim, step->funcID, kargs, false); |
| 279 | memset(maxPanels, 0, sizeof(maxPanels)); |
| 280 | memset(maxBlocks, 0, sizeof(maxPanels)); |
| 281 | |
| 282 | memcpy(&outerStep, step, sizeof(SolutionStep)); |
| 283 | memcpy(&execStep, step, sizeof(SolutionStep)); |
| 284 | listInitHead(&doneSteps); |
| 285 | |
| 286 | /* |
| 287 | * Cover the whole problem with dimension which matrix blocks are |
| 288 | * fitted to images at. |
| 289 | */ |
| 290 | |
| 291 | for (mrole = MATRIX_A; mrole < MATRIX_C; mrole++) { |
| 292 | if (!isMatrixInImage(mempat, mrole)) { |
| 293 | continue; |
| 294 | } |
| 295 | |
| 296 | clGetImageInfo(imgs[currImg], CL_IMAGE_WIDTH, sizeof(imgWidth), |
| 297 | &imgWidth, NULL); |
| 298 | clGetImageInfo(imgs[currImg], CL_IMAGE_HEIGHT, sizeof(imgHeight), |
| 299 | &imgHeight, NULL); |
| 300 | |
| 301 | if (step->funcID == CLBLAS_TRSM) { |
| 302 | maxPanels[mrole] = 0; |
| 303 | maxBlocks[mrole] = 0; |
| 304 | } else { |
| 305 | maxPanels[mrole] = imgHeight / matrBlockHeight(step->subdims, mrole, |
| 306 | clblasLeft); |
| 307 | } |
| 308 | currImg++; |
| 309 | } |
no test coverage detected