Ignore:
Timestamp:
Apr 7, 2017, 4:59:04 PM (2 years ago)
Author:
nmedfort
Message:

Continued work on processing stdin input. Partial integration of ParabixDriver? methods into icgrep and editd. Object cache does not currently work for recursive REs.

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

Legend:

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

    r5392 r5398  
    2828}
    2929
    30 Var * PabloKernel::getInputStreamVar(const std::string & inputSetName) {
    31     return mInputs[getStreamSetIndex(inputSetName)];
     30Var * PabloKernel::getInputStreamVar(const std::string & name) {
     31    Port port; unsigned index;
     32    std::tie(port, index) = getStreamPort(name);
     33    assert (port == Port::Input);
     34    return mInputs[index];
    3235}
    3336
    34 Var * PabloKernel::getOutputStreamVar(const std::string & outputSetName) {
    35     return mOutputs[getStreamSetIndex(outputSetName)];
     37Var * PabloKernel::getOutputStreamVar(const std::string & name) {
     38    Port port; unsigned index;
     39    std::tie(port, index) = getStreamPort(name);
     40    assert (port == Port::Output);
     41    return mOutputs[index];
    3642}
    3743
    38 Var * PabloKernel::getOutputScalarVar(const std::string & outputName) {
    39     const auto f = mScalarOutputNameMap.find(outputName);
     44Var * PabloKernel::getOutputScalarVar(const std::string & name) {
     45    const auto f = mScalarOutputNameMap.find(name);
    4046    if (LLVM_UNLIKELY(f == mScalarOutputNameMap.end())) {
    41         report_fatal_error("Kernel does not contain scalar: " + outputName);
     47        report_fatal_error("Kernel does not contain scalar: " + name);
    4248    }
    4349    return f->second;
     
    5056    mVariables.push_back(param);
    5157    if (isStreamType(type)) {
    52         mStreamSetNameMap.emplace(name, mStreamSetInputs.size());
     58        mStreamMap.emplace(name, std::make_pair(Port::Input, mStreamSetInputs.size()));
    5359        mStreamSetInputs.emplace_back(type, name);       
    5460    } else {
     
    6672    mVariables.push_back(result);
    6773    if (isStreamType(type)) {
    68         mStreamSetNameMap.emplace(name, mStreamSetOutputs.size());
     74        mStreamMap.emplace(name, std::make_pair(Port::Output, mStreamSetOutputs.size()));
    6975        mStreamSetOutputs.emplace_back(type, name);
    7076    } else {
  • icGREP/icgrep-devel/icgrep/pablo/pablo_kernel.h

    r5371 r5398  
    6868    }
    6969   
    70     Var * getInputStreamVar(const std::string & inputSetName);
     70    Var * getInputStreamVar(const std::string & name);
    7171
    7272    Var * getInput(const unsigned index) {
     
    8484    }
    8585   
    86     Var * getOutputStreamVar(const std::string & inputSetName);
     86    Var * getOutputStreamVar(const std::string & name);
    8787   
    88     Var * getOutputScalarVar(const std::string & outputName);
     88    Var * getOutputScalarVar(const std::string & name);
    8989
    9090    Var * getOutput(const unsigned index) {
Note: See TracChangeset for help on using the changeset viewer.