MCPcopy Create free account
hub / github.com/OpenImagingLab/4DSloMo / opt_n_threads

Function opt_n_threads

pointops2/src/cuda_utils.h:11–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#define DIVUP(m, n) ((m) / (n) + ((m) % (n) > 0))
10
11inline int opt_n_threads(int work_size) {
12 const int pow_2 = std::log(static_cast<double>(work_size)) / std::log(2.0);
13 return std::max(std::min(1 << pow_2, TOTAL_THREADS), 1);
14}
15
16inline dim3 opt_block_config(int x, int y) {
17 const int x_threads = opt_n_threads(x);

Callers 1

opt_block_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected