Ignore:
Timestamp:
Jan 25, 2018, 2:03:09 PM (15 months ago)
Author:
cameron
Message:

CC Compiler refactoring step

File:
1 edited

Legend:

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

    r5836 r5843  
    1212#include <pablo/pablo_toolchain.h>
    1313#include <kernels/kernel_builder.h>
     14#include <kernels/streamset.h>
    1415#include <llvm/IR/Module.h>
    1516
     
    3233    return mInputs[index];
    3334}
     35
     36std::vector<PabloAST *> PabloKernel::getInputStreamSet(const std::string & name) {
     37    Port port; unsigned index;
     38    std::tie(port, index) = getStreamPort(name);
     39    assert (port == Port::Input);
     40    auto numStreams = mStreamSetInputBuffers[index]->getNumOfStreams();
     41    std::vector<PabloAST *> inputSet(numStreams);
     42    for (unsigned i = 0; i < numStreams; i++) {
     43        inputSet[i] = mEntryScope->createExtract(mInputs[index], mEntryScope->getInteger(i));
     44    }
     45    return inputSet;
     46}
     47
    3448
    3549Var * PabloKernel::getOutputStreamVar(const std::string & name) {
Note: See TracChangeset for help on using the changeset viewer.