Changeset 6072


Ignore:
Timestamp:
Jun 8, 2018, 9:59:04 AM (12 days ago)
Author:
cameron
Message:

character_deposit UseStreamDepositCompiler? option

File:
1 edited

Legend:

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

    r6071 r6072  
    4646static cl::opt<std::string> outputFile(cl::Positional, cl::desc("<output file>"), cl::Required, cl::cat(characterDepositFlags));
    4747static cl::opt<bool> useSwizzledDeposit("swizzle-deposit", cl::desc("Use swizzle deletion"), cl::init(false), cl::cat(characterDepositFlags));
     48static cl::opt<bool> UseStreamDepositCompiler("UseStreamDepositCompiler", cl::desc("Use the StreamDepositCompiler deletion"), cl::init(false), cl::cat(characterDepositFlags));
    4849
    4950
     
    132133    // Deposit
    133134    StreamSetBuffer * depositedBits = pxDriver.addBuffer<DynamicBuffer>(iBuilder, iBuilder->getStreamSetTy(8), bufferBlocks, 1);
    134     Kernel * pdepK = pxDriver.addKernelInstance<BitStreamPDEPKernel>(iBuilder, 8);
    135     pxDriver.makeKernelCall(pdepK, {depositMarker, compressedBits}, {depositedBits});
    136    
    137     //StreamDepositCompiler depositCompiler(pxDriver, 8, 0, 8, bufferBlocks);
    138     //depositCompiler.makeCall(depositMarker, compressedBits, depositedBits);
    139 
    140 
     135    if (UseStreamDepositCompiler) {
     136        StreamDepositCompiler depositCompiler(pxDriver, 8, 0, 8, bufferBlocks);
     137        depositCompiler.makeCall(depositMarker, compressedBits, depositedBits);
     138    } else {
     139        Kernel * pdepK = pxDriver.addKernelInstance<BitStreamPDEPKernel>(iBuilder, 8);
     140        pxDriver.makeKernelCall(pdepK, {depositMarker, compressedBits}, {depositedBits});
     141    }
    141142    return depositedBits;
    142143}
Note: See TracChangeset for help on using the changeset viewer.