Chris Marshall
2013-12-13 19:08:26 UTC
To follow up on mraptor's desire for bitfield support as part
of the new PDL data type support. E.g.:
Usage: $bits = bit [ 1, 0, 0, 1, 1 ]
$bits = zeros bit, 1000, 1000;
Here are a few thoughts on the subject:
* Bit piddles can be more than an order of magnitude more
compact than corresponding integer types (8X to 64X)
* I suggest we go a bit more general :-) and allow arbitrary
length bitfield types: bit, quadbit, octbit, hexbit, ... which
ties in to some of the recent discussion on categorical
PDLs on the #pdl.
* These types of data are commonly referred to as SIMD
Within A Registar computation or SWAR:
http://en.wikipedia.org/wiki/SWAR
* The availability of bitfield data types would allow for very
compact storage and access of PDL logical mask
generation and computations. E.g., a bit2 data type
could support an enhanced type of bad value support:
good, bad, missing, approximate.
* We would have to construct the engines to manipulate
and use the bitfield data types but I expect it to be quite
general. For example, GPU instructions often have the
ability to process a vector of data under the condition of
a mask. This maps very well into the proposed new type.
* Part of making this efficient would be to allow for bitfield
data to be laid out in a computationally efficient format.
E.g., a 2D bit array might have a 64bit section of the
bitfield actually represent an 8x8 block of the data. That
would allow for efficient local computation with reduced
memory traffic. Algorithms to transpose/permute bitfield
data would be essential.
Could be some very cool stuff!
Thoughts?
Chris
of the new PDL data type support. E.g.:
Usage: $bits = bit [ 1, 0, 0, 1, 1 ]
$bits = zeros bit, 1000, 1000;
Here are a few thoughts on the subject:
* Bit piddles can be more than an order of magnitude more
compact than corresponding integer types (8X to 64X)
* I suggest we go a bit more general :-) and allow arbitrary
length bitfield types: bit, quadbit, octbit, hexbit, ... which
ties in to some of the recent discussion on categorical
PDLs on the #pdl.
* These types of data are commonly referred to as SIMD
Within A Registar computation or SWAR:
http://en.wikipedia.org/wiki/SWAR
* The availability of bitfield data types would allow for very
compact storage and access of PDL logical mask
generation and computations. E.g., a bit2 data type
could support an enhanced type of bad value support:
good, bad, missing, approximate.
* We would have to construct the engines to manipulate
and use the bitfield data types but I expect it to be quite
general. For example, GPU instructions often have the
ability to process a vector of data under the condition of
a mask. This maps very well into the proposed new type.
* Part of making this efficient would be to allow for bitfield
data to be laid out in a computationally efficient format.
E.g., a 2D bit array might have a 64bit section of the
bitfield actually represent an 8x8 block of the data. That
would allow for efficient local computation with reduced
memory traffic. Algorithms to transpose/permute bitfield
data would be essential.
Could be some very cool stuff!
Thoughts?
Chris