Ignore:
Timestamp:
May 19, 2017, 9:39:14 AM (2 years ago)
Author:
cameron
Message:

Add kernel CPU cycle counting for segment-parallel-pipeline mode.

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

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/kernel.cpp

    r5454 r5456  
    3434const std::string Kernel::BUFFER_PTR_SUFFIX = "_bufferPtr";
    3535const std::string Kernel::CONSUMER_SUFFIX = "_consumerLocks";
     36const std::string Kernel::CYCLECOUNT_SCALAR = "CPUcycles";
    3637
    3738unsigned Kernel::addScalar(Type * const type, const std::string & name) {
     
    181182    }
    182183
     184    // We compile in a 64-bit CPU cycle counter into every kernel.   It will remain unused
     185    // in normal execution, but when codegen::EnableCycleCounter is specified, pipelines
     186    // will be able to add instrumentation to cached modules without recompilation.
     187    addScalar(idb->getInt64Ty(), CYCLECOUNT_SCALAR);
     188   
    183189    mKernelStateType = StructType::create(idb->getContext(), mKernelFields, getName());
    184190}
  • icGREP/icgrep-devel/icgrep/kernels/kernel.h

    r5454 r5456  
    4444    static const std::string BUFFER_PTR_SUFFIX;
    4545    static const std::string CONSUMER_SUFFIX;
     46public:
     47    static const std::string CYCLECOUNT_SCALAR;
    4648
    4749public:
Note: See TracChangeset for help on using the changeset viewer.