Hi, Andrew,
Looks like you are getting deep into the FastBit software layers. At
the core of what you see is that b1->size() after invocation of
b1->insert should be the total of the b1 and b2 before the invocation.
I have a theory as what might be going on, but will need a few hours
more to investigate.
Before I make this attempt, could I get a confirmation from you about
my observation:
- before calling the function insert, b1 is empty and b2 is not empty.
It might make a difference in how b1 is initialized. Would you mind
tell me which constructor you used to initialize b1?
- b1->size() is always 0 regardless of the size of b2. Do you have a
range of values for the sizes of b2?
John
On 5/24/12 5:36 PM, Olson, Andrew wrote:
> Greetings FastBit C++ gurus!
> I'm trying to build an ibis::table from a vector of type
> ibis::table::bufferList but the array isn't growing. Below is an excerpt
> that I'm running on each column. Any ideas what I'm doing wrong here?
> Andrew
>
>
> std::vector<ibis::table::bufferList> part_results;
>
> // in separate threads, fill a bufferList for each partition and
> part_results.push_back(buffers);
> // after all the parts have been processed
> ibis::table* res = concatenate_results();
>
> // concatenate_results() loops over the columns and calls concatenate_column()
> void concatenate_column(ibis::table::bufferList& tbuff, ibis::table::typeList
> &ttypes, size_t col) {
>
> std::cerr << "concatenate_column(" << col << ")" << std::endl;
> tbuff[col] = &part_results[0][col];
> for(size_t i=1; i < part_results.size(); i++) {
> std::cerr << "i=" << i << " b1=";
> switch(ttypes[col]) {
> case ibis::BYTE:
> {
> ibis::array_t<signed char>* b1 = static_cast<ibis::array_t<signed
> char>*>(tbuff[col]);
> ibis::array_t<signed char>* b2 = static_cast<ibis::array_t<signed
> char>*>(part_results[i][col]);
> std::cerr << b1->size() << " b2=" << b2->size();
> b1->insert(b1->end(),b2->begin(),b2->end());
> std::cerr << " b1 now " << b1->size() << std::endl; // b1 is 0
> break;
> }
>
> _______________________________________________
> 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