Ignore:
Timestamp:
Jan 17, 2017, 1:29:52 PM (3 years ago)
Author:
cameron
Message:

Eliminate unneeded doBlock functions

File:
1 edited

Legend:

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

    r5263 r5265  
    117117    addKernelDeclarations(m);
    118118    generateInitMethod();       // possibly overridden by the KernelBuilder subtype
    119     generateDoBlockMethod();    // must be implemented by the KernelBuilder subtype
    120     generateFinalBlockMethod(); // possibly overridden by the KernelBuilder subtype
    121119    generateDoSegmentMethod();
    122120
     
    176174}
    177175
     176// Note: this may be overridden to incorporate doBlock logic directly into
     177// the doSegment function.
     178void KernelBuilder::generateDoBlockMethod() const {
     179    llvm::report_fatal_error(mKernelName + " DoBlock method called but not implemented");
     180}
     181
    178182
    179183//  The default doSegment method dispatches to the doBlock routine for
    180184//  each block of the given number of blocksToDo, and then updates counts.
    181185void KernelBuilder::generateDoSegmentMethod() const {
     186    generateDoBlockMethod();    // must be implemented by the KernelBuilder subtype
     187    generateFinalBlockMethod(); // possibly overridden by the KernelBuilder subtype
     188
     189 
    182190    auto savePoint = iBuilder->saveIP();
    183191    Module * m = iBuilder->getModule();
Note: See TracChangeset for help on using the changeset viewer.