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

Function calcNrThreads

src/library/blas/gens/reduction.cpp:194–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194static void
195calcNrThreads(
196 size_t threads[2],
197 const SubproblemDim *subdims,
198 const PGranularity *pgran,
199 const void *args,
200 const void *_extra)
201{
202 DUMMY_ARGS_USAGE_3(subdims, args, _extra);
203 int BLOCKSIZE = pgran->wgSize[0] * pgran->wgSize[1]; // 1D Block
204
205 size_t blocks = 1; // Reduction will use only 1 block
206 #ifdef DEBUG_REDUCTION
207 printf("blocks : %d\n", blocks);
208 #endif
209
210 threads[0] = blocks * BLOCKSIZE;
211 #ifdef DEBUG_REDUCTION
212 printf("pgran-wgSize[0] : %d, globalthreads[0] : %d\n", pgran->wgSize[0], threads[0]);
213 #endif
214 threads[1] = 1;
215}
216
217//
218// FIXME: Report correct return value - Needs change in KPRINTF

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected