Ignore:
Timestamp:
Dec 5, 2016, 1:08:23 PM (2 years ago)
Author:
cameron
Message:

Automate instance creation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/wc.cpp

    r5217 r5220  
    176176    BasisBits.allocateBuffer();
    177177   
    178     Value * s2pInstance = s2pk.createInstance({});
    179     Value * wcInstance = wck.createInstance({});
    180    
    181     generatePipelineLoop(iBuilder, {&s2pk, &wck}, {s2pInstance, wcInstance}, fileSize);
    182    
    183     Value * lineCount = wck.createGetAccumulatorCall(wcInstance, "lineCount");
    184     Value * wordCount = wck.createGetAccumulatorCall(wcInstance, "wordCount");
    185     Value * charCount = wck.createGetAccumulatorCall(wcInstance, "charCount");
     178    generatePipelineLoop(iBuilder, {&s2pk, &wck}, fileSize);
     179   
     180    Value * lineCount = wck.createGetAccumulatorCall(wck.getInstance(), "lineCount");
     181    Value * wordCount = wck.createGetAccumulatorCall(wck.getInstance(), "wordCount");
     182    Value * charCount = wck.createGetAccumulatorCall(wck.getInstance(), "charCount");
    186183
    187184    iBuilder->CreateCall(record_counts_routine, std::vector<Value *>({lineCount, wordCount, charCount, fileSize, fileIdx}));
Note: See TracChangeset for help on using the changeset viewer.