src/runtime_src/xdp/profile/plugin/device_offload/opencl/opencl_device_offload_plugin.cpp
void OpenCLDeviceOffloadPlugin::flushDevice(void* d)
  {
    if (!active) return ;
    if (getFlowMode() == SW_EMU) return ;

    xrt_xocl::device* device = static_cast<xrt_xocl::device*>(d) ;

    std::string path = device->getDebugIPlayoutPath().get() ;

    uint64_t deviceId = db->addDevice(path) ;
    
    if (offloaders.find(deviceId) != offloaders.end())
    {
      std::get<0>(offloaders[deviceId])->read_trace() ;
    }
  }
// This function will only be called if an active device is going to
//  be reprogrammed.  We can assume the device is good.
This function will only be called if an active device is going to
be reprogrammed.  We can assume the device is good.
This function will only be called if an active device is going to be reprogrammed . We can assume the device is good .
void OpenCLDeviceOffloadPlugin::flushDevice(void* d)
  {
    if (!active) return ;
    if (getFlowMode() == SW_EMU) return ;
    xrt_xocl::device* device = static_cast<xrt_xocl::device*>(d) ;
    std::string path = device->getDebugIPlayoutPath().get() ;
    uint64_t deviceId = db->addDevice(path) ;
    if (offloaders.find(deviceId) != offloaders.end())
    {
      std::get<0>(offloaders[deviceId])->read_trace() ;
    }
  }
void OpenCLDeviceOffloadPlugin :: flushDevice ( void * d ) { if ( ! active ) return ; if ( getFlowMode ( ) == SW_EMU ) return ; xrt_xocl :: device * device = static_cast < xrt_xocl :: device * > ( d ) ; std :: string path = device -> getDebugIPlayoutPath ( ) . get ( ) ; uint64_t deviceId = db -> addDevice ( path ) ; if ( offloaders . find ( deviceId ) != offloaders . end ( ) ) { std :: get < 0 > ( offloaders [ deviceId ] ) -> read_trace ( ) ; } }
This function will only be called if an active device is going to
be reprogrammed.
This function will only be called if an active device is going to be reprogrammed .