Ignore:
Timestamp:
Sep 23, 2015, 12:54:17 AM (4 years ago)
Author:
nmedfort
Message:

Misc changes + potential SIGBUS fix for issue reported by Hongpu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/cc/cc_compiler.cpp

    r4681 r4788  
    158158    if (bit_terms.size() > 1) {
    159159        //Reduce the list so that all of the expressions are contained within a single expression.
    160         std::vector<PabloAST*> new_terms(bit_terms.size() / 2);
    161         do
    162         {
    163             new_terms.clear();
     160        std::vector<PabloAST*> new_terms;
     161        new_terms.reserve(bit_terms.size() / 2);
     162        do {
    164163            for (auto i = 0; i < (bit_terms.size() / 2); i++) {
    165164                new_terms.push_back(pb.createAnd(bit_terms[(2 * i) + 1], bit_terms[2 * i]));
     
    169168            }
    170169            bit_terms.swap(new_terms);
     170            new_terms.clear();
    171171        }
    172172        while (bit_terms.size() > 1);
Note: See TracChangeset for help on using the changeset viewer.