Ignore:
Timestamp:
May 10, 2017, 4:26:11 PM (2 years ago)
Author:
nmedfort
Message:

Large refactoring step. Removed IR generation code from Kernel (formally KernelBuilder?) and moved it into the new KernelBuilder? class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/streams_merge.cpp

    r5436 r5440  
    2121}
    2222
    23 void StreamsMerge::generateDoBlockMethod() {
     23void StreamsMerge::generateDoBlockMethod(const std::unique_ptr<KernelBuilder> &iBuilder) {
    2424
    2525    std::vector<Value *> resultStreams;
    2626
    2727    for (unsigned j = 0; j < mStreamsPerSet; j++) {
    28         resultStreams.push_back(loadInputStreamBlock("inputGroup" + std::to_string(0), iBuilder->getInt32(j)));
     28        resultStreams.push_back(iBuilder->loadInputStreamBlock("inputGroup" + std::to_string(0), iBuilder->getInt32(j)));
    2929    }
    3030
    3131    for (unsigned i = 1; i < mInputSets; i++) {
    3232        for (unsigned j = 0; j < mStreamsPerSet; j++) {
    33             resultStreams[j] = iBuilder->CreateOr(resultStreams[j], loadInputStreamBlock("inputGroup" + std::to_string(i), iBuilder->getInt32(j)));
     33            resultStreams[j] = iBuilder->CreateOr(resultStreams[j], iBuilder->loadInputStreamBlock("inputGroup" + std::to_string(i), iBuilder->getInt32(j)));
    3434        }
    3535    }
    3636    for (unsigned j = 0; j < mStreamsPerSet; j++) {
    37         storeOutputStreamBlock("output", iBuilder->getInt32(j), resultStreams[j]);
     37        iBuilder->storeOutputStreamBlock("output", iBuilder->getInt32(j), resultStreams[j]);
    3838    }
    3939}
Note: See TracChangeset for help on using the changeset viewer.