Hi, Ben,

Since your data values are not in FastBit compressed format, it would 
be a lot faster for you to write a simple loop over all the values and 
perform bitwise OR with C/C++ bitwise OR operator.  Unless the 
variable value you want to perform bitwise logical operation actually 
contains may thousands of bits, it probably is not worth the trouble 
of converting everything into FastBit bitvector objects and then user 
bitwise logical operations using these objects.

John


On 12/9/2010 1:45 PM, Ben WIlliams wrote:
> Hi John,
> say the column looks like this:
>
> 2
> 2
> 4
>
> Then I want to OR all the bits in the column, so the result would be 6.
>
> Thanks
> Ben
>
> On Fri, Dec 10, 2010 at 10:24 AM, K. John Wu<[email protected]>  wrote:
>> Hi, Ben,
>>
>> Would you mind elaborate on your question a bit?  I am not sure what type of
>> "aggregate" you are referring to..
>>
>> John
>>
>>
>> On 12/9/2010 1:01 PM, Ben WIlliams wrote:
>>>
>>> I have a similar question. Is there a way to OR all the bits in a
>>> column for an aggregate query?
>>> Thanks
>>> Ben
>>>
>>> On Mon, Nov 29, 2010 at 6:04 PM, K. John Wu<[email protected]>    wrote:
>>>>
>>>> Hi, Teryl,
>>>>
>>>> There isn't a function that takes a set of bitvectors for bitwise AND
>>>> operations, but there is a function named ibis::index::sumBits that
>>>> performs bitwise OR on a std::vector of ibis::bitvectors.
>>>>
>>>> The class ibis::bitvector has two operators that performs bitwise OR
>>>> operations, they are |= and |.  If you need a different form, let us
>>>> know, we might be able to accommodate.
>>>>
>>>> John
>>>>
>>>>
>>>> On 11/28/2010 1:10 PM, Teryl Taylor wrote:
>>>>>
>>>>> Hi everyone,
>>>>>
>>>>> Is there any API's to take a set of bitvectors  and do a bitwise and
>>>>> with them?  also is there another API which does a bitwise OR?
>>>>>
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Teryl
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> FastBit-users mailing list
>>>>> [email protected]
>>>>> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>>>>
>>>> _______________________________________________
>>>> FastBit-users mailing list
>>>> [email protected]
>>>> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>>>>
>>> _______________________________________________
>>> FastBit-users mailing list
>>> [email protected]
>>> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>>
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to