Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions profile/plugin/device_offload/hal/hal_device_offload_cb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "xdp/profile/plugin/device_offload/hal/hal_device_offload_cb.h"
#include "xdp/profile/plugin/device_offload/hal/hal_device_offload_plugin.h"
#include "xdp/profile/database/database.h"

namespace xdp {
static HALDeviceOffloadPlugin deviceOffloadPluginInstance ;
Expand All @@ -35,6 +36,12 @@ namespace xdp {
deviceOffloadPluginInstance.flushDevice(handle) ;
}

static int getAppStyleHAL()
{
return static_cast<int>(
VPDatabase::Instance()->getStaticInfo().getAppStyle()) ;
}

} // end namespace xdp

extern "C"
Expand All @@ -49,3 +56,9 @@ void flushDeviceHAL(void* handle)
xdp::flushDeviceHAL(handle) ;
}

extern "C"
int getAppStyleHAL()
{
return xdp::getAppStyleHAL() ;
}

5 changes: 5 additions & 0 deletions profile/plugin/device_offload/hal/hal_device_offload_cb.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ void updateDeviceHAL(void* handle, bool hw_context_flow=false) ;
extern "C"
void flushDeviceHAL(void* handle) ;

// Returns the current XDP AppStyle as an int
// xdp::AppStyle: 0 = NOT_SET, 1 = LOAD_XCLBIN_STYLE, 2 = REGISTER_XCLBIN_STYLE.
extern "C"
int getAppStyleHAL() ;

#endif