- Starring sub-chapter Divide and Conquer, it explain are information in group should be counted to extract a group with nominated value and this make a way to extract a subject from a Big Bit Field..
It explained a strategy in 5 step or log2(32) = 5 Steps information can be reduced...
Looking toward a Header file, named nv.h from nvidia from nvidia-304.88 version now with preliminary source code, we can see a function :
- nv_count_bits:
static inline int nv_count_bits(NvU64 word) { NvU64 bits; bits = (word & 0x5555555555555555ULL) + ((word >> 1) & 0x5555555555555555ULL); bits = (bits & 0x3333333333333333ULL) + ((bits >> 2) & 0x3333333333333333ULL); bits = (bits & 0x0f0f0f0f0f0f0f0fULL) + ((bits >> 4) & 0x0f0f0f0f0f0f0f0fULL); bits = (bits & 0x00ff00ff00ff00ffULL) + ((bits >> 8) & 0x00ff00ff00ff00ffULL); bits = (bits & 0x0000ffff0000ffffULL) + ((bits >> 16) & 0x0000ffff0000ffffULL); bits = (bits & 0x00000000ffffffffULL) + ((bits >> 32) & 0x00000000ffffffffULL); return (int)(bits); }
And it's equivalent being explained inside Chapter 10, Divide & Conquer, show merely how counting a group is explained...
And the similar conversion from the same book, call instruction the method using Integer to reveal the population of bit not masked by the operation. Another beautiful example few page ahead give twice an example to create a pop( x ) operation acting on bit inside the array.
This lead to another hint, what was that Debian Package allowing storing image in GPU memory to accelerate image treatment... This can lead to a story within GMA Intel Driver and API, developping OpenCL initiative for GPU computing...
X | Text may contains errors, syntax errors or lexical error... |
X | Now with SpellChecking and Editable text. Up to you to get something correct. |
1 No Interest 2 Somewhat good 3 Good 4 Special.