Ignore:
Timestamp:
Dec 26, 2015, 12:09:11 PM (3 years ago)
Author:
cameron
Message:

Dynamic generation of s2p code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/do_grep.h

    r4826 r4900  
    3939#endif
    4040
     41typedef void (*transpose_fcn_T)(BytePack * byte_data, Basis_bits & basis_bits);
    4142typedef void (*process_block_initialize_carries_fcn)();
    4243typedef void (*process_block_fcn)(const Basis_bits & basis_bits, Output & output);
     
    5354    , mShowLineNumberingOption(false)
    5455    , mParsedCodePointSet(nullptr)
     56    , mTransposeFcn(reinterpret_cast<transpose_fcn_T>(&s2p_do_block))
    5557    , mInitializeCarriesFcn(reinterpret_cast<process_block_initialize_carries_fcn>(process_block_initialize_carries))
    5658    , mProcessBlockFcn(reinterpret_cast<process_block_fcn>(process_block)) {
    57 
     59       
    5860    }
    59          
     61    GrepExecutor(void * s2p_fnptr, void * process_block_initialize_carries, void * process_block)
     62    : mCountOnlyOption(false)
     63    , mGetCodePointsOption(false)
     64    , mShowFileNameOption(false)
     65    , mShowLineNumberingOption(false)
     66    , mParsedCodePointSet(nullptr)
     67    , mTransposeFcn(reinterpret_cast<transpose_fcn_T>(s2p_fnptr))
     68    , mInitializeCarriesFcn(reinterpret_cast<process_block_initialize_carries_fcn>(process_block_initialize_carries))
     69    , mProcessBlockFcn(reinterpret_cast<process_block_fcn>(process_block)) {
     70       
     71    }
     72   
    6073    void setCountOnlyOption(bool doCount = true) {mCountOnlyOption = doCount;}
    6174    void setParseCodepointsOption() {
     
    8396    re::CC * mParsedCodePointSet;
    8497
     98    transpose_fcn_T mTransposeFcn;
    8599    process_block_initialize_carries_fcn mInitializeCarriesFcn;
    86100    process_block_fcn mProcessBlockFcn;
Note: See TracChangeset for help on using the changeset viewer.