Ignore:
Timestamp:
Jun 25, 2016, 9:07:07 AM (3 years ago)
Author:
cameron
Message:

Kernel infrastructure: move common logic into KernelBuilder? base class; demo linking in wc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pablo_kernel.cpp

    r5064 r5074  
    4242}
    4343
    44 void PabloKernel::prepareKernel() {
     44void PabloKernel::prepareKernelStateType() {
    4545    Type * carryDataType = pablo_compiler->initializeCarryData();
    4646    addScalar(carryDataType, "carries");
    47     finalizeKernelStateType();
     47    KernelBuilder::prepareKernelStateType();
    4848}
    4949
    50 void PabloKernel::generateKernel() {
     50void PabloKernel::generateDoBlockMethod() {
    5151    IDISA::IDISA_Builder::InsertPoint savePoint = iBuilder->saveIP();
    52     KernelBuilder::generateKernel();
    5352    Module * m = iBuilder->getModule();
    54     addFinalBlockMethod(m);
    5553    pablo_compiler->compile(m->getFunction(mKernelName + doBlock_suffix));
    5654    iBuilder->restoreIP(savePoint);
    5755}
    5856
    59 void PabloKernel::addFinalBlockMethod(Module * m) {
     57void PabloKernel::generateFinalBlockMethod() {
    6058    IDISA::IDISA_Builder::InsertPoint savePoint = iBuilder->saveIP();
    61     Module * saveModule = iBuilder->getModule();
    62     iBuilder->setModule(m);
     59    Module * m = iBuilder->getModule();
    6360    Function * doBlockFunction = m->getFunction(mKernelName + doBlock_suffix);
    6461    Function * finalBlockFunction = m->getFunction(mKernelName + finalBlock_suffix);
     
    7976    iBuilder->CreateCall(doBlockFunction, doBlockArgs);
    8077    iBuilder->CreateRetVoid();
    81     iBuilder->setModule(saveModule);
    8278    iBuilder->restoreIP(savePoint);
    8379}
Note: See TracChangeset for help on using the changeset viewer.