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

Reply via email to