MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / createLaunchConfig3D

Method createLaunchConfig3D

extensions/include/cuMat/src/Context.h:431–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429 */
430 template<class T>
431 KernelLaunchConfig createLaunchConfig3D(unsigned int sizex, unsigned int sizey, unsigned int sizez, T func) const
432 {
433 CUMAT_ASSERT_ARGUMENT(sizex > 0);
434 CUMAT_ASSERT_ARGUMENT(sizey > 0);
435 CUMAT_ASSERT_ARGUMENT(sizez > 0);
436 int minGridSize = 0, bestBlockSize = 0;
437 CUMAT_SAFE_CALL(cudaOccupancyMaxPotentialBlockSize(&minGridSize, &bestBlockSize, func));
438 CUMAT_LOG_DEBUG("Best potential occupancy for " << typeid(T).name() << " found to be: blocksize=" << bestBlockSize << ", gridSize=" << minGridSize);
439 KernelLaunchConfig cfg = {
440 dim3(sizex, sizey, sizez),
441 dim3(bestBlockSize, 1, 1),
442 dim3(minGridSize, 1, 1)
443 };
444 return cfg;
445 }
446};
447
448/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected