![]() If you multiply (using uint32_t) a 16 bit value by prime (or for that matter any odd number) p between 2^31 and 2^32, then you "probably" smear the results fairly evenly across the 32 bit space. The reason for the requirement of simplicity in the hashing function is that this hashing function is going to have to run thousands of times per pixel, so anywhere where I can trim instructions is a win. I'm looking to find a very simple hashing function that can take a number from set S and represent it in 256 bits such that each bit has roughly equal probability of being 1 or 0. I've chosen a 256-bit bloom filter because it fits my space requirements, and has a low enough probability of false positives. The reason for the bloom filter is a space consideration. I need to represent this subset S1 with a 256-bit bloom filter constructed with a single hashing function. I have a subset S1 of n numbers from the set S, which is in the range (0, 2^16-1). I will try to restate it with a more concrete example: I feel like the fact that the hash input is known to be only 16-bits can inform the hash function is designed somehow, but I am failing to see the solution.īased on the responses, my original question is confusing. I could use some well-known hashing function on each integer, but I'm looking for an extremely efficient implementation (just a few instructions) so that this runs well in a GPU shader program. The reason for this is that I'm trying to put a subset of the 16-bit number space into a 256-bit bloom filter, for fast membership testing. I want to take the entire sequence of 16-bit integers and hash each one in such a way that it maps to 256-bit space uniformly. See sampling and high-resolution sampling rates.It sounds weird to be going bigger, but that's what I'm trying to do. A 16-bit sample yields a number with 65,536 digital increments compared to 256 increments in an 8-bit sample. One of the attributes and quality measurements of digital audio is the size of each sample that is taken when analog audio is converted to digital. See color depth, alpha channel, 64-bit graphics accelerator and 128-bit graphics accelerator. Display specifications, such as 64-bit and 128-bit, refer to the architecture, which affects speed, not the number of colors. The number of colors that can be displayed at one time is called "color depth," "pixel depth" or "bit depth." Unless some of the memory is used for cursor or sprite movement, an 8-bit graphics card (display adapter) generates 256 colors 16 bits handles 64K colors, and 24 bits supports 16.8 million colors. For example, a 20-bit address bus can access up to one megabyte (1MB) 24 bits reaches 16MB, and 32 bits can handle four gigabytes (GB). The size of the address bus determines how much memory the CPU can address directly. If the bus clock rates are equal, a 32-bit bus transfers data twice as fast as a 16-bit bus. The size of the computer's system bus (frontside bus), which is the pathway over which data are transferred between memory and the CPU and between memory and the peripheral devices. See 32-bit computing and 64-bit computing. In order to take advantage of a CPU with a larger word size, operating systems and applications must be recompiled with a compiler that supports the larger word size. In addition, the CPU cache size and the system's bus and disk speeds are all part of the performance equation. Thus, a 64-bit computer may be (internally) less than twice as fast or more than twice as fast as a 32-bit computer. In practice, 8-bit, 16-bit, 32-bit and 64-bit architectures are rarely identical to each other even from the same manufacturer. Theoretically, if the clock rates were the same (1 GHz, 2.5 GHz, etc.) and the basic architectures were equal, a 32-bit computer would work twice as fast internally as a 16-bit computer. ![]() For example, a 64-bit computer uses 64-bit registers and can process 64 bits at one time. The "word" size is the number of bits in the CPU's internal registers. Following are the common components in a computer that are measured in bits. Everything in the digital world is measured in bits and bytes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |