Ignore:
Timestamp:
Aug 9, 2016, 8:27:23 AM (3 years ago)
Author:
cameron
Message:

New IDISA bitblock functions: bitblock_set_bit, bitblock_mask_from

File:
1 edited

Legend:

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

    r5106 r5121  
    2424                    {},
    2525                    {},
    26                     {ScalarBinding{builder->getBitBlockType(), "EOFmark"}}),
     26                    {ScalarBinding{builder->getBitBlockType(), "EOFbit"}, ScalarBinding{builder->getBitBlockType(), "EOFmask"}}),
    2727    mPabloFunction(function) {
    2828    unsigned output_streams = function->getNumOfResults();
     
    4242                    {},
    4343                    {},
    44                     {ScalarBinding{builder->getBitBlockType(), "EOFmark"}}),
     44                    {ScalarBinding{builder->getBitBlockType(), "EOFbit"}, ScalarBinding{builder->getBitBlockType(), "EOFmask"}}),
    4545    mPabloFunction(function) {
    4646    unsigned output_streams = function->getNumOfResults();
     
    8989    }
    9090    // Standard Pablo convention for final block processing: set a bit marking
    91     // the position just past EOF.
    92     Type * bitBlockInt = iBuilder->getIntNTy(iBuilder->getBitBlockWidth());
    93     Value * EOFmark = iBuilder->CreateShl(ConstantInt::get(bitBlockInt, 1), iBuilder->CreateZExt(remaining, bitBlockInt));
    94     setScalarField(self, "EOFmark", iBuilder->CreateBitCast(EOFmark, iBuilder->getBitBlockType()));
     91    // the position just past EOF, as well as a mask marking all positions past EOF.
     92    setScalarField(self, "EOFbit", iBuilder->bitblock_set_bit(remaining));
     93    setScalarField(self, "EOFmask", iBuilder->bitblock_mask_from(remaining));
    9594    iBuilder->CreateCall(doBlockFunction, doBlockArgs);
    9695    iBuilder->CreateRetVoid();
Note: See TracChangeset for help on using the changeset viewer.