MCPcopy Create free account
hub / github.com/3DAnimals/3DAnimals / getWarpSize

Function getWarpSize

model/render/renderutils/c_src/common.cpp:56–63  ·  view source on GitHub ↗

returns the size of a block that can be reduced using horizontal SIMD operations (e.g. __shfl_xor_sync)

Source from the content-addressed store, hash-verified

54
55// returns the size of a block that can be reduced using horizontal SIMD operations (e.g. __shfl_xor_sync)
56dim3 getWarpSize(dim3 blockSize)
57{
58 return dim3(
59 std::min(blockSize.x, 32u),
60 std::min(std::max(32u / blockSize.x, 1u), std::min(32u, blockSize.y)),
61 std::min(std::max(32u / (blockSize.x * blockSize.y), 1u), std::min(32u, blockSize.z))
62 );
63}
64
65dim3 getLaunchGridSize(dim3 blockSize, dim3 dims)
66{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected