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

Kernel system restructuring progress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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) {
Note: See TracChangeset for help on using the changeset viewer.