Ignore:
Timestamp:
Jul 20, 2016, 1:15:01 PM (3 years ago)
Author:
cameron
Message:

Kernel system restructuring progress

Location:
icGREP/icgrep-devel/icgrep/pablo
Files:
3 edited

Legend:

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

    r5096 r5102  
    6464     
    6565    Value * blockNo = mKernelBuilder->getScalarField(mSelf, blockNoScalar);
    66     Value * inputSet_ptr = mKernelBuilder->getCircularBufferBlockPointer(mSelf, "inputs", blockNo);
    67    
     66    Value * inputBase_ptr = mKernelBuilder->getScalarField(mSelf, mKernelBuilder->mStreamSetInputs[0].ssName + basePtrSuffix);
     67    Value * inputSet_ptr  = mKernelBuilder->mStreamSetInputs[0].ssType.getStreamSetBlockPointer(inputBase_ptr, blockNo);
     68
    6869    Value * outputSet_ptr = nullptr;
    6970    if (mPabloFunction->getNumOfResults() > 0) {
    70         outputSet_ptr = mKernelBuilder->getCircularBufferBlockPointer(mSelf, mKernelBuilder->mStreamSetOutputs[0].ssName, blockNo);
     71        Value * outputBase_ptr = mKernelBuilder->getScalarField(mSelf, mKernelBuilder->mStreamSetOutputs[0].ssName + basePtrSuffix);
     72        outputSet_ptr = mKernelBuilder->mStreamSetOutputs[0].ssType.getStreamSetBlockPointer(outputBase_ptr, blockNo);
    7173    }
    7274    for (unsigned j = 0; j < mPabloFunction->getNumOfParameters(); ++j) {
  • icGREP/icgrep-devel/icgrep/pablo/pablo_kernel.cpp

    r5100 r5102  
    1616                         std::string kernelName,
    1717                         PabloFunction * function,
     18                         StreamSetBuffer & inputBuffer,
     19                         StreamSetBuffer & outputBuffer,
    1820                         std::vector<std::string> accumulators) :
    1921    KernelBuilder(builder, kernelName,
    20                     {StreamSetBinding{StreamSetType(function->getNumOfParameters(), 1), "inputs"}},
     22                    {StreamSetBinding{inputBuffer, "inputs"}},
     23                    {StreamSetBinding{outputBuffer, "outputs"}},
     24                    {},
     25                    {},
     26                    {ScalarBinding{builder->getBitBlockType(), "EOFmark"}}),
     27    mPabloFunction(function) {
     28    unsigned output_streams = function->getNumOfResults();
     29    assert (output_streams > 0);
     30    mScalarOutputs = accumBindings(accumulators);
     31    pablo_compiler = new PabloCompiler(builder, this, function);
     32}
     33
     34PabloKernel::PabloKernel(IDISA::IDISA_Builder * builder,
     35                         std::string kernelName,
     36                         PabloFunction * function,
     37                         StreamSetBuffer & inputBuffer,
     38                         std::vector<std::string> accumulators) :
     39    KernelBuilder(builder, kernelName,
     40                    {StreamSetBinding{inputBuffer, "inputs"}},
    2141                    {},
    2242                    {},
     
    2545    mPabloFunction(function) {
    2646    unsigned output_streams = function->getNumOfResults();
    27     if (output_streams > 0) {
    28         mStreamSetOutputs = {StreamSetBinding{StreamSetType(output_streams, 1), "outputs"}};
    29     }
     47    assert (output_streams == 0);
    3048    mScalarOutputs = accumBindings(accumulators);
    3149    pablo_compiler = new PabloCompiler(builder, this, function);
    3250}
     51
    3352
    3453std::vector<ScalarBinding> PabloKernel::accumBindings(std::vector<std::string> accum_names) {
  • icGREP/icgrep-devel/icgrep/pablo/pablo_kernel.h

    r5076 r5102  
    2121                    std::string kernelName,
    2222                    PabloFunction * function,
     23                    parabix::StreamSetBuffer & inputBuffer,
     24                    parabix::StreamSetBuffer & outputBuffer,
     25                    std::vector<std::string> accumulators);
     26    // At present only population count accumulator are supported,
     27    // using the pablo.Count operation.
     28   
     29    PabloKernel(IDISA::IDISA_Builder * builder,
     30                    std::string kernelName,
     31                    PabloFunction * function,
     32                    parabix::StreamSetBuffer & inputBuffer,
    2333                    std::vector<std::string> accumulators);
    2434    // At present only population count accumulator are supported,
Note: See TracChangeset for help on using the changeset viewer.