Skip to content
Snippets Groups Projects
Commit 5148170f authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

remove msbDeBruijn32

parent 5c5e752a
No related branches found
No related tags found
Loading
Pipeline #13250 passed
...@@ -60,26 +60,6 @@ private: ...@@ -60,26 +60,6 @@ private:
} }
} }
// https://stackoverflow.com/a/31718095/
// Indices for channels, requirs channels to have bitmask format
// (values are power of 2 and no missing values/gaps).
static uint32_t _msbDeBruijn32(uint32_t v)
{
static const int MultiplyDeBruijnBitPosition[32] =
{
0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30,
8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31
};
v |= v >> 1; // first round down to one less than a power of 2
v |= v >> 2;
v |= v >> 4;
v |= v >> 8;
v |= v >> 16;
return MultiplyDeBruijnBitPosition[(uint32_t)(v * 0x07C4ACDDU) >> 27];
}
std::vector<cv::cuda::GpuMat> channels_; std::vector<cv::cuda::GpuMat> channels_;
std::vector<bool> available_; std::vector<bool> available_;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment